SSE-based MCP Server and Client logo

SSE-based MCP Server and Client

by goyatparmod

This project demonstrates a working pattern for SSE-based MCP servers and standalone MCP clients. It enables decoupled processes for cloud-native use-cases, differing from the STDIO-based pattern.

View on GitHub

Last updated: N/A

What is SSE-based MCP Server and Client?

This is an SSE-based MCP (Model Context Protocol) server and client implementation. The server exposes tools via Server-Sent Events, and the client connects to and utilizes these tools.

How to use SSE-based MCP Server and Client?

  1. Ensure you have an ANTHROPIC_API_KEY in your .env file or as an environment variable. 2. Run the server using uv run weather.py. Configure host and port if needed. 3. Run the client using uv run client.py http://0.0.0.0:8080/sse, providing the server's SSE endpoint.

Key features of SSE-based MCP Server and Client

  • SSE-based communication

  • MCP compliant

  • Decoupled server and client processes

  • Cloud-native architecture

  • Example weather service tools

Use cases of SSE-based MCP Server and Client

  • Integrating language models with external tools in a cloud environment

  • Building agents that can connect to and use remote services

  • Creating modular and scalable AI applications

  • Decoupling AI services for improved resilience

  • Enabling remote access to AI tools

FAQ from SSE-based MCP Server and Client

What is MCP?

MCP stands for Model Context Protocol, a standard for communication between language models and external tools.

What is SSE?

SSE stands for Server-Sent Events, a server push technology enabling real-time data streaming from a server to a client.

How do I configure the server?

The server can be configured using command-line arguments to specify the host and port. For example: uv run weather.py --host <your host> --port <your port>.

What tools are available on the example server?

The example server provides tools based on the National Weather Service APIs, such as get_alerts and get_forecast.

How do I install this via Smithery?

You can install the SSE-based Server and Client for Claude Desktop automatically via Smithery using the command: npx -y @smithery/cli install @sidharthrajaram/mcp-sse --client claude.