MCP.so
登录

MCP SSE Client-Server

@flyingcloud-code

基本信息

分类

其他

许可证

MIT

传输方式

stdio

作者

flyingcloud-code

关于 MCP SSE Client-Server

using sse in client and server

MCP SSE Client-Server 配置

使用下面的配置,将此服务器添加到你的 MCP 客户端。

{
  "mcpServers": {
    "mcp-sse-client-server": {
      "command": "uv",
      "args": [
        "venv"
      ]
    }
  }
}

MCP SSE Client-Server 工具

工具列表暂未提供

当前收录暂时没有可展示的工具列表,不代表服务没有工具。请查阅项目文档了解支持的能力。

工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。

概览

What is MCP SSE Client-Server?

A Python implementation of an MCP client and server that communicates using Server-Sent Events (SSE). It integrates with MCP platform tools for web search, content retrieval, and date/weather utilities, and is intended for developers building asynchronous AI assistants.

How to use MCP SSE Client-Server?

Clone the repository, create a virtual environment, and install dependencies with uv sync .. Configure API keys in a .env file (OpenAI or OpenRouter). Start the server first with uv run mcp-server-search.py, then run the client with uv run mcp-client-sse.py --server http://localhost:8081/sse --verbose. Use --help for full options.

Key features of MCP SSE Client-Server

  • SSE-based communication between client and server
  • Integration with MCP platform tools (google_search, get_web_content)
  • Asynchronous processing using Python's asyncio
  • Comprehensive logging and error handling
  • OpenAI API integration with fallback to OpenRouter
  • Environment variable configuration support

Use cases of MCP SSE Client-Server

  • Perform web searches via the google_search MCP tool
  • Fetch full content of web pages with get_web_content
  • Retrieve the weekday for a given date
  • Get weather information for a specific date
  • Build real-time streaming AI assistants with MCP

常见问题

1

What runtime is required?

Python 3.10 or higher. Dependencies include httpx, python-dotenv, openai, and mcp[cli].

2

How do I configure API keys?

Create a `.env` file in the project root with either `OPENAI_API_KEY` or `OPENROUTER_API_KEY`. Optionally set custom base URLs.

3

What transport does the server use?

The server uses Server-Sent Events (SSE) over HTTP. The default server URL is `http://localhost:8081/sse`.

4

Where are logs stored?

The client writes logs to `mcp-client.log` with timestamps and detailed information.

5

Can I use OpenRouter instead of OpenAI?

Yes. If you set `OPENROUTER_API_KEY` in your `.env` file, the client will fall back to OpenRouter. You can also specify a custom base URL.

评论

其他 分类下的更多 MCP 服务器