MCP.so
Sign In

SSE-based Server and Client for

@sidharthrajaram

About SSE-based Server and Client for

A working pattern for SSE-based MCP clients and servers

Overview

What is SSE-based Server and Client for MCP?

SSE-based Server and Client for MCP is a demonstration project that provides a working pattern for SSE-based MCP (Model Context Protocol) servers and standalone MCP clients that consume tools from them. It includes a reference weather server and a general‑purpose client, both written in Python, and is intended for developers building cloud‑native MCP applications.

How to use SSE-based Server and Client for MCP?

Set the ANTHROPIC_API_KEY in a .env file or as an environment variable. Run the server with uv run weather.py (optionally passing --host and --port). Then run the client with uv run client.py http://<host>:<port>/sse. The client connects to the SSE endpoint, lists available tools, and accepts natural language queries that it routes to the server’s tools.

Key features of SSE-based Server and Client for MCP

  • SSE‑based MCP server and client over HTTP, not stdio.
  • Client and server can run on decoupled machines or containers.
  • Includes a working weather server using National Weather Service APIs.
  • Client automatically discovers and calls server tools.
  • Built on the Model Context Protocol Python SDK.
  • Can be installed via Smithery for Claude Desktop.

Use cases of SSE-based Server and Client for MCP

  • Developers prototyping an SSE‑based MCP architecture for cloud deployment.
  • Connecting remote MCP servers to local or cloud‑hosted agents.
  • Learning how to migrate from stdio‑based MCP to SSE‑based patterns.

FAQ from SSE-based Server and Client for MCP

What MCP servers does this client support?

The client connects to any MCP server that exposes an SSE endpoint (a URL ending in /sse). It does not require the server to be a subprocess or on the same machine.

Do I need an API key to use this?

Yes, an ANTHROPIC_API_KEY must be provided in the environment or a .env file. The client uses Anthropic’s models to interpret queries and call the server’s tools.

What is the difference between SSE‑based and stdio‑based MCP?

In the stdio pattern the client spawns the server as a subprocess. In SSE‑based MCP the server runs independently over HTTP, allowing the client and server to be on separate nodes – a better fit for cloud‑native and distributed architectures.

Does this client support other LLMs besides Anthropic’s?

The README only documents the use of ANTHROPIC_API_KEY. No other providers are mentioned.

What platforms or runtimes are supported?

The project runs in any environment with Python and uv (the Python package manager/runner). It has been tested on Linux, macOS, and Windows.

Comments

More Agent Frameworks MCP clients