Skip to main content

MCPCheck 🔒

PyPI version License: MIT Python 3.11+

MCP supply chain security scanner. Detect tool poisoning, prompt injection, data exfiltration, and other attacks in MCP server definitions.

Installation

pip install mcpcheck

Usage

Basic scan

mcpcheck ./my-mcp-server

JSON output

mcpcheck ./my-mcp-server --format json

SARIF for CI/CD

mcpcheck ./my-mcp-server --format sarif > results.sarif

Severity filter

mcpcheck ./my-mcp-server --min-severity HIGH

Exclude patterns

mcpcheck ./my-mcp-server --exclude "vendor/*" --exclude "node_modules/*"

Detected Vulnerabilities

Rule ID Category Severity Description
tool_poisoning_instructions TOOL_POISONING CRITICAL Detects prompt injection patterns such as "ignore previous instructions", "you are now in admin mode", "override previous", "disregard", and "new instructions:" in tool names and descriptions.
hidden_behavior HIDDEN_BEHAVIOR HIGH Detects hidden actions and concealed behaviors like "secretly send/copy/read", "without notifying the user", hidden instructions/directives, and directives that the user must not notice.
data_exfiltration DATA_EXFILTRATION HIGH Detects hidden data sending patterns such as "send all data to", "exfiltrate", and covert data exfiltration in tool descriptions.
behavioral_mismatch BEHAVIORAL_MISMATCH HIGH Detects when tool descriptions contradict their stated purpose — e.g. tools described as benign but containing keywords like "secretly", "silently", "covertly", or "ignore the user".
external_url EXTERNAL_URL MEDIUM Flags any external URL in tool descriptions (excluding localhost/127.0.0.1) that could indicate callback or data exfiltration endpoints.
parameter_smuggling PARAMETER_SMUGGLING MEDIUM Detects hidden or undocumented parameters and attempts to embed secret data in responses or metadata.

Exit Codes

Code Meaning
0 Clean — no CRITICAL or HIGH findings detected
1 One or more CRITICAL or HIGH findings were detected

CI/CD Integration

MCPCheck includes a GitHub Action (action.yml) for seamless CI/CD integration. It runs a scan, uploads results as a SARIF artifact, and integrates with GitHub Code Scanning.

name: MCPCheck Scan
on:
  push:
    branches: [main]
  pull_request:

jobs:
  mcpcheck:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Run MCPCheck
        uses: onicarps/MCPSafe@main
        with:
          path: "."
          severity: "LOW"
          version: "0.1.0"

      # The action automatically uploads SARIF results to GitHub Code Scanning.
      # Findings will appear under the "Security" tab in your repository.

You can also invoke MCPCheck directly in any CI pipeline:

pip install mcpcheck
mcpcheck ./my-mcp-server --format sarif > results.sarif

License

MIT

Metadata

Release files for mcp-scan-safe 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 mcp-scan-safe 0.1.0
File Size Uploaded
mcp_scan_safe-0.1.0.tar.gz 9.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mcp-scan-safe 0.1.0
File Interpreter ABI Platform
mcp_scan_safe-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 20.3 kB

Release files / mcp_scan_safe-0.1.0.tar.gz

Download URL mcp_scan_safe-0.1.0.tar.gz
Size 9.6 kB
Tags Source
SHA-256 checksum
How to use checksums
b4fc737cbb09cb16640eeb06e4ad84b2cd193dab4b8736516421292a615478da
BLAKE2b-256 checksum
How to use checksums
209bb98a558bd0db78fafc59b55b9a04df0de324ecba3d5c7aca97eb5f13022a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

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

Download URL mcp_scan_safe-0.1.0-py3-none-any.whl
Size 10.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dd3c9be92ea31af92edea6b99812a0a7ac2d2625f5a540bf720d047f02efc8c4
BLAKE2b-256 checksum
How to use checksums
d747f03dd9e03cf820d55f2e87b689cb6d6b8b85b994a8387edd719be368fa81
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

0.1.0 This release

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