该项目与官方 MCP 示例(STDIO 版)有何不同?
原版使用 STDIO 通信且依赖 Anthropic LLM;本版本改用 SSE 通信,使服务器和客户端可解耦运行,同时将 LLM 调用切换为 OpenRouter.ai。
@jayliangdl
基本信息
MCP Client 与 MCP Server基于SSE方式的样例实现(Python版本)
使用下面的配置,将此服务器添加到你的 MCP 客户端。
{
"mcpServers": {
"py-mcp-sse": {
"command": "uv",
"args": [
"venv"
]
}
}
}工具列表暂未提供
当前收录暂时没有可展示的工具列表,不代表服务没有工具。请查阅项目文档了解支持的能力。
工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。
Jay-py-mcp-sse 是一个 MCP(Model Context Protocol)客户端和服务器的样例实现(Python 版本),采用 SSE(Server‑Sent Events)通信模式。它集成了古腾堡计划 API 的图书搜索工具,并使用 OpenRouter.ai 作为 LLM 调用平台(替换了原版的 Anthropic LLM)。该项目面向希望学习或搭建 MCP SSE 模式的开发者。
使用 uv 或 pip 安装依赖,复制 .env.sample 为 .env 并填入 OpenRouter API 密钥。先运行 mcp_server.py 启动服务器(可选 --host 和 --port 参数),再运行 client.py 并传入服务器的 SSE URL(如 http://localhost:8080/sse)连接并使用工具。
原版使用 STDIO 通信且依赖 Anthropic LLM;本版本改用 SSE 通信,使服务器和客户端可解耦运行,同时将 LLM 调用切换为 OpenRouter.ai。
需要 Python 3.13 或更高版本,以及 uv 或 pip 包管理器。还需在 `.env` 文件中配置有效的 OpenRouter API 密钥。
先运行 `uv run mcp_server.py`(可添加 `--host` 和 `--port` 指定地址),然后运行 `uv run client.py http://<host>:<port>/sse` 连接。
主要文件:`mcp_server.py`(SSE 服务器)、`client.py`(MCP 客户端)、`.env.sample`(环境变量示例)、`pyproject.toml`(依赖管理)。
确认 Python 版本 ≥ 3.13、环境变量 `OPENROUTER_API_KEY` 已正确填写、所有依赖已安装、端口未被占用(可用 `--port` 更换端口)。
AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents
A curated list of references for MLOps

Soar Flight Booking MCP is a remote MCP server available at https://mcp.soar.flights.

Health by Dr Brad works out a health plan from your own results: which screening is due at your age, and evidence-based suggestions, each with the reason and the published guideline or study behind it. Your record is one
🔥 MaxKB is an open-source platform for building enterprise-grade agents. 强大易用的开源企业级智能体平台。
评论