Skip to main content

mcpinspect

MCP security scanner. Offline-first. No telemetry. CI-native.

What makes it different from mcp-scan / Cisco mcp-scanner:

  • Scans tool RESPONSES (not just descriptions) — catches the GitHub/Supabase class of attacks where poisoning hides in data, not metadata
  • Rug-pull drift detection across the full session, not just on connect
  • SARIF output for GitHub/GitLab Security tab integration
  • Zero cloud dependencies — runs fully offline, your config never leaves your machine

Install

pip install mcpinspect

Usage

mcpinspect scan https://your-mcp-server.com
mcpinspect scan stdio:///usr/local/bin/my-mcp-server
mcpinspect audit                    # auto-discovers Claude/Cursor/Windsurf configs
mcpinspect audit ~/.cursor/mcp.json
mcpinspect diff https://... --interval 60   # watch for rug-pulls

# CI usage (exit code 2 = CRITICAL, blocks the build)
mcpinspect scan https://... --sarif > mcp-results.sarif

What it checks

Check ID Category What it catches Severity
MCI-D01 Description Prompt injection in tool/resource/prompt text CRITICAL
MCI-D02 Description Exfiltration instructions (file paths + send verbs) CRITICAL
MCI-D03 Description Unicode homoglyph / invisible characters HIGH
MCI-D04 Description Tool name shadowing dangerous built-ins HIGH
MCI-D05 Description Schema fields used as instruction channels HIGH
MCI-R01 Response Injection patterns in tool response content CRITICAL
MCI-R02 Response Exfil URLs / webhook patterns in responses HIGH
MCI-R03 Response Unexpected secrets/keys in response to canary CRITICAL
MCI-R04 Response Response instructs agent to call another tool HIGH
MCI-X01 Drift Tool description changed mid-session (rug-pull) CRITICAL
MCI-X02 Drift New tool appeared after initial approval CRITICAL
ACI-01 Config Shell metacharacters in STDIO command args CRITICAL
ACI-02 Config Hardcoded secrets in env block HIGH
ACI-03 Config Over-privileged permission flags MEDIUM

GitHub Actions example

name: MCP Security Scan
on: [push, pull_request]

jobs:
  security-scan:
    runs-on: ubuntu-latest
    permissions:
      security-events: write
      
    steps:
      - uses: actions/checkout@v4
      
      - name: Install mcpinspect
        run: pip install mcpinspect
        
      - name: Scan MCP Server
        run: mcpinspect scan stdio:///usr/local/bin/my-mcp-server --sarif > results.sarif || true
        
      - name: Upload SARIF report
        uses: github/codeql-action/upload-sarif@v3
        with:
          sarif_file: results.sarif
          category: mcpinspect

Limitations (be honest)

  • Response checks require --probe (default on). If a tool errors on canary input, that tool's responses aren't checked. Use --probe-args to customize.
  • Drift detection takes 20s extra (two-pass). Use --no-drift in fast CI.
  • Pattern matching has false positives on documentation-heavy tool descriptions. Use --ignore-check MCI-D01 to suppress specific checks.
  • Does not detect attacks that require semantic understanding of tool behaviour. For that, see Cisco mcp-scanner (LLM-assisted) or Snyk Agent Scan.

Metadata

Release files for mcpinspect 0.1.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 mcpinspect 0.1.0
File Size Uploaded Provenance Actions
mcpinspect-0.1.0.tar.gz 33.7 kB Without provenance Details for mcpinspect-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mcpinspect 0.1.0
File Interpreter ABI Platform Actions
mcpinspect-0.1.0-py3-none-any.whl Python 3 none any Details for mcpinspect-0.1.0-py3-none-any.whl

Total release size: 87.2 kB

Release files / mcpinspect-0.1.0.tar.gz

Download URL mcpinspect-0.1.0.tar.gz
Size 33.7 kB
Tags Source
SHA-256 checksum
How to use checksums
bf50466d0b975d3e622012a8cd9cc43f08a40da504cacfa9c99276413bdc8e8f
BLAKE2b-256 checksum
How to use checksums
f136dd9392aac6c94e783332fbe756b84e576f24043cd72e4a8b1b34f3ee41f9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.4.1 CPython/3.12.13 Linux/6.17.0-1015-azure

Release files / mcpinspect-0.1.0-py3-none-any.whl

Download URL mcpinspect-0.1.0-py3-none-any.whl
Size 53.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1769697a3e218d4a8a759956e0e801591c1117d15a16cfae3e30bc56a2a12702
BLAKE2b-256 checksum
How to use checksums
755008166745f9c7c89389976d38539b4680b387e109225659585db5fb0f42f0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.4.1 CPython/3.12.13 Linux/6.17.0-1015-azure

Security for mcpinspect 0.1.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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