// INTEGRATION_GUIDE

Secure Claude Desktop MCP Server — Prompt Injection Protection

Protect Claude Desktop MCP connections against indirect prompt injections. Restrict unauthorized file system tool calls with policy-based RBAC and real-time audit logs.

The Local Agent VulnerabilityBy default, Claude Desktop can read, write, and delete local files if any filesystem MCP server is connected. If Claude parses a document containing an injection payload, it can execute commands without your confirmation.

1Locate Claude Desktop Configuration

Open the configuration file `claude_desktop_config.json` located at:

  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

2Route MCP Traffic Through the Gateway

Instead of calling local servers directly, configure your MCP client to route requests through the MakeYourMCP gateway. Point any MCP client at your gateway endpoint (found in your agent's Connect panel in the dashboard) with the API key header:

curl -X POST https://gateway.makeyourmcp.com/v1/gateway/{agent-uuid}/mcp \ -H "X-API-Key: mcpg_prod_xxxxxxxxxxxxx" \ -H "Content-Type: application/json" \ -d '{ "jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": { "name": "read_file", "arguments": {"path": "/allowed/directory/file.txt"} } }'

Replace https://gateway.makeyourmcp.com with your deployment's gateway URL and {agent-uuid} with your agent's UUID (copy both from your agent's Connect panel). All MCP tool calls go through this endpoint with the X-API-Key header.

Note for Claude Desktop: Claude Desktop's mcpServers config launches command-based servers and cannot call a remote HTTP endpoint directly. MCP clients with native streamable-HTTP support connect to the gateway URL as shown above; for Claude Desktop, a local bridge command that forwards requests with the X-API-Key header is required — our official SDK with a ready-made bridge is coming soon. The curl example above is the reference for what any bridge or HTTP-capable client sends.

3Enable Prompt Injection Interception

When you ask Claude to scan a webpage or document:

  • The gateway validates your policy rules against each tool call before handing it over to the model.
  • If a tool call violates your policy (e.g., trying to write outside allowed directories), the gateway blocks execution and returns a denial message to Claude.

Secured Capabilities

  • Restricts directory listings to explicitly declared folders.
  • Blocks tool escalation if Claude is hijacked via indirect prompt injection.
  • Stores all local Claude tools activity logs in your secure VNet dashboard.
Get Early Access
Get Early Access