python-sdk

modelcontextprotocol/python-sdk
★ 22,124 stars Python Code/Dev Tools Updated 8mo ago ✗ Risk
The official Python SDK for Model Context Protocol servers and clients
View on GitHub → 🛡️ Security & TRiSM Audit →

⚡ What This Server Does & Key Capabilities

The official Python SDK for the Model Context Protocol, providing the core abstractions for building and consuming MCP servers and clients.

Core Agent Capabilities

💡 Example Prompts to Ask Your AI Agent

Once installed in Claude Desktop or Cursor, try asking your assistant:

"Create a minimal Python MCP server using the official SDK that exposes a calculator tool."
"Connect an MCP client to a local stdio server and list its available resources."

Compatible AI Clients

🟣 Claude Desktop ⚡ Cursor IDE 💻 Claude Code CLI 🌊 Windsurf 🤖 Gemini CLI

Quick Install

Copy the config for your editor. Verify environment variables or setup notes in the README.

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "python-sdk": {
      "command": "uvx",
      "args": [
        "python-sdk"
      ]
    }
  }
}

Or install with pip: pip install python-sdk

⚡
Building Production MCP Agents? PRO TOOLKITS
Get the Complete 31,400+ MCP Ecosystem Dataset ($29) or the FastMCP + TypeScript Starter Kit ($39) with turnkey Docker & Cloudflare deployment.