Skip to main content

mcp-config-check

CI PyPI Python License: MIT

A small Python linter for Model Context Protocol config files used by Claude Desktop, Cursor, Cline, Windsurf, and Zed.

It catches common footguns before you start a broken MCP server:

  • missing or conflicting transport (no command and no url, or both set)
  • malformed command / args / env shapes
  • hardcoded API keys in env or args (Anthropic, OpenAI, AWS, GitHub, Stripe, Slack, Google, HuggingFace, and more)
  • placeholder values left in ("<your-api-key>", "replace-me", etc.)
  • URLs with embedded credentials (https://user:pass@...)
  • auth headers sent over plain HTTP
  • autoApprove: ["*"] / alwaysAllow: ["*"] wildcards that silently disable tool confirmation
  • case-insensitive duplicate server names
  • unknown fields in a server entry

Supports both the Claude/Cursor/Cline/Windsurf shape (mcpServers) and the Zed shape (context_servers).

Install

pip install mcp-config-check

Usage

mcp-config-check path/to/mcp.json

Multiple files:

mcp-config-check ~/Library/Application\ Support/Claude/claude_desktop_config.json ~/.cursor/mcp.json

Only show errors (no OK lines, no warnings):

mcp-config-check --quiet path/to/mcp.json

Exit status: 0 on no errors, 1 on any errors.

Use as a library

from mcp_config_check import validate_config_file

result = validate_config_file("path/to/mcp.json")
if not result.ok:
    for issue in result.errors:
        print(issue.code, issue.server, issue.message)

Issue codes

Code Severity Meaning
E000 error file-level problem (missing, empty, not JSON, wrong root shape)
E001 error server has no transport (command or url required)
E002 error server declares both command and url
E003 error command is not a non-empty string
E004 error args is not an array of strings
E005 error hardcoded secret detected in args
E006 error env is not a string-valued object
E007 error hardcoded secret detected in env value
E008 error env value is an obvious placeholder
E020 error url is invalid or has a non-http(s) scheme
E021 error url has embedded credentials
E022 error Authorization header sent over plain HTTP
E030 error no mcpServers or context_servers container found
E031 error case-insensitive duplicate server name
E100 error autoApprove / alwaysAllow contains "*"
W030 warning server container is empty
W900 warning unknown field on a server entry

Development

pip install -e '.[dev]'
pytest

License

MIT

Metadata

Release files for mcp-config-check 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-config-check 0.1.0
File Size Uploaded Provenance
mcp_config_check-0.1.0.tar.gz 8.1 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for mcp-config-check 0.1.0
File Interpreter ABI Platform
mcp_config_check-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 16.9 kB

Release files / mcp_config_check-0.1.0.tar.gz

Download URL mcp_config_check-0.1.0.tar.gz
Size 8.1 kB
Tags Source
SHA-256 checksum
How to use checksums
e8e92826f8f64e140dc142604ca43c75757972b2fcd24b10273dd17205fef9fa
BLAKE2b-256 checksum
How to use checksums
5158d0e5e98a0f44d7973464d4dbc6c038f15fc6fa55c878666694c5afa84cdf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

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

Download URL mcp_config_check-0.1.0-py3-none-any.whl
Size 8.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
60e7683107dd297f7bbf6913a26945243d7e115cf291a1c0f406671360f801b4
BLAKE2b-256 checksum
How to use checksums
ec60d75b16078b593755dc357c192b410c81e2c2272df6e4da476778d94edc85
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Security for mcp-config-check 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