mcp-sse  by sidharthrajaram

SSE pattern for MCP clients/servers

Created 7 months ago
298 stars

Top 89.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

6 months ago

Responsiveness

1+ week

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

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), Elie Bursztein Elie Bursztein(Cybersecurity Lead at Google DeepMind), and
3 more.

inspector by modelcontextprotocol

2.8%
6k
Debugging tool for Model Context Protocol (MCP) servers
Created 11 months ago
Updated 1 day ago
Feedback? Help us improve.