Skip to content
ai-supply.store
DiscoverCategoriesLeaderboardsCommunityAgent APIFAQ
Sign inSign up free
catalog / Agentic capability / MCP Python SDK
⊕PluginAgentic capabilityFree

MCP Python SDK

Official MIT-licensed Python SDK for the Model Context Protocol — build MCP servers and clients with full spec compliance.

@ai-supply
Installs90k
⟳ upstream v1.28.1 · updated 1mo ago
↗ Source repository
← More Agentic capabilityAgentic capability leaderboard →How we grade security →Source ↗
! Grade B · 88/100 · ReviewSecurity assessment
✓No compromise signals30capabilities surfaced1known CVE7of 20 OWASP controls clear
Internal host / private infrastructure referenceBroad capability surfacePotentially unbounded loopSuspicious network references
scanned 16d ago·osv · gitleaks · opengrep · picklescan + heuristics·full breakdown in the Security tab ↓

MCP Python SDK

The MCP Python SDK is the official reference implementation of the Model Context Protocol from Anthropic's modelcontextprotocol organization. It provides the full low-level API for building both MCP servers (expose tools, resources, prompts) and MCP clients (connect to any MCP server), with complete spec compliance and async support.

Key features

  • Full MCP spec implementation: tools, resources, resource templates, prompts, sampling, roots
  • Both server and client APIs in one package
  • Stdio and SSE transport support
  • Async-first using Python's asyncio + anyio
  • Pydantic models for all protocol messages — fully typed
  • MIT license — use in any project, commercial or open-source

Quick start (server)

pip install mcp
from mcp.server import Server
from mcp.server.stdio import stdio_server
from mcp.types import Tool, TextContent

app = Server("my-server")

@app.list_tools()
async def list_tools():
    return [Tool(name="echo", description="Echo a message", inputSchema={
        "type": "object",
        "properties": {"message": {"type": "string"}},
        "required": ["message"]
    })]

@app.call_tool()
async def call_tool(name: str, arguments: dict):
    if name == "echo":
        return [TextContent(type="text", text=arguments["message"])]

async def main():
    async with stdio_server() as (r, w):
        await app.run(r, w, app.create_initialization_options())

import asyncio; asyncio.run(main())

Install via ai-supply

npx ai-supply add mcp-python-sdk

Curated mirror of the open-source MCP Python SDK (MIT). Get it from the source.

Rating rank
#1
of 35 in Agentic capability
Install rank
#20
of 35 in Agentic capability
Security score
88/100 · B
review
Security rank
#13
of 35 in Agentic capability
Installs
90k
cat avg 186k
This listing vs category average
Installs
this
cat avg
Security (of 100)
this
cat avg
Adoption trend
See the Agentic capability leaderboard →
! Security: Review · 8888/100 · grade Bscanned 16d ago
✓ no compromise signals31 risk-surface · 8/20 OWASP controls flagged

Compromise signals — malicious or tampered code (leaked secrets, backdoors, a dropped executable) — reduce the score, and known dependency CVEs carry a bounded penalty (they warrant review but never QUARANTINE — update the dependency to clear). Other dangerous-by-capability traits are risk surface, expected for some capabilities. Every finding is mapped to its OWASP control below.

What this capability can do · high confidence (static)
Tools (60)
addmy_toolget_timerefresh_dashboardrefresh_reportadd_noteadd_tasklist_noteswhoamiforecastsearch_bookslookup_bookreserve_bookissue_cardclient_featuresdescribe_catalogenable_recommendationsrefundedit_notebook_tablepay_depositconfirm_depositbuyredeem
⚑ filesystem⚑ shell⚑ network⚑ secrets
egress → stackoverflow.com, py.sdk.modelcontextprotocol.io, conformance-test.local, pkg.pr.new, api.cloudflare.com, www.contributor-covenant.org, docs.astral.sh, blog.modelcontextprotocol.io +32
mcp: sqlitemcp: puppeteer/review-pr

Findings mapped to the OWASP Top 10 for LLM Applications (2025) and the OWASP Machine Learning Security Top 10. Expand any flagged control for the exact findings — compromise reduces the score; expected/risk-surface do not, except a known CVE, which carries a small bounded penalty (high/critical → Review).

