MCP ExplorerExplorer

Mcp Sse Python

@owenliangon 9 months ago
10 MIT
FreeCommunity
AI Systems
mcp-sse-python is a server-client application for handling server-sent events.

Overview

What is Mcp Sse Python

mcp-sse-python is a server-client application designed for handling server-sent events, enabling real-time communication between a server and clients.

Use cases

Use cases include live sports scores updates, stock market tickers, chat applications, and any interactive web application that benefits from real-time data streaming.

How to use

To use mcp-sse-python, run the server using ‘python sse_server.py’ and the client using ‘python sse_client.py’. Configure the client with the appropriate server URL.

Key features

Key features include real-time event handling, easy configuration for server connections, and support for automatic approval of specific actions.

Where to use

mcp-sse-python can be used in web applications that require real-time updates, such as notifications, live feeds, or any scenario where the server needs to push updates to clients.

Content

mcp-sse-python

本地测试运行

$ python sse_server.py
?[32mINFO?[0m:     Started server process [?[36m20456?[0m]
?[32mINFO?[0m:     Waiting for application startup.
?[32mINFO?[0m:     Application startup complete.
?[32mINFO?[0m:     Uvicorn running on ?[1mhttp://0.0.0.0:8000?[0m (Press CTRL+C to quit)
$ python sse_client.py
URL:http://baidu.com
meta=None content=[TextContent(type='text', text='<html>\n<meta http-equiv="refresh" content="0;url=http://www.baidu.com/">\n</html>\n', annotations=None)] isError=False

开源客户端配置

{
  "mcpServers": {
    "website-fetcher": {
      "url": "http://localhost:8000/sse",
      "disabled": false,
      "autoApprove": [
        "fetch"
      ]
    }
  }
}

Tools

No tools

Comments

Recommend MCP Servers

View All MCP Servers