{"id":28768028,"url":"https://github.com/sidharthrajaram/mcp-sse","last_synced_at":"2026-01-17T01:49:04.560Z","repository":{"id":274550062,"uuid":"923229089","full_name":"sidharthrajaram/mcp-sse","owner":"sidharthrajaram","description":"A working pattern for SSE-based MCP clients and servers","archived":false,"fork":false,"pushed_at":"2025-03-06T19:29:40.000Z","size":22,"stargazers_count":279,"open_issues_count":7,"forks_count":44,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-06-17T13:07:18.042Z","etag":null,"topics":["agents","llm","mcp","tool-use"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sidharthrajaram.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-27T21:18:56.000Z","updated_at":"2025-06-16T15:32:36.000Z","dependencies_parsed_at":"2025-01-28T01:24:52.705Z","dependency_job_id":"1965e03f-ecc6-4da4-b8bf-e40140ee986d","html_url":"https://github.com/sidharthrajaram/mcp-sse","commit_stats":null,"previous_names":["sidharthrajaram/mcp-sse"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sidharthrajaram/mcp-sse","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sidharthrajaram%2Fmcp-sse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sidharthrajaram%2Fmcp-sse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sidharthrajaram%2Fmcp-sse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sidharthrajaram%2Fmcp-sse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sidharthrajaram","download_url":"https://codeload.github.com/sidharthrajaram/mcp-sse/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sidharthrajaram%2Fmcp-sse/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28491667,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T00:50:05.742Z","status":"ssl_error","status_checked_at":"2026-01-17T00:43:11.982Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agents","llm","mcp","tool-use"],"created_at":"2025-06-17T13:02:48.211Z","updated_at":"2026-01-17T01:49:04.552Z","avatar_url":"https://github.com/sidharthrajaram.png","language":"Python","funding_links":[],"categories":["📚 Projects (1974 total)","🤖 AI/ML","APIs and HTTP Requests","MCP Frameworks and libraries"],"sub_categories":["MCP Servers","Python"],"readme":"# SSE-based Server and Client for [MCP](https://modelcontextprotocol.io/introduction)\n\n[![smithery badge](https://smithery.ai/badge/@sidharthrajaram/mcp-sse)](https://smithery.ai/server/@sidharthrajaram/mcp-sse)\n\nThis demonstrates a working pattern for SSE-based MCP servers and standalone MCP clients that use tools from them. Based on an original discussion [here](https://github.com/modelcontextprotocol/python-sdk/issues/145).\n\n## Usage\n\n**Note**: Make sure to supply `ANTHROPIC_API_KEY` in `.env` or as an environment variable.\n\n```\nuv run weather.py\n\nuv run client.py http://0.0.0.0:8080/sse\n```\n\n```\nInitialized SSE client...\nListing tools...\n\nConnected to server with tools: ['get_alerts', 'get_forecast']\n\nMCP Client Started!\nType your queries or 'quit' to exit.\n\nQuery: whats the weather like in Spokane?\n\nI can help you check the weather forecast for Spokane, Washington. I'll use the get_forecast function, but I'll need to use Spokane's latitude and longitude coordinates.\n\nSpokane, WA is located at approximately 47.6587° N, 117.4260° W.\n[Calling tool get_forecast with args {'latitude': 47.6587, 'longitude': -117.426}]\nBased on the current forecast for Spokane:\n\nRight now it's sunny and cold with a temperature of 37°F and ...\n```\n\n## Why?\n\nThis means the MCP server can now be some running process that agents (clients) connect to, use, and disconnect from whenever and wherever they want. In other words, an SSE-based server and clients can be decoupled processes (potentially even, on decoupled nodes). This is different and better fits \"cloud-native\" use-cases compared to the STDIO-based pattern where the client itself spawns the server as a subprocess.\n\n### Installing via Smithery\n\nTo install SSE-based Server and Client for Claude Desktop automatically via [Smithery](https://smithery.ai/server/@sidharthrajaram/mcp-sse):\n\n```bash\nnpx -y @smithery/cli install @sidharthrajaram/mcp-sse --client claude\n```\n\n### Server\n\n`weather.py` is a SSE-based MCP server that presents some tools based on the National Weather Service APIs. Adapted from the MCP docs' [example STDIO server implementation.](https://modelcontextprotocol.io/quickstart/server)\n\nBy default, server runs on 0.0.0.0:8080, but is configurable with command line arguments like:\n\n```\nuv run weather.py --host \u003cyour host\u003e --port \u003cyour port\u003e\n```\n\n### Client\n\n`client.py` is a MCP Client that connects to and uses tools from the SSE-based MCP server. Adapted from the MCP docs' [example STDIO client implementation.](https://modelcontextprotocol.io/quickstart/client)\n\nBy default, client connects to SSE endpoint provided in the command line argument like:\n\n```\nuv run client.py http://0.0.0.0:8080/sse\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsidharthrajaram%2Fmcp-sse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsidharthrajaram%2Fmcp-sse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsidharthrajaram%2Fmcp-sse/lists"}