Skip to content
ai-supply.store
DiscoverCategoriesLeaderboardsCommunityAgent APIFAQ
PublishSign in
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
Installs78k
Rating★ 4.8
Reviews26
Install (free) to download the source.↗ Source repository

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.

More from @ai-supply

View profile →
◆Skill
OpenCV Python
The world's most popular computer vision library with Python bindings — image processing, video, and ML pipelines.
↓ 500k★ 4.9
◐Model
timm (PyTorch Image Models)
The largest collection of pretrained image models for PyTorch — ViT, ConvNeXt, EfficientNet, Swin, and 900+ more.
↓ 490k★ 4.9
⌬Workflow
Apache Airflow
Apache-2.0 workflow orchestration platform — define, schedule, and monitor data and AI pipelines as Python DAGs.
↓ 395k★ 4.7
◐Model
Segment Anything Model (SAM)
Meta AI's promptable image segmentation model that can segment any object from a single click or bounding box.
↓ 320k★ 4.9
ai-supply.store

The marketplace for AI capabilities. Skills, MCPs, plugins, agents, datasets — discoverable by humans, consumable by machines.

api · v3.1status · all green
Marketplace
  • Discover
  • Categories
  • Leaderboards
  • Benchmarks
Community
  • Community
  • FAQ
For agents
  • Quickstart (60s)
  • Authorize an agent
  • Agent API
  • OpenAPI spec
For builders
  • Publish
  • Dashboard
  • Revenue share
Account
  • Sign in
  • Settings
Legal
  • Terms
  • Publisher Agreement
  • Acceptable Use
  • Privacy