Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

SafePrompt

MCP server by ianreboot Verified · safeprompt.dev

SafePrompt detects prompt injection, jailbreaks and data exfiltration attempts in text before it reaches an LLM. It is a hosted API for developers building AI apps, chatbots and automations.

  • Score 82
  • 2 stars
  • 210 a week
  • MIT
  • Updated

Install SafePrompt

Built from the published package, never by AI.

claude mcp add safeprompt -e SAFEPROMPT_API_KEY=YOUR_SAFEPROMPT_API_KEY -- npx -y @safeprompt.dev/mcp

Run in your terminal. Add --scope user to use it in every project.

Step-by-step: install SafePrompt in Claude Code

MCP servers run with your permissions and can read what you give them access to. Some need an API key: check the README and add it under env in the safeprompt block.

About

SafePrompt is a hosted prompt injection detection API. Developers send untrusted text to it with a check call and get back a safe flag and a list of threats. It covers instruction override and jailbreaks, system prompt extraction, exfiltration imperatives, and indirect injection in retrieved content. When a session token is passed, the verdict also considers earlier turns of the same session.

Detection runs in three layers: pattern checks, AI semantic validation, and shared network intelligence. The source says SafePrompt does not police harmful-topic questions or code payloads such as SQL, XSS or shell, and recommends pairing it with an LLM provider's moderation layer. It is aimed at developers who ship AI apps, chatbots and automations, and it has SDKs for JavaScript, Python and LangChain.

Written from the project's README and checked against it.

Tools it gives your assistant

  • Attack classes coveredCovers instruction override, jailbreaks, system prompt extraction, exfiltration and indirect injection.
  • Multi-turn contextPassing a session_token lets the verdict see earlier turns of the same session.
  • External reference detectionFlags URLs, IP addresses and file paths as exfiltration signals rather than banning them.
  • Custom whitelists and blacklistsTunes detection for a specific use case, available on paid tiers.
  • Network intelligenceAttacks blocked for one customer feed the shared engine used by all customers.
  • Multi-language detectionDetects attacks written in Spanish, French, Japanese, Chinese and other languages.

What you need

  • SafePrompt API key
  • Free key available from safeprompt.dev
  • Node.js or Python to use the SDKs
SettingNeededWhat it is
SAFEPROMPT_API_KEYEnvironment variable, secretRequiredSafePrompt API key from https://dashboard.safeprompt.dev
X-SafePrompt-Api-KeyHeader, secretRequiredSafePrompt API key from https://dashboard.safeprompt.dev
SAFEPROMPT_PROVIDEREnvironment variableOptionalAPI base URL (default https://api.safeprompt.dev)
SAFEPROMPT_USER_IPEnvironment variableOptionalValue sent as X-User-IP for threat-intel tracking (default 203.0.113.1)

From the publisher's entry in the official MCP Registry. Required settings are already in the install config below as placeholders.

Try asking

  • Check this user message for prompt injection before sending it to my LLM.
  • Scan this web page text for hidden instructions aimed at an AI.
  • Flag any exfiltration instructions in this retrieved document.

Good to know

  • Text is sent to SafePrompt's hosted servers for scoring.
  • Does not moderate content policy topics or code payloads such as SQL and XSS.
  • The source does not claim accuracy on production traffic; benchmarks use a published test suite.
  • Every API call requires an X-User-IP header.

Security check

D
  • Tells the assistant to ignore its instructions or hide actions from youIn README.md: Ignore previous instructions

Checked automatically: README.md. This looks for known risky patterns and is not a full audit. How grades work

Alternatives to SafePrompt

All alternatives →
Agentmesh MCP Proxy microsoft
94

Agentmesh MCP Proxy is a security proxy for MCP servers, described by its publisher as a firewall for the Model Context Protocol. It is aimed at teams that run AI agents which call tools and other agents.

AAA Local 6.6k
Bla qybaihe
94

Hardens client-side artifacts such as binaries, Electron apps, JS bundles, Python and WebAssembly against AI reverse-engineering agents. Built for developers who ship proprietary logic to user-controlled devices.

AAA Local 7.3k
Bla Agents qybaihe
94

Bla Agents is an MCP server and CLI that adds seeded, format-specific decoys to shipped binaries, JavaScript, WebAssembly and other artifacts. It is for developers who ship proprietary logic to user-controlled devices and want to make AI reverse-engineering slower.

AAA Local 11k/wk
MCP Auth zgeoff
94

A shared OAuth server for the MCP route of an app, built on better-auth, with passkey sign-in for the owner

AAC Local 44k/wk
Agentos MCP Server microsoft
94

Agent Governance Toolkit adds policy enforcement, identity, sandboxing and audit logging to autonomous AI agents. It is aimed at teams shipping agents to production. The source does not confirm the Claude Desktop MCP server named in the listing.

AAA Local 6.6k
Convex MCP Gateway tfohlmeister
93

Convex MCP Gateway is a Convex component that exposes selected Convex functions as MCP tools. It checks each call with your own authorize callback and writes an audit log. It is for developers who run Convex apps and want AI assistants to call parts of them.

AAC Local 37k/wk

Compare with Agentmesh MCP Proxy, Bla or Bla Agents

SafePrompt: common questions

Does SafePrompt store the text it checks?

The source says prompt text and client IPs of blocked requests are deleted within 24 hours, and pseudonymous hashes are deleted at 90 days.

What kinds of input does SafePrompt not flag?

By design it does not flag knowledge questions on uncomfortable topics, creative writing with mature themes, or code payloads such as SQL, XSS and shell commands.

Can SafePrompt run on my own machines?

The source describes SafePrompt as a hosted API and suggests LLM Guard self-hosted for data that must never leave your own machines.

How do I install SafePrompt?

In Claude Code run claude mcp add safeprompt -e SAFEPROMPT_API_KEY=YOUR_SAFEPROMPT_API_KEY -- npx -y @safeprompt.dev/mcp. For Claude Desktop, Cursor and VS Code, paste the config shown above and restart. See the install guides.

Is SafePrompt the official server?

SafePrompt is published by safeprompt.dev from its verified domain in the official MCP Registry.

Is SafePrompt free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is SafePrompt safe to use?

It scores 82 of 100. Grades: maintenance A, licence A, quality C. Security check: grade D (tells the assistant to ignore its instructions or hide actions from you). Review the code before you install. How grades work.

What are alternatives to SafePrompt?

Similar MCP servers: Agentmesh MCP Proxy, Bla, Bla Agents, MCP Auth.

Does SafePrompt work with ChatGPT?

Yes. Add its server URL in ChatGPT as a custom connector. See MCP in ChatGPT.

SafePrompt Install

Add to stack

Loading.