Vibe Coding Discover

MCP

python-sdk

View on GitHub

The official Python SDK for Model Context Protocol servers and clients

★ 24K3,990 forksPythonMITmodelcontextprotocol

Official Python SDK for the Model Context Protocol (v2). It lets you build MCP servers and clients over stdio, Streamable HTTP and SSE, turning type-hinted Python functions into tools, resources and prompts, with a CLI for dev and inspection.

Use Cases

Build MCP servers exposing toolsresources and prompts to LLM hostsBuild MCP clients connecting to any MCP serverExpose local Python functions as LLM-callable toolsServe MCP over Streamable HTTP or SSE for deploymentLaunch and debug servers locally with mcp dev and MCP InspectorAdd auth/session handling for hosted MCP serversIntegrate LLM apps with standardized context and tool protocols

Built With

Language
Python
Frameworks
Model Context Protocol · Pydantic · AnyIO · Starlette · Uvicorn · Typer · Hatchling · MkDocs

Tags

mcp · python-sdk · mcp-server · mcp-client · model-context-protocol · stdio-transport · streamable-http · sse · tools · resources · prompts · cli · async · pydantic · json-schema