mcp-sse  by sidharthrajaram

SSE pattern for MCP clients/servers

created 6 months ago
293 stars

Top 91.2% on sourcepulse

GitHubView on GitHub
Project Summary

This repository provides a working pattern for Server-Sent Events (SSE)-based Message Communication Protocol (MCP) clients and servers. It enables decoupled processes for agents to connect to, use, and disconnect from tools, fitting cloud-native use cases better than traditional STDIO-based patterns.

How It Works

The project leverages SSE for communication, allowing MCP servers and clients to be independent, potentially distributed processes. This contrasts with STDIO-based MCP where the client spawns the server as a subprocess. The weather.py script acts as an SSE-based MCP server, exposing tools like get_alerts and get_forecast powered by National Weather Service APIs. The client.py script demonstrates an MCP client connecting to this SSE endpoint to utilize the provided tools.

Quick Start & Requirements

  • Install via Smithery: npx -y @smithery/cli install @sidharthrajaram/mcp-sse --client claude
  • Run server: uv run weather.py
  • Run client: uv run client.py http://0.0.0.0:8080/sse
  • Requires ANTHROPIC_API_KEY environment variable.
  • Dependencies: uv (ASGI server), Python.

Highlighted Details

  • SSE-based communication for decoupled server/client processes.
  • Demonstrates a pattern for cloud-native agent architectures.
  • Includes example tools for weather forecasting.

Maintenance & Community

No specific community links or maintenance details are provided in the README.

Licensing & Compatibility

The README does not explicitly state a license.

Limitations & Caveats

The project is presented as a "working pattern" and example, implying it may not be production-ready without further development. No specific limitations or caveats are mentioned.

Health Check
Last commit

4 months ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
65 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.