by GobinFan · MCP Server · ★ 153
Python 从0到1构建MCP Server & Client 中文 | English 简介 MCP Server 是实现模型上下文协议(MCP)的服务器,旨在为 AI 模型提供一个标准化接口,连接外部数据源和工具,例如文件系统、数据库或 API。 MCP 的优势 在 MCP 出现前,AI 调用工具基本通过 Function Call 完成,存在以下问题: 不同的大模型厂商 Function Call 格式不一致 大量 API 工具的输入和输出格式不一致,封装管理繁琐 MCP 相当于一个统一的 USB-C,不仅统一了不同大模型厂商的 Function Call 格式,也对相关工具的封装进行了统一。 MCP 传输协议 目前 MCP 支持两种主要的传输协议: Stdio 传输协议 针对本地使用 需要在用户本地安装命令行工具 对运行环境有特定要求 SSE(Server-Sent Events)传输协议 针对云服务部署 基于 HTTP 长连接实现 项目结构 MCP Server Stdio 传输协议(本地) SSE 传输协议(远程) MCP Client(客户端) 自建客户端(Python) Cursor Cline 环境配置 安装 UV 包 MacOS/Linux: Windows: 初始化项目 构建工具函数
| Stars | 153 |
| Forks | 38 |
| Language | Python |
| Category | MCP Server |
| Quality Score | 65.5042425007708/100 |
| Open Issues | 9 |
| Last Updated | 2025-05-05 |
| Created | 2025-03-15 |
| Platforms | cli, mcp, python |
| Est. Tokens | ~3k |
Explore other popular mcp server tools:
python-mcp-server-client is 支持查询主流agent框架技术文档的MCP server(支持stdio和sse两种传输协议), 支持 langchain、llama-index、autogen、agno、openai-agents-sdk、mcp-doc、camel-ai 和 crew-ai. It is categorized as a MCP Server with 153 GitHub stars.
python-mcp-server-client is primarily written in Python. It covers topics such as agent, llm, mcp.
You can find installation instructions and usage details in the python-mcp-server-client GitHub repository at github.com/GobinFan/python-mcp-server-client. The project has 153 stars and 38 forks, indicating an active community.