MCP-Server
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Multi-Server Model Context Protocol (MCP) Demo
A complete demonstration of building and integrating multiple Model Context Protocol (MCP) servers with a LangGraph ReAct agent powered by Groq and real-time OpenWeatherMap data.
This project showcases how an LLM agent can dynamically discover and consume tools across different MCP servers and transport protocols (stdio and streamable-http) in a single unified workflow.
ποΈ Architecture
flowchart LR
subgraph Agent["LangGraph ReAct Agent (client.py)"]
ChatGroq["LLM: Groq (Qwen / ChatGroq)"]
MultiMCP["MultiServerMCPClient"]
end
subgraph MathServer["Math MCP Server (mathserver.py)"]
MathTools["Tools: add, sub, mul, div"]
end
subgraph WeatherServer["Weather MCP Server (weatherserver.py)"]
WeatherTools["Tool: get_weather (OpenWeatherMap API)"]
end
MultiMCP -- "stdio transport (subprocess)" --> MathServer
MultiMCP -- "streamable-http (http://127.0.0.1:8000/mcp)" --> WeatherServerComponents
Math MCP Server (
mathserver.py):Built with FastMCP.
Runs over
stdiotransport.Exposes arithmetic tools:
add,sub,mul,div.Automatically launched as a background subprocess by the MCP client.
Weather MCP Server (
weatherserver.py):Built with FastMCP running over
streamable-httptransport athttp://127.0.0.1:8000/mcp.Uses
httpxto fetch live meteorological data from the OpenWeatherMap API.Exposes the
get_weathertool (returns temperature, weather description, feels like, and humidity).
Orchestrator Client (
client.py):Connects to both MCP servers simultaneously using
MultiServerMCPClientfromlangchain-mcp-adapters.Assembles the tools and powers a LangGraph ReAct agent using Groq's fast LLM inference (
ChatGroq).
Related MCP server: AIE8-MCP Server
π Project Structure
Mcp_demo/
βββ client.py # ReAct Agent & Multi-Server MCP client orchestrator
βββ mathserver.py # FastMCP server running on stdio transport
βββ weatherserver.py # FastMCP server with OpenWeatherMap API on HTTP transport
βββ requirements.txt # Python package dependencies
βββ pyproject.toml # Project configuration & metadata
βββ .env.example # Environment variables template
βββ .gitignore # Git ignore rules (protects .env and caches)
βββ README.md # Project documentationπ Getting Started
1. Prerequisites
Python 3.10+
OpenWeatherMap API Key (free tier)
2. Installation
Clone the repository and install dependencies:
git clone https://github.com/sreeshanthkprakash-stack/MCP-Server.git
cd MCP-Server
# Create and activate virtual environment
python -m venv .venv
# On Windows:
.venv\Scripts\activate
# On Linux/macOS:
source .venv/bin/activate
# Install dependencies
pip install -r requirements.txt3. Environment Configuration
Create a .env file in the root directory (or copy from .env.example):
GROQ_API_KEY=your_groq_api_key_here
OPENWEATHER_API_KEY=your_openweather_api_key_hereπ§ͺ Running the Application
Step 1: Start the Weather MCP Server
Since the weather server communicates over HTTP, start it first in a terminal:
python weatherserver.pyThe weather server will start listening at
http://127.0.0.1:8000/mcp.
Step 2: Run the Agent Client
Open a second terminal window (ensure your virtual environment is active), and run:
python client.pyExpected Output Example
math_response The result of the expression ((15*20)+200)/4 is 125.
weather_response Weather in Hyderabad: haze, temperature 29.5Β°C (feels like 32.1Β°C), humidity 65%π¦ Dependencies
mcp: Official Model Context Protocol SDK (FastMCP)langchain-mcp-adapters: Connects LangChain to MCP serverslanggraph: Graph-based agent orchestration runtimelangchain-groq: High-speed LLM inference with Groqhttpx: Async HTTP client for weather API requestspython-dotenv: Secure environment variable loading
π License
This project is open-source and available under the MIT License.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
This server cannot be deployed
Maintenance
Related MCP Connectors
LLM Orchestration Agent (Mcp)
One MCP endpoint for Claude, GPT & Gemini: 100+ tools + no-code connectors + agent workers.
LLM Orchestration MCP Agent
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceDemonstrates custom MCP servers for math and weather operations, enabling multi-agent orchestration using LangChain, Groq, and MCP adapters for both local and remote tool integration.1-
- FlicenseBqualityDmaintenanceAn MCP server that provides web search capabilities through the Tavily API and weather data retrieval tools. It demonstrates how to integrate external APIs into AI applications and build agentic workflows with LangGraph.3-
- FlicenseNot gradedqualityDmaintenanceA demonstration MCP server that provides math (add/multiply) and weather tools, connecting via stdio and streamable HTTP, and integrates with LangChain and LangGraph for agentic workflows.-
- FlicenseNot gradedqualityDmaintenanceAn MCP server that provides math tools (add, subtract, multiply) and a weather tool, with a LangChain agent client that uses Groq to answer natural language queries.-