What is MCP?
The Model Context Protocol (MCP) is an open standard that allows AI applications to connect with external tools and services. Prompt Inspector provides an MCP server that exposes its detection capabilities as a tool, enabling AI coding assistants and agents to check user inputs for prompt injection attacks in real time.Supported Clients
The Prompt Inspector MCP server works with any MCP-compatible client, including:- Cursor — AI-powered code editor
- VS Code Copilot — GitHub Copilot Chat in VS Code
- Claude Desktop — Anthropic’s Claude desktop app
- Dify — LLM app development platform
- Any SSE-compatible MCP client
How to Connect
Authentication
All MCP clients must provide your App API Key when connecting. The key can be passed via:X-App-Keyheader (recommended)Authorization: Bearer <key>header
Cursor
Add the following to your Cursor MCP settings (.cursor/mcp.json):
VS Code (Copilot Chat)
Add to your VS Codesettings.json:
Claude Desktop
Add to your Claude Desktop configuration file (claude_desktop_config.json):
Dify
In the Dify platform, add the MCP server as a tool provider:- Go to Tools → Custom Tools
- Add a new MCP tool with the SSE endpoint URL:
https://promptinpector.io/sse - Configure the
X-App-Keyheader with your API key
Available Tools
The MCP server exposes one tool:detect
Analyzes text for prompt injection attacks and malicious content.
Parameters:
Returns: A human-readable string containing:
- Safety status (SAFE / THREAT DETECTED)
- Risk score (0.0 = safe, 1.0 = certain threat)
- Detected threat categories
- Processing latency and request ID
- Raw JSON for programmatic parsing
View Source on GitHub
Find the complete MCP server source code and setup instructions in the repository.