OWASP Top 10 for LLM Applications
⚠LLM03Supply Chainhigh
Vulnerable/compromised dependencies, models or archives in the artifact.
•Dependency manifest — 4 pip requirements declared · modelcontextprotocol-python-sdk-74a242a/examples/clients/simple-chatbot/mcp_simple_chatbot/requirements.txtrisk surface
•Vulnerable dependencies — 46 known vulnerabilities in: cairosvg@2.8.2, cryptography@46.0.7, idna@3.10, pillow@12.1.1, pygments@2.19.2, pyjwt@2.10.1, pymdown-extensions@10.16.1, pytest@8.4.2 (CWE-1395)known CVE · -12 pts
⚠LLM06Excessive Agencyhigh
Over-broad tool/permission surface or unrestricted egress.
•External endpoints declared — 1 distinct host(s) · modelcontextprotocol-python-sdk-74a242a/.claude/commands/review-pr.mdexpected
•External endpoints declared — 2 distinct host(s) · modelcontextprotocol-python-sdk-74a242a/.github/ISSUE_TEMPLATE/bug.yamlexpected
•External endpoints declared — 3 distinct host(s) · modelcontextprotocol-python-sdk-74a242a/.gitignoreexpected
•External endpoints declared — 9 distinct host(s) · modelcontextprotocol-python-sdk-74a242a/README.mdexpected
•External endpoints declared — 5 distinct host(s) · modelcontextprotocol-python-sdk-74a242a/docs/client/identity-assertion.mdexpected
•Broad capability surface — 3 high-impact capability categories referenced — verify least-privilege · modelcontextprotocol-python-sdk-74a242a/docs/get-started/installation.md (CWE-272)risk surface
•External endpoints declared — 11 distinct host(s) · modelcontextprotocol-python-sdk-74a242a/docs/get-started/installation.mdexpected
•External endpoints declared — 4 distinct host(s) · modelcontextprotocol-python-sdk-74a242a/docs/index.mdexpected
•External endpoints declared — 6 distinct host(s) · modelcontextprotocol-python-sdk-74a242a/docs/migration.mdexpected
•Egress to a private/loopback host — 127.0.0.1 · modelcontextprotocol-python-sdk-74a242a/docs/run/asgi.md (CWE-918)expected
•External endpoints declared — 7 distinct host(s) · modelcontextprotocol-python-sdk-74a242a/tests/client/auth/extensions/test_client_credentials.pyexpected
•External endpoints declared — 19 distinct host(s) · modelcontextprotocol-python-sdk-74a242a/tests/client/test_auth.pyexpected
•Egress to a private/loopback host — 127.0.0.1, [::1] · modelcontextprotocol-python-sdk-74a242a/tests/server/auth/test_routes.py (CWE-918)expected
⚠LLM05Improper Output Handlingmedium
Code that pipes model/user output into shell, eval, SQL or paths unsafely.
•Encoded path traversal — percent/utf-8-encoded '../' sequence — bypasses naive path filters · modelcontextprotocol-python-sdk-74a242a/docs/migration.md (CWE-22)expected
•Suspicious code patterns — OS command execution · modelcontextprotocol-python-sdk-74a242a/scripts/gen_surface_types.py (CWE-78)expected
•Suspicious code patterns — dynamic code execution · modelcontextprotocol-python-sdk-74a242a/tests/client/auth/extensions/test_client_credentials.py (CWE-95)expected
⚠LLM07System Prompt Leakagemedium
Secrets, internal hosts or proprietary logic exposed in shipped prompts.
•Internal host / private infrastructure reference — shipped content references a private IP range or internal-only host · modelcontextprotocol-python-sdk-74a242a/.github/actions/conformance/client.py (CWE-200)risk surface
•Low-confidence secret match — possible: JWT · modelcontextprotocol-python-sdk-74a242a/tests/client/auth/extensions/test_client_credentials.py (CWE-798)risk surface
⚠LLM10Unbounded Consumptionmedium
Unbounded loops/recursion causing DoS or runaway cost.
Enforced at runtime by the gateway (rate limits + spend caps + size caps); static check flags unbounded loops.
•Potentially unbounded loop — an infinite loop (while True / while(1) / for(;;)) may cause runaway consumption · modelcontextprotocol-python-sdk-74a242a/docs/migration.md (CWE-835)risk surface
⚠LLM02Sensitive Information Disclosurelow
Secrets, credentials or PII shipped inside the artifact.
•Low-confidence secret match — possible: JWT · modelcontextprotocol-python-sdk-74a242a/tests/client/auth/extensions/test_client_credentials.py (CWE-798)risk surface
§LLM09MisinformationGovernance
Artifacts designed to produce false/deceptive output.
Detectable only by runtime behavioral evaluation; addressed via responsible-use attestation.
✓LLM01Prompt InjectionPassed
✓LLM04Data and Model PoisoningPassed
Backdoors/poisoning in training data or serialized models.
Behavioral poisoning needs model execution; static check covers unsafe serialization + dataset skew only.
✓LLM08Vector and Embedding WeaknessesPassed
PII or plaintext source leakage in embedding/vector exports.
Embedding inversion/poisoning is largely runtime; static check covers PII in vector exports.
OWASP Machine Learning Security Top 10
⚠ML06AI Supply Chainhigh
Compromised PyPI/npm packages, typosquats, unsafe serialized models.
•Dependency manifest — 4 pip requirements declared · modelcontextprotocol-python-sdk-74a242a/examples/clients/simple-chatbot/mcp_simple_chatbot/requirements.txtrisk surface
•Vulnerable dependencies — 46 known vulnerabilities in: cairosvg@2.8.2, cryptography@46.0.7, idna@3.10, pillow@12.1.1, pygments@2.19.2, pyjwt@2.10.1, pymdown-extensions@10.16.1, pytest@8.4.2 (CWE-1395)known CVE · -12 pts
⚠ML09Output Integritymedium
Middleware tampering with model outputs in transit.
Gateway enforces TLS + response integrity; static check flags output-rewriting code.
•Encoded path traversal — percent/utf-8-encoded '../' sequence — bypasses naive path filters · modelcontextprotocol-python-sdk-74a242a/docs/migration.md (CWE-22)expected
•Suspicious code patterns — OS command execution · modelcontextprotocol-python-sdk-74a242a/scripts/gen_surface_types.py (CWE-78)expected
•Suspicious code patterns — dynamic code execution · modelcontextprotocol-python-sdk-74a242a/tests/client/auth/extensions/test_client_credentials.py (CWE-95)expected
§ML01Input Manipulation (Adversarial)Governance
Models vulnerable to adversarial perturbations.
Requires runtime robustness evaluation; addressed via publisher robustness attestation.
§ML03Model InversionGovernance
Training data reconstructable from a model's outputs.
Runtime/evaluation property; addressed via model-card data-provenance + DP attestation.
§ML04Membership InferenceGovernance
Determining whether a record was in the training set.
Runtime/evaluation property; addressed via overfitting disclosure + DP attestation.
§ML08Model SkewingGovernance
Models trained on skewed data producing biased output.
Requires fairness evaluation; addressed via model-card bias/limitations disclosure.
✓ML02Data PoisoningPassed
Poisoned training datasets with triggers or anomalous distributions.
Static check covers trigger phrasing, PII and label skew; full poisoning detection is runtime.
✓ML05Model TheftPassed
Unlicensed re-distribution / license-incompatible derivatives.
Static check verifies license declaration; extraction throttling is runtime.
✓ML07Transfer Learning AttackPassed
Backdoored base models / LoRA adapters propagating to derivatives.
Backdoor detection needs behavioral probing; static check covers unsafe serialization + provenance.
✓ML10Model Poisoning (Weights)Passed
Tampered model weight files; integrity must be verifiable.
Static check enforces safe formats + records a content hash for downstream verification.
Other findings (16) · hygiene / uncategorized
•Unrecognized file type — '.git-blame-ignore-revs' is not on the allowlist · modelcontextprotocol-python-sdk-74a242a/.git-blame-ignore-revsrisk surface
•Unrecognized file type — '.gitattributes' is not on the allowlist · modelcontextprotocol-python-sdk-74a242a/.gitattributesrisk surface
•Unrecognized file type — '.gitignore' is not on the allowlist · modelcontextprotocol-python-sdk-74a242a/.gitignorerisk surface
•Unrecognized file type — '.?' is not on the allowlist · modelcontextprotocol-python-sdk-74a242a/LICENSErisk surface
•Suspicious network references — raw IP URL (1 URLs) · modelcontextprotocol-python-sdk-74a242a/docs/run/asgi.mdrisk surface
•Suspicious network references — raw IP URL (7 URLs) · modelcontextprotocol-python-sdk-74a242a/docs/run/authorization.mdrisk surface
•Suspicious network references — raw IP URL (2 URLs) · modelcontextprotocol-python-sdk-74a242a/docs_src/authorization/tutorial001.pyrisk surface
•Unrecognized file type — '.python-version' is not on the allowlist · modelcontextprotocol-python-sdk-74a242a/examples/clients/simple-chatbot/.python-versionrisk surface
•Suspicious network references — raw IP URL (3 URLs) · modelcontextprotocol-python-sdk-74a242a/examples/stories/README.mdrisk surface
•Suspicious network references — raw IP URL (4 URLs) · modelcontextprotocol-python-sdk-74a242a/examples/stories/bearer_auth/README.mdrisk surface
•Suspicious network references — raw IP URL (5 URLs) · modelcontextprotocol-python-sdk-74a242a/examples/stories/identity_assertion/README.mdrisk surface
•Suspicious network references — raw IP URL (15 URLs) · modelcontextprotocol-python-sdk-74a242a/tests/docs_src/test_asgi.pyrisk surface
•Suspicious network references — raw IP URL (6 URLs) · modelcontextprotocol-python-sdk-74a242a/tests/docs_src/test_troubleshooting.pyrisk surface
•Suspicious network references — raw IP URL (18 URLs) · modelcontextprotocol-python-sdk-74a242a/tests/server/auth/test_routes.pyrisk surface
•Suspicious network references — raw IP URL (14 URLs) · modelcontextprotocol-python-sdk-74a242a/tests/server/test_sse_security.pyrisk surface
•Suspicious network references — raw IP URL (8 URLs) · modelcontextprotocol-python-sdk-74a242a/tests/shared/test_streamable_http.pyrisk surface
✔ verified source · pinned modelcontextprotocol-python-sdk-74a242a
Check against a policy

