About Model Context Protocol (MCP)
A demo MCP server and client using Streamable HTTP transport, with automatic tool registration through an @mcp_tool decorator. It includes a Dockerfile and environment setup, suited to learning MCP implementation or as a starting point for deployment.
Key features
- 01Stateless server with Streamable HTTP transport
- 02Automatic tool registration via @mcp_tool decorator
- 03Dockerfile for containerized deployment
- 04Demo client built on the OpenAI SDK
Use cases
- 01Learning how an MCP server and client are implemented
- 02Containerizing the demo server for cloud deployment
- 03Reviewing a Python pattern for tool registration
MCP support
The project includes an MCP server that exposes tools over Streamable HTTP transport, along with an MCP client example built on the OpenAI SDK.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEModel Context Protocol (MCP)
The Model Context Protocol (MCP) is a powerful framework that enables developers to build AI applications with large language models (LLMs) by providing a standardized way to connect models with external data sources and tools.
MCP is nothing but a protocol to connect LLMs with external data sources and tools (functions).
MCP Server
This repository contains the code for setting up a demo MCP server. It contains:
- A stateless MCP server with streamable HTTP transport for scalable production deployment.
- Auto tool registry with
@mcp_tooldecorator. - Docker file to containerize the server.
- Server can be run locally or in docker and deployed to any cloud provider.
Setup
- Install uv
curl -LsSf https://astral.sh/uv/install.sh | sh
- Install dependencies
uv sync
MCP Client
This repository contains the code for setting up a demo MCP client with OpenAI SDK. Refer to the client for more details.
Note: For ease of understanding, both server and client are in the same repository, you can easily keep them in separate repositories / projects.
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.