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

Release files for dfx-mcp-scanner 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dfx-mcp-scanner 0.4.0
File Size Uploaded
dfx_mcp_scanner-0.4.0.tar.gz 11.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for dfx-mcp-scanner 0.4.0
File Interpreter ABI Platform
dfx_mcp_scanner-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 25.5 kB

Release files / dfx_mcp_scanner-0.4.0.tar.gz

Download URL dfx_mcp_scanner-0.4.0.tar.gz
Size 11.9 kB
Tags Source
SHA-256 checksum
How to use checksums
39c25a9e8bfdb41776f8d540811888236bc2242bc59c1a7fab2863682c794d94
BLAKE2b-256 checksum
How to use checksums
6a1503373e8b08d20e1cb82427f78b59190ebc0bef763f1cfdb2965a0c0950bd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 5, 2026.

Transparency log

Release files / dfx_mcp_scanner-0.4.0-py3-none-any.whl

Download URL dfx_mcp_scanner-0.4.0-py3-none-any.whl
Size 13.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
afe7d78bc4bd2d949ff3f833b33c12dace34a58c01bca08ac070b227ca1d978c
BLAKE2b-256 checksum
How to use checksums
4f56301f1c90c80696234292e755930564609ab242f2587ad902d13d91a5981b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 5, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page