The same gate an agent runs before installing (POST /api/v1/trust/mcp-python-sdk/check). Click a policy:

Consume MCP Python SDK programmatically. Authenticate with an API key or session — see Authorize an agent.

# Agents: CHECK BEFORE YOU INSTALL (no auth) — score, grade, level, capability manifest
curl https://ai-supply.store/api/v1/trust/mcp-python-sdk

# Gate against your org policy (returns { pass, violations })
curl -X POST https://ai-supply.store/api/v1/trust/mcp-python-sdk/check \
  -H "Content-Type: application/json" \
  -d '{"minGrade":"B","denyPermissions":["shell"],"denyUnknownEgress":true}'

# CLI
npx ai-supply add mcp-python-sdk

# REST (install → download)
curl -X POST https://ai-supply.store/api/v1/listings/mcp-python-sdk/install \
  -H "Authorization: Bearer $AIM_KEY"

# MCP tool
install_listing({ "slug": "mcp-python-sdk" })
OpenAPI spec →
vlatest
! Security: Review · 881mo ago

Curated mirror — latest upstream source. See the repository for tagged releases.

Sign in and install this listing to leave a review.

More from @ai-supply

View profile →
◉Agent
MetaGPT
Multi-agent framework that assigns GPT roles (PM, engineer, QA) to solve complex software tasks end-to-end.
↓ 1.0M
⇄Connector
vLLM
High-throughput, memory-efficient LLM inference engine with PagedAttention and continuous batching.
↓ 892k
⇄Connector
Meilisearch
Lightning-fast open-source search engine with typo-tolerance, semantic hybrid search, and sub-50ms response times.
↓ 811k
△Eval
Weights & Biases (wandb)
ML experiment tracking and visualization — log metrics, hyperparameters, models, and media in real time.
↓ 784k
ai-supply.store

Free, security-vetted AI capabilities — skills, MCPs, plugins, agents, datasets and more, each graded and freshness-tracked, and built for humans and agents alike.

api · v3.1status · all green
Contact
support@ai-supply.storesecurity@ai-supply.store
Catalog
  • Discover
  • Categories
  • Leaderboards
  • Benchmarks
  • Security
  • Scan a repo
Community
  • Community
  • FAQ
For agents
  • Quickstart (60s)
  • Authorize an agent
  • Agent API
  • OpenAPI spec
For builders
  • Publish
  • Dashboard
Account
  • Create account
  • Sign in
  • Settings
Legal
  • Terms
  • Publisher Agreement
  • Acceptable Use
  • Privacy