SkillTide Submit
Official description2 sourcesOpen source2d ago
nicholas5568/python-mcp-server-client

nicholas5568/python-mcp-server-client

View on GitHub ↗Direct link · no redirect page
Star count
0 ★ · nicholas5568/python-mcp-server-client · read from the GitHub search API · (checked 2026-10-16 20:00:20)
Source
read directly from its GitHub page · type: open-source project
Harvest history
first seen 2026-10-15 · last seen 2026-10-16 · seen 2× · listed by 2 sources
Score
score 203 · 2 sources · repo
FAQ (answers come from our records)
How do I install it?
We did not find an install command for this repository (our install coverage is only about 4%). Check its README or releases page.
Who is it for?
We filed it under these tags: 开源项目. The tags come from the entry itself, not a taxonomy we imposed.
Who maintains it?
repository nicholas5568/python-mcp-server-client;first catalogued 2026-10-15;last seen 2026-10-16。There is no official certification or quality rating here — we record sources and dates only.
Third-party quality signals

Python 从0到1构建MCP Server & Client

以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →

中文 | English
简介
MCP Server 是实现模型上下文协议(MCP)的服务器,旨在为 AI 模型提供一个标准化接口,连接外部数据源和工具,例如文件系统、数据库或 API。
MCP 的优势
在 MCP 出现前,AI 调用工具基本通过 Function Call 完成,存在以下问题:
1. 不同的大模型厂商 Function Call 格式不一致
2. 大量 API 工具的输入和输出格式不一致,封装管理繁琐
MCP 相当于一个统一的 USB-C,不仅统一了不同大模型厂商的 Function Call 格式,也对相关工具的封装进行了统一。
MCP 传输协议
目前 MCP 支持两种主要的传输协议:
1. **Stdio 传输协议**
- 针对本地使用
- 需要在用户本地安装命令行工具
- 对运行环境有特定要求
2. **SSE(Server-Sent Events)传输协议**
- 针对云服务部署
- 基于 HTTP 长连接实现
项目结构
MCP Server
- Stdio 传输协议(本地)
- SSE 传输协议(远程)
MCP Client(客户端)
- 自建客户端(Python)
- Cursor
- Cline
环境配置
1. 安装 UV 包
**MacOS/Linux:**
**Windows:**
2. 初始化项目
构建工具函数
为了让大模型能访问市面上主流框架的技术文档,我们主要通过用户输入的 query,结合指定 site 特定域名的谷歌搜索进行搜索相关网页,并对相关网页进行解析提取网页文本并返回。
1. 构建相关文档映射字典
2. 构建 MCP 工具
封装 MCP Server (基于 Stdio 协议)
1. MCP Server (Stdio)
启动命令:
2. 客户端配置
2.1 基于 Cline
首先在 Visual Studio Code 安装 Cline 插件,然后进行配置 MCP
成功绑定如图(左侧绿灯):
2.2 基于 Cursor
项目根目录创建 .cursor 文件夹,并创建 mcp.json 文件,如:
然后粘贴以下内容到 mcp.json
成功配置如图:
在 Features 开启 MCP 服务
通过对话它便通过 MCP 获取相关文档信息进行回答:
构建 SSE MCP Server (基于 SSE 协议)
1. 封装 MCP Server
启动命令:
以上 MCP server 代码直接在你的云服务器跑即可。
2. 构建 MCP Client
启动命令:
Client 日志:
Server 日志:
以上便是 Python 从 0 到 1 搭建 MCP Server 以及 MCP Client 的完整教程。有不对的地方请多多指教。
参考相关资料:
- https://www.youtube.com/watch?v=Ek8JHgZtmcI
- https://serper.dev/
- https://modelcontextprotocol.io/quickstart/server
- https://modelcontextprotocol.io/quickstart/client
- https://docs.cursor.com/context/model-context-protocol
Source
github · https://github.com/nicholas5568/python-mcp-server-client
Browse by field
Open source
added
yesterday

More in Open source

All 731 in Open source →

Filed under

Every tag opens the full list for that filter. Counts are the live catalogue figures.

Browse all fields →

← Back to index