# python-sdk

> MCP Server

This repository provides a Python implementation of the Model Context Protocol (MCP), offering tools and resources for building servers, managing context, and integrating with applications like Claude. It simplifies interaction

## Overview

- **Category:** Developer Tools
- **Language:** Python
- **Stars:** 23745
- **Forks:** 591
- **Owner:** modelcontextprotocol
- **GitHub:** https://github.com/modelcontextprotocol/python-sdk
- **Homepage:** https://modelcontextprotocol.io
- **Created:** 2024-09-24T21:01:35+00:00
- **Updated:** 2025-07-07T15:27:02+00:00
- **Source:** https://model-context-protocol.com/servers/python-sdk-model-context-protocol-integration

## Setup

## Setup

1.  **Adding MCP to your python project:** We recommend using [uv](https://docs.astral.sh/uv/) to manage your Python projects, add mcp to dependencies by `uv add "mcp[cli]"` or using pip for dependencies: `pip install mcp`.
2.  **Running the standalone MCP development tools:** To run the mcp command with uv: `uv run mcp`.

## Tools

## Available Tools

1.  **MCP Server:** Build MCP servers that expose resources, prompts and tools.
2.  **MCP Client:** Build MCP clients that can connect to any MCP server.
3.  **Resources:** Expose data to LLMs, similar to GET endpoints in a REST API.
4.  **Tools:** Let LLMs take actions through your server, expected to perform computation and have side effects.
5.  **Prompts:** Reusable templates that help LLMs interact with your server effectively.
6.  **Images:** Handle image data using the `Image` class.
7.  **Context:** Access MCP capabilities through the Context object in tools and resources.
8.  **MCP Inspector:** Test and debug your server in development mode.


## Related Articles

- [Building with python-sdk: Developer's Guide](https://model-context-protocol.com/blog/python-sdk-guide)
