Provides a unified FastAPI server for interacting with multiple language model APIs, enabling seamless switching between...
Created byApr 23, 2025
MCP Server
[ ](README.zh-CN.md)
Project Overview
Built on FastAPI and MCP (Model Context Protocol), this project enables standardized context interaction between AI models and development environments. It enhances the scalability and maintainability of AI applications by simplifying model deployment, providing efficient API endpoints, and ensuring consistency in model input and output, making it easier for developers to integrate and manage AI tasks.
MCP (Model Context Protocol) is a unified protocol for context interaction between AI models and development environments. This project provides a Python-based MCP server implementation that supports basic MCP protocol features, including initialization, sampling, and session management.
Features
**JSON-RPC 2.0**: Request-response communication based on standard JSON-RPC 2.0 protocol
**SSE Connection**: Support for Server-Sent Events connections for real-time notifications
**Modular Design**: Modular architecture for easy extension and customization
**Asynchronous Processing**: High-performance service using FastAPI and asynchronous IO
**Complete Client**: Includes a full test client implementation
Project Structure
Installation
Clone the repository:
Install dependencies:
Usage
Starting the Server
By default, the server will start on `127.0.0.1:12000`. You can customize the host and port using environment variables:
Running the Client
Run the client in another terminal:
If the server is not running at the default address, you can set an environment variable: