Skip to main content

MCP Scanner

Security scanner for MCP (Model Context Protocol) servers. Detect malicious tools, data exfiltration, and supply chain risks before connecting an MCP server to your AI agent.

PyPI Python 3.10+ License: MIT CI


Why MCP Scanner?

MCP servers give AI agents (Claude Code, Cursor, Copilot) direct access to tools, filesystems, and APIs. But nobody is checking if those servers are safe.

MCP Scanner analyzes:

  • MCP server config files (Claude Code, Cursor, generic)
  • Command-level risks (npx --yes, curl|bash, sudo)
  • Secret exposure in environment variables
  • Filesystem and network access patterns
  • Source code of MCP server implementations (with AgentGuard integration)

Quick Start

pip install dfx-mcp-scanner

# Scan your Claude Code MCP config
mcp-scanner

# Scan a specific config
mcp-scanner ~/.cursor/mcp.json

# JSON output
mcp-scanner .mcp.json --format json

What It Detects

Rule Severity Description
Remote code execution CRITICAL `curl
Auto-install packages HIGH npx --yes without version pinning
Privileged execution CRITICAL Server running as root/sudo
Secret exposure CRITICAL Real API keys/tokens in config env vars
Host filesystem access HIGH Server accessing /etc, /root, /proc
External network access MEDIUM Server connecting to non-localhost URLs
Excessive tool count LOW Server registering >20 tools

Supported Configs

  • Claude Code (~/.claude/claude_code_config.json)
  • Cursor (~/.cursor/mcp.json)
  • Project-level (.mcp.json)
  • Generic MCP server configs

AgentGuard Integration

When AgentGuard is installed, MCP Scanner performs deep source code analysis on MCP server implementations using all 10 OWASP ASI detection rules.

License

MIT - see LICENSE.


Built by Dockfix Labs.


AgentGuard Ecosystem

AgentGuard is the core security scanner. Companion tools:

Tool Purpose Install
agentguard AI agent code security scanner pip install dfx-agentguard
mcp-scanner MCP server security audit pip install dfx-mcp-scanner
agentguard-app GitHub App for PR reviews Install from Marketplace
agentguard-vscode VS Code inline diagnostics Install from VS Code
agentguard-benchmark Detection benchmark suite git clone
agentguard-demo Live demo with Code Scanning git clone

19 detection rules | 102 tests | 50 benchmark samples | OWASP ASI Top 10 GitHub Action: dockfixlabs/agentguard@v1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dfx_mcp_scanner-0.4.0.tar.gz (11.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dfx_mcp_scanner-0.4.0-py3-none-any.whl (13.6 kB view details)

Uploaded Python 3

File details

Details for the file dfx_mcp_scanner-0.4.0.tar.gz.

File metadata

  • Download URL: dfx_mcp_scanner-0.4.0.tar.gz
  • Upload date:
  • Size: 11.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for dfx_mcp_scanner-0.4.0.tar.gz
Algorithm Hash digest
SHA256 39c25a9e8bfdb41776f8d540811888236bc2242bc59c1a7fab2863682c794d94
MD5 200563b16e2aee5824a0c37854a3cad9
BLAKE2b-256 6a1503373e8b08d20e1cb82427f78b59190ebc0bef763f1cfdb2965a0c0950bd

See more details on using hashes here.

Provenance

The following attestation bundles were made for dfx_mcp_scanner-0.4.0.tar.gz:

Publisher: publish.yml on dockfixlabs/mcp-scanner

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dfx_mcp_scanner-0.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for dfx_mcp_scanner-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 afe7d78bc4bd2d949ff3f833b33c12dace34a58c01bca08ac070b227ca1d978c
MD5 db54de02c427b4c5618a917c38814da6
BLAKE2b-256 4f56301f1c90c80696234292e755930564609ab242f2587ad902d13d91a5981b

See more details on using hashes here.

Provenance

The following attestation bundles were made for dfx_mcp_scanner-0.4.0-py3-none-any.whl:

Publisher: publish.yml on dockfixlabs/mcp-scanner

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page