MCP Multi-Server Demo with SSE Transport
@fredrikp999
About MCP Multi-Server Demo with SSE Transport
Example of using MCP servers, both over sdio + sse. Also using langchain-mcp
Basic information
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"mcp-sse-langchain-example": {
"command": "python",
"args": [
"main.py"
]
}
}
}Tools
No tools detected
We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.
Overview
What is MCP Multi-Server Demo with SSE Transport?
A demonstration project that uses the Model Context Protocol (MCP) to connect multiple servers via different transport methods (stdio and Server-Sent Events). It integrates with LangChain and OpenAI to create an agent that can use tools from both a math server and a weather server.
How to use MCP Multi-Server Demo with SSE Transport?
Clone the repository, install dependencies with pip install -r requirements.txt, and set your OpenAI API key in a .env file. Run python main.py to start the weather server on port 8000, connect to both servers, and execute example queries.
Key features of MCP Multi-Server Demo with SSE Transport
- Math server with basic arithmetic operations (add, multiply)
- Weather server providing simulated weather for different locations
- MultiServerMCPClient to connect to servers with different transports
- Integration with LangChain and OpenAI for agent functionality
- Example queries for math and weather
- Extensible: add more tools, servers, or real APIs
Use cases of MCP Multi-Server Demo with SSE Transport
- Demonstrating how to use MCP with both stdio and SSE transports
- Building a LangChain agent that can call tools from multiple MCP servers
- Prototyping an assistant that combines math calculations and weather lookups
- Learning how to extend MCP with custom server capabilities
FAQ from MCP Multi-Server Demo with SSE Transport
What does this demo do?
It shows how to connect multiple MCP servers using different transports (stdio and SSE) and create a LangChain agent that can use tools from both.
What are the dependencies?
Python 3.8+ and an OpenAI API key. Dependencies are installed via requirements.txt.
Where does the data live?
The weather data is simulated (no real API). All data is local to the demo.
What transport methods are used?
The math server uses stdio transport; the weather server uses SSE transport (HTTP-based server‑to‑client push).
How is authentication handled?
Only the OpenAI API key (set in .env) is required for the agent. No additional auth for the MCP servers.
More AI & Agents MCP servers
Web Agent Protocol
OTA-Tech-AI🌐Web Agent Protocol (WAP) - Record and replay user interactions in the browser with MCP support
Just Prompt - A lightweight MCP server for LLM providers
dislerjust-prompt is an MCP server that provides a unified interface to top LLM providers (OpenAI, Anthropic, Google Gemini, Groq, DeepSeek, and Ollama)
Unreal Engine Generative AI Support Plugin
prajwalshettydevUnreal Engine plugin for LLM/GenAI models & MCP UE5 server. OpenAI GPT-5, Deepseek R1, Claude Opus/Sonnet, Gemini 3, Grok 4, Alibaba Qwen, Kimi, ElevenLabs TTS, Inworld, OpenRouter, Groq, GLM, Ollama, Local, Meshy, Tripo, Hunyuan3D, Rodin, fal, Dashscope, Seedream. NPC AI, agenti
Hass-MCP
voskaControl and query Home Assistant from Claude and other LLMs — a Model Context Protocol (MCP) server.
MCP-NixOS - Because Your AI Assistant Shouldn't Hallucinate About Packages
utensilsMCP-NixOS - Model Context Protocol Server for NixOS resources
Comments