Skip to content
Back to search

mcp-sse

A working pattern for SSE-based MCP clients and servers

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/sidharthrajaram--mcp-sse/badge.svg)](/listings/sidharthrajaram--mcp-sse)

HTML

<a href="/listings/sidharthrajaram--mcp-sse"><img src="/api/listings/sidharthrajaram--mcp-sse/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

To install SSE-based Server and Client for Claude Desktop automatically via [Smithery](https://smithery.ai/server/@sidharthrajaram/mcp-sse):

npx -y @smithery/cli install @sidharthrajaram/mcp-sse --client claude

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 67 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # SSE-based Server and Client for [MCP](https://modelcontextprotocol.io/introduction)
  2. [![smithery badge](https://smithery.ai/badge/@sidharthrajaram/mcp-sse)](https://smithery.ai/server/@sidharthrajaram/mcp-sse)
  3. This 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).
  4. ## Usage
  5. **Note**: Make sure to supply `ANTHROPIC_API_KEY` in `.env` or as an environment variable.
  6. ```
  7. uv run weather.py
  8. uv run client.py http://0.0.0.0:8080/sse
  9. ```
  10. ```
  11. Initialized SSE client...
  12. Listing tools...
  13. Connected to server with tools: ['get_alerts', 'get_forecast']
  14. MCP Client Started!
  15. Type your queries or 'quit' to exit.
  16. Query: whats the weather like in Spokane?
  17. I 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.
  18. Spokane, WA is located at approximately 47.6587° N, 117.4260° W.
  19. [Calling tool get_forecast with args {'latitude': 47.6587, 'longitude': -117.426}]
  20. Based on the current forecast for Spokane:
  21. Right now it's sunny and cold with a temperature of 37°F and ...
  22. ```
  23. ## Why?
  24. This 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.
  25. ### Installing via Smithery
  26. To install SSE-based Server and Client for Claude Desktop automatically via [Smithery](https://smithery.ai/server/@sidharthrajaram/mcp-sse):
  27. ```bash
  28. npx -y @smithery/cli install @sidharthrajaram/mcp-sse --client claude
  29. ```
  30. ### Server
  31. `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)
  32. By default, server runs on 0.0.0.0:8080, but is configurable with command line arguments like:
  33. ```
  34. uv run weather.py --host <your host> --port <your port>
  35. ```
  36. ### Client
  37. `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)
  38. By default, client connects to SSE endpoint provided in the command line argument like:
  39. ```
  40. uv run client.py http://0.0.0.0:8080/sse
  41. ```

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.