mcp-sse
A working pattern for SSE-based MCP clients and servers
claude mcp add --transport stdio sidharthrajaram-mcp-sse uvx weather.py \ --env ANTHROPIC_API_KEY="your-anthropic-api-key"
How to use
This MCP server provides an SSE-based interface for querying weather-related tools implemented in weather.py. The server exposes a small toolset active through the SSE endpoint, including functions like get_alerts and get_forecast. Clients connect to the server via an SSE endpoint typically at /sse and can issue natural-language style queries that may trigger one or more of the available tools. To start, ensure your ANTHROPIC_API_KEY is available in your environment, then run the server and connect with the client to see tool discovery and execution in action. The included client demonstrates a basic interactive session where you can ask about weather in a given location and receive tool-assisted responses, including the coordinates used to fetch forecasts.
How to install
Prerequisites:\n- Python 3.8+ (or a compatible Python runtime)\n- Access to an environment where you can install dependencies and run uvx (the Python-based MCP runtime)\n\nInstallation steps:\n1) Clone the repository or download the server script (weather.py) and ensure it is accessible on your system.\n2) Install the Python runtime and MCP environment (if needed). For example, using pip and the uvx runtime (install steps may vary by environment):\n\nbash\n# Example: ensure Python is available, then install uvx if your setup uses a separate runtime package (adjust as needed)\npip install uvx # if applicable for your environment\n\n3) Set the required environment variable for authentication:\nbash\nexport ANTHROPIC_API_KEY=your-anthropic-api-key\n\n4) Run the server (as shown in the README usage):\nbash\nuvx run weather.py\n\n5) In another terminal, start the client to connect to the SSE endpoint:\nbash\nuv run client.py http://0.0.0.0:8080/sse\n\n\nNotes:\n- If you prefer Smithery or a package-based install, you can follow the project’s Smithery instructions to install the SSE server and client automatically.\n- If the server needs a different host/port, supply them with the appropriate command-line arguments as described in the project README.\n
Additional notes
Tips and common issues:\n- Ensure ANTHROPIC_API_KEY is present; without it, tool calls that rely on the Anthropic API may fail.\n- The server defaults to 0.0.0.0:8080; customize host/port with command-line options if needed.\n- Validate that you can reach the SSE endpoint from your client machine (network/firewall considerations apply).\n- If tool discovery shows only partial capabilities, verify the weather.py script exposes the expected tools (e.g., get_alerts, get_forecast) and that the client is connected to the correct /sse endpoint.\n- For debugging, tail logs and ensure dependencies (requests, aiohttp, etc.) are installed in your environment.\n
Related MCP Servers
awesome-ai-apps
A collection of projects showcasing RAG, agents, workflows, and other AI use cases
mcp-agent
Build effective agents using Model Context Protocol and simple workflow patterns
NagaAgent
A simple yet powerful agent framework for personal assistants, designed to enable intelligent interaction, multi-agent collaboration, and seamless tool integration.
nerve
The Simple Agent Development Kit.
npcpy
The python library for research and development in NLP, multimodal LLMs, Agents, ML, Knowledge Graphs, and more.
4D-ARE
Build LLM agents that explain why, not just what. Attribution-driven agent requirements engineering framework. Based on the 4D-ARE Paper - https://arxiv.org/abs/2601.04556