SafePrompt
v0.1.1Detect prompt injection, jailbreaks, and code injection in untrusted text before it reaches an LLM.
Values you need
| Variable | What it is | |
|---|---|---|
SAFEPROMPT_API_KEY | required secret | SafePrompt API key from https://dashboard.safeprompt.dev |
SAFEPROMPT_PROVIDER | optional | API base URL (default https://api.safeprompt.dev) |
SAFEPROMPT_USER_IP | optional | Value sent as X-User-IP for threat-intel tracking (default 203.0.113.1) |
npm (npx) discovery passed
Requires Node.js 18+
Run in a terminal
claude mcp add mcp -e 'SAFEPROMPT_API_KEY=<SAFEPROMPT_API_KEY>' -- npx -y --package=@safeprompt.dev/mcp@0.1.1 safeprompt-mcpAdd to
claude_desktop_config.json{
"mcpServers": {
"mcp": {
"args": [
"-y",
"--package=@safeprompt.dev/mcp@0.1.1",
"safeprompt-mcp"
],
"command": "npx",
"env": {
"SAFEPROMPT_API_KEY": "<SAFEPROMPT_API_KEY>"
}
}
}
}Add to
~/.cursor/mcp.json{
"mcpServers": {
"mcp": {
"args": [
"-y",
"--package=@safeprompt.dev/mcp@0.1.1",
"safeprompt-mcp"
],
"command": "npx",
"env": {
"SAFEPROMPT_API_KEY": "<SAFEPROMPT_API_KEY>"
}
}
}
}Add to
.vscode/mcp.json{
"inputs": [
{
"description": "SAFEPROMPT_API_KEY",
"id": "safeprompt-api-key",
"password": true,
"type": "promptString"
}
],
"servers": {
"mcp": {
"args": [
"-y",
"--package=@safeprompt.dev/mcp@0.1.1",
"safeprompt-mcp"
],
"command": "npx",
"env": {
"SAFEPROMPT_API_KEY": "${input:safeprompt-api-key}"
},
"type": "stdio"
}
}
}Add to
~/.codex/config.toml[mcp_servers.mcp]
command = "npx"
args = ["-y", "--package=@safeprompt.dev/mcp@0.1.1", "safeprompt-mcp"]
env = { "SAFEPROMPT_API_KEY" = "<SAFEPROMPT_API_KEY>" }Remote (hosted)
Run in a terminal
claude mcp add --transport http mcp https://mcp.safeprompt.dev/mcp --header 'X-SafePrompt-Api-Key: <X-SafePrompt-Api-Key>'Add to
Settings → Connectors → Add custom connector (or claude_desktop_config.json via mcp-remote){
"mcpServers": {
"mcp": {
"args": [
"-y",
"mcp-remote",
"https://mcp.safeprompt.dev/mcp",
"--header",
"X-SafePrompt-Api-Key: <X-SafePrompt-Api-Key>"
],
"command": "npx"
}
}
}Add to
~/.cursor/mcp.json{
"mcpServers": {
"mcp": {
"headers": {
"X-SafePrompt-Api-Key": "<X-SafePrompt-Api-Key>"
},
"url": "https://mcp.safeprompt.dev/mcp"
}
}
}Add to
.vscode/mcp.json{
"servers": {
"mcp": {
"headers": {
"X-SafePrompt-Api-Key": "<X-SafePrompt-Api-Key>"
},
"type": "http",
"url": "https://mcp.safeprompt.dev/mcp"
}
}
}Add to
~/.codex/config.toml[mcp_servers.mcp]
command = "npx"
args = ["-y", "mcp-remote", "https://mcp.safeprompt.dev/mcp", "--header", "X-SafePrompt-Api-Key: <X-SafePrompt-Api-Key>"]For AI agents
- Ask the user for: SAFEPROMPT_API_KEY. Never invent or guess these values; secrets go into the client config, not into chat logs.
- Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
- Restart or reload the client so it starts the server.
- Verify: the server should expose these tools: validate_prompt, validate_prompts.
- If it fails, check that the required runtime is installed (Node.js 18+) and that the values above are set.
Machine-readable: install.md · manifest.json