Skip to main content

Security scanner for MCP (Model Context Protocol) servers — detect malicious tools, data exfiltration, and supply chain risks.

Project description

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.

Project details


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.1.1.tar.gz (9.0 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.1.1-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for dfx_mcp_scanner-0.1.1.tar.gz
Algorithm Hash digest
SHA256 2a195e2fce36c83c853fb5c3d354de9a62c24f0caa58b98e7fc599966b214813
MD5 87b99c0fcd5614abec8838fc30fe237c
BLAKE2b-256 ca62714ca551207b8ca29e2a3087849cf90bc0fd9e44c3f273ec3164cadaccd0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dfx_mcp_scanner-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9cbe14037c552da9877c3b74f140df2858e8e500e3dfb890b84470b7a271a4b9
MD5 3bee355507434380325edcf95bb682db
BLAKE2b-256 3224157a55fafb67e42129d8b623ed2a4b1b1faff2f503b61386208833581148

See more details on using hashes here.

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