mcp-sdk

Implement MCP servers and clients in Python with tools, resources, and prompts.

Updated Feb 8, 2026
One-click install
npx skills add https://github.com/ramshan00/hackaton --skill mcp-sdk-ramshan00
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mcp-sdk
Source: https://github.com/ramshan00/hackaton/tree/main/Hackathon2-phase3/.claude/skills/mcp-sdk
Command: npx skills add https://github.com/ramshan00/hackaton --skill mcp-sdk-ramshan00

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires mcp, and includes scripts (resource) and references (resource) components.

What problem does it solve? Building services that communicate with LLM applications requires implementing the Model Context Protocol specification correctly, including transports, authentication, and message handling, which is complex to do from scratch. ## Core Features & Use Cases - FastMCP Server Creation: Build MCP servers exposing tools, resources, and prompts using simple Python decorators with automatic parameter validation. - Client Development with OAuth: Connect to any MCP server with OAuth authentication and token storage for secure sessions. - Multiple Transports: Run servers over stdio, SSE, or Streamable HTTP, with stateful or stateless operation modes. - Use Case: Expose your internal database or API as MCP tools so Claude Code or other MCP clients can query it through a standardized protocol. ## Quick Start Ask the AI to create an MCP server using FastMCP with a tool, a resource, and a prompt, then run it with the streamable-http transport on port 3000.

Frequently Asked Questions about mcp-sdk

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create an MCP server in Python?

Install the SDK with pip install "mcp[cli]", then create a FastMCP instance and register functions with the @mcp.tool(), @mcp.resource(), and @mcp.prompt() decorators. Call mcp.run() with your chosen transport to start the server.

How to add tools to a FastMCP server?

Decorate any Python function with @mcp.tool() and provide type hints for its parameters. FastMCP uses the type hints for automatic parameter validation, and both sync and async functions are supported.

What transport protocols does the MCP Python SDK support?

The SDK supports three transports: stdio for stdin/stdout communication, SSE for Server-Sent Events streaming, and Streamable HTTP for HTTP-based bidirectional communication. Select the transport when calling mcp.run().

Does the MCP Python SDK support OAuth authentication?

Yes, clients can use OAuthClientProvider with a custom TokenStorage implementation to handle OAuth flows. You configure client metadata, redirect handlers, and callback handlers, then pass the provider to the streamable HTTP client.

What is the difference between stateful and stateless MCP servers?

Stateful servers maintain session state across requests and are the default. Stateless servers, enabled with stateless_http=True, keep no session persistence between requests and suit serverless deployments, optionally combined with json_response=True.