remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
Integrations
The README mentions using a .env file to supply the ANTHROPIC_API_KEY, indicating integration with dotenv for environment variable management.
基于 SSE 的MCP服务器和客户端
这演示了基于 SSE 的 MCP 服务器和使用其工具的独立 MCP 客户端的工作模式。基于此处的原始讨论。
用法
注意:确保在.env
中或作为环境变量提供ANTHROPIC_API_KEY
。
为什么?
这意味着 MCP 服务器现在可以是一个正在运行的进程,代理(客户端)可以随时随地连接、使用和断开连接。换句话说,基于 SSE 的服务器和客户端可以是解耦的进程(甚至可能位于解耦的节点上)。这与基于 STDIO 的模式(客户端本身会将服务器作为子进程生成)不同,并且更适合“云原生”用例。
通过 Smithery 安装
要通过Smithery自动为 Claude Desktop 安装基于 SSE 的服务器和客户端:
服务器
weather.py
是一个基于 SSE 的 MCP 服务器,它提供了一些基于国家气象局 API 的工具。改编自 MCP 文档中的示例 STDIO 服务器实现。
默认情况下,服务器在 0.0.0.0:8080 上运行,但可以使用命令行参数进行配置,例如:
客户
client.py
是一个 MCP 客户端,用于连接并使用基于 SSE 的 MCP 服务器的工具。代码改编自 MCP 文档中STDIO 客户端的示例实现。
默认情况下,客户端连接到命令行参数中提供的 SSE 端点,例如:
Appeared in Searches
- Weather Information Search
- Information about SSE (Server-Sent Events or related topics)
- Information about SSE (could refer to multiple meanings such as software, energy company, or a direction abbreviation)
- Search for SSE (Possible meanings include companies, concepts, or terms like Scottish and Southern Electricity, Secure Software Engineering, etc.)
- Search for information on SSE (Shared Socioeconomic Pathways, Scottish and Southern Energy, or Secure Sockets Extension)