Readiness linter for MCP server tool, auth, filesystem, shell, network, and documentation risks.
Project description
mcp-risk-linter
mcp-risk-linter is a readiness linter for Model Context Protocol server repositories. It scans manifests, package metadata, source files, and docs for risky tool surfaces before an MCP server is published, installed, or admitted into an internal agent platform.
It is designed for MCP maintainers, agent infrastructure teams, and security reviewers who need fast, local, deterministic checks.
Quickstart
python -m venv .venv
. .venv/bin/activate
pip install mcp-risk-linter
mcp-risk-linter scan examples/risky_stdio_server --format markdown --out report.md
For local development:
python -m pytest -q
python -m mcp_risk_linter.cli scan examples/risky_stdio_server --format json
What It Checks
- shell execution paths such as
subprocess,exec,spawn, andos.system; - broad filesystem access, including home-directory and root traversal patterns;
- broad network access through HTTP clients, sockets, or fetch calls;
- suspicious secret handling such as logging environment variables or token-like values;
- mutating tools whose descriptions do not clearly explain side effects;
- vague or overbroad tool descriptions;
- missing security documentation;
- missing authentication or permission-boundary language;
- README claims that imply trust without explaining scope.
Report Formats
mcp-risk-linter scan . --format markdown --out mcp-risk-report.md
mcp-risk-linter scan . --format json --out mcp-risk-report.json
mcp-risk-linter scan . --format sarif --out mcp-risk-report.sarif
Use --fail-on medium or --fail-on high in CI.
What This Is Not
This is not a full security audit, penetration test, CVE scanner, exploit detector, or official MCP compliance program. Findings are readiness signals that should help maintainers scope tools, document risk, and decide what needs human review.
This project is not affiliated with Anthropic, the Model Context Protocol project, OpenAI, or any registry operator.
Examples
examples/safe_server- narrow tools with explicit read-only descriptions and security docs.examples/risky_stdio_server- shell execution, environment leakage, and vague mutating tools.examples/broad_filesystem_server- broad filesystem and network access patterns.
Exit Codes
0: no findings at or above the configured failure threshold.1: findings met or exceeded the configured threshold.2: invalid CLI usage.
Review Ask
If you maintain an MCP server, the most useful feedback is whether the rule taxonomy catches real review concerns without making misleading claims. The goal is narrow technical review, not endorsement.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mcp_risk_linter-0.1.0.tar.gz.
File metadata
- Download URL: mcp_risk_linter-0.1.0.tar.gz
- Upload date:
- Size: 10.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
61ebcae3652aa0f6f007f96bc665d684c69197bc85955c13f1923dff376d5e4f
|
|
| MD5 |
5d7f2f4329e9caa8c39e1910ed1fc1ac
|
|
| BLAKE2b-256 |
f695d1a5628b017aa99f25d739d3a2a11002573980cd4ccb2e8710f39772e61e
|
File details
Details for the file mcp_risk_linter-0.1.0-py3-none-any.whl.
File metadata
- Download URL: mcp_risk_linter-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7aec953a54c4379cc2e4d78f8ed208b52a6786bcc836964ed1156697d4e29390
|
|
| MD5 |
d747676bb564046e27f959c5c72b9819
|
|
| BLAKE2b-256 |
64add0dc6824d20f11fd31d05baee868f822da48bf3c9ab6fa13be9adc92690c
|