M

MCP Safeguard

by cognivators.com · com.cognivators/mcp-safeguard

Open-source security scanner for MCP configs + source. Prompt injection, credential leaks, SSRF, tool poisoning. pip install mcp-safeguard. GitHub Action @v0.9.6. Black Hat Europe Arsenal 2026.

MCP Safeguard is a local (stdio) MCP server by cognivators.com in the AI & LLM category. It runs with uvx mcp-safeguard, declares no secrets, and is listed in 2 registries.

pypi Local · stdio GlamaOfficial MCP Registry High confidence

Install

Add to ~/Library/Application Support/Claude/claude_desktop_config.json

Windows / Linux path
Windows: %APPDATA%\Claude\claude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "com-cognivators-mcp-safeguard": {
      "command": "uvx",
      "args": [
        "mcp-safeguard"
      ],
      "env": {
        "MCP_SHIELD_API_KEY": "<VALUE>",
        "MCP_SHIELD_OTLP_ENDPOINT": "<VALUE>",
        "MCP_SHIELD_SSRF_ALLOWLIST": "<VALUE>",
        "MCP_SHIELD_RATE_LIMIT_WINDOW": "<VALUE>",
        "MCP_SHIELD_PROMETHEUS_ENABLED": "<VALUE>",
        "MCP_SHIELD_RATE_LIMIT_REQUESTS": "<VALUE>"
      }
    }
  }
}

Restart Claude Desktop to activate the new server.

Add to .cursor/mcp.json (project) or ~/.cursor/mcp.json (global)

Windows / Linux path
Windows: .cursor\mcp.json (project) or %USERPROFILE%\.cursor\mcp.json (global)
Linux: .cursor/mcp.json (project) or ~/.cursor/mcp.json (global)
{
  "mcpServers": {
    "com-cognivators-mcp-safeguard": {
      "command": "uvx",
      "args": [
        "mcp-safeguard"
      ],
      "env": {
        "MCP_SHIELD_API_KEY": "<VALUE>",
        "MCP_SHIELD_OTLP_ENDPOINT": "<VALUE>",
        "MCP_SHIELD_SSRF_ALLOWLIST": "<VALUE>",
        "MCP_SHIELD_RATE_LIMIT_WINDOW": "<VALUE>",
        "MCP_SHIELD_PROMETHEUS_ENABLED": "<VALUE>",
        "MCP_SHIELD_RATE_LIMIT_REQUESTS": "<VALUE>"
      }
    }
  }
}

Cursor usually picks up config changes automatically; if the server does not appear, reload the window.

Add to .mcp.json (project) or ~/.claude.json (global)

Windows / Linux path
Windows: .mcp.json (project) or %USERPROFILE%\.claude.json (global)
Linux: .mcp.json (project) or ~/.claude.json (global)
{
  "mcpServers": {
    "com-cognivators-mcp-safeguard": {
      "command": "uvx",
      "args": [
        "mcp-safeguard"
      ],
      "env": {
        "MCP_SHIELD_API_KEY": "<VALUE>",
        "MCP_SHIELD_OTLP_ENDPOINT": "<VALUE>",
        "MCP_SHIELD_SSRF_ALLOWLIST": "<VALUE>",
        "MCP_SHIELD_RATE_LIMIT_WINDOW": "<VALUE>",
        "MCP_SHIELD_PROMETHEUS_ENABLED": "<VALUE>",
        "MCP_SHIELD_RATE_LIMIT_REQUESTS": "<VALUE>"
      }
    }
  }
}

The server will be available in the next Claude Code session.

Add to .vscode/mcp.json

Windows / Linux path
Windows: .vscode\mcp.json
Linux: .vscode/mcp.json
{
  "servers": {
    "com-cognivators-mcp-safeguard": {
      "command": "uvx",
      "args": [
        "mcp-safeguard"
      ],
      "env": {
        "MCP_SHIELD_API_KEY": "<VALUE>",
        "MCP_SHIELD_OTLP_ENDPOINT": "<VALUE>",
        "MCP_SHIELD_SSRF_ALLOWLIST": "<VALUE>",
        "MCP_SHIELD_RATE_LIMIT_WINDOW": "<VALUE>",
        "MCP_SHIELD_PROMETHEUS_ENABLED": "<VALUE>",
        "MCP_SHIELD_RATE_LIMIT_REQUESTS": "<VALUE>"
      }
    }
  }
}

Reload the VS Code window to activate.

Add to ~/.codeium/windsurf/mcp_config.json

Windows / Linux path
Windows: %USERPROFILE%\.codeium\windsurf\mcp_config.json
Linux: ~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "com-cognivators-mcp-safeguard": {
      "command": "uvx",
      "args": [
        "mcp-safeguard"
      ],
      "env": {
        "MCP_SHIELD_API_KEY": "<VALUE>",
        "MCP_SHIELD_OTLP_ENDPOINT": "<VALUE>",
        "MCP_SHIELD_SSRF_ALLOWLIST": "<VALUE>",
        "MCP_SHIELD_RATE_LIMIT_WINDOW": "<VALUE>",
        "MCP_SHIELD_PROMETHEUS_ENABLED": "<VALUE>",
        "MCP_SHIELD_RATE_LIMIT_REQUESTS": "<VALUE>"
      }
    }
  }
}

Restart Windsurf (or refresh its MCP servers panel) to activate the new server.

Windsurf Next uses ~/.codeium/windsurf-next/mcp_config.json. Devin Desktop (the Windsurf rebrand) uses ~/.config/devin/mcp_config.json and imports the Windsurf file.

Add to ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json

Windows / Linux path
Windows: %APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json
Linux: ~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
{
  "mcpServers": {
    "com-cognivators-mcp-safeguard": {
      "command": "uvx",
      "args": [
        "mcp-safeguard"
      ],
      "env": {
        "MCP_SHIELD_API_KEY": "<VALUE>",
        "MCP_SHIELD_OTLP_ENDPOINT": "<VALUE>",
        "MCP_SHIELD_SSRF_ALLOWLIST": "<VALUE>",
        "MCP_SHIELD_RATE_LIMIT_WINDOW": "<VALUE>",
        "MCP_SHIELD_PROMETHEUS_ENABLED": "<VALUE>",
        "MCP_SHIELD_RATE_LIMIT_REQUESTS": "<VALUE>"
      }
    }
  }
}

Cline reloads cline_mcp_settings.json automatically; if the server does not appear, reload the VS Code window.

Open it from Cline's MCP Servers panel → Configure. Roo Code uses a different file and format.

Configuration

Environment variables this server reads. Secrets stay on your machine.

NameRequiredDescription
MCP_SHIELD_API_KEY No API key for authenticating requests to the mcp-safeguard server
MCP_SHIELD_OTLP_ENDPOINT No OpenTelemetry endpoint for traces, e.g., 'http://jaeger:4317'
MCP_SHIELD_SSRF_ALLOWLIST No JSON array of allowed hosts for SSRF protection, e.g., '["localhost","127.0.0.1"]'
MCP_SHIELD_RATE_LIMIT_WINDOW No Rate limit window duration in seconds (default 60)
MCP_SHIELD_PROMETHEUS_ENABLED No Set to 'true' to expose Prometheus metrics at /metrics
MCP_SHIELD_RATE_LIMIT_REQUESTS No Maximum number of requests per window (default 100)

Similar servers