MCP Server Practice
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP Server PracticeWhat's the weather in California?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Server Practice
A simple practice project demonstrating how to build and use Model Context Protocol (MCP) servers with Python, LangGraph, and Groq.
Overview
This project contains:
A Math MCP Server using the
stdiotransport.A Weather MCP Server using the
streamable-httptransport.A LangGraph ReAct agent that connects to multiple MCP servers using
MultiServerMCPClient.
Related MCP server: Model Context Protocol Multi-Agent Server
Project Structure
.
├── client.py
├── mathserver.py
├── weatherserver.py
├── .env
├── requirements.txt
└── README.mdFeatures
Math Server (stdio)
Provides the following tools:
add(a, b)multiply(a, b)
Weather Server (streamable-http)
Provides the following tool:
get_weather(location)
Currently returns a mock weather response.
Client
The client:
Connects to multiple MCP servers.
Automatically discovers available tools.
Uses a Groq LLM with LangGraph's ReAct agent.
Selects and invokes the appropriate tool based on the user's query.
Tech Stack
Python
MCP (Model Context Protocol)
LangGraph
LangChain MCP Adapters
Groq
python-dotenv
Installation
Clone the repository:
git clone https://github.com/shreenithi23/mcp-server-practice.git
cd mcp-server-practiceCreate a virtual environment:
python -m venv .venvActivate it:
macOS/Linux
source .venv/bin/activateWindows
.venv\Scripts\activateInstall the required packages:
pip install -r requirements.txtEnvironment Variables
Create a .env file:
GROQ_API_KEY=your_groq_api_keyRunning the Project
1. Start the Weather Server
python weatherserver.pyThe Math server is automatically launched by the client using the stdio transport.
2. Run the Client
python client.pyExample Queries
What's (3 + 5) x 12?What's the weather in California?Learning Objectives
This project demonstrates:
Building MCP servers using
FastMCPExposing Python functions as MCP tools
Using different MCP transports (
stdioandstreamable-http)Connecting multiple MCP servers with
MultiServerMCPClientCreating an AI agent with LangGraph's ReAct agent
Integrating Groq LLMs with MCP
Notes
The Weather server currently returns mock weather data.
The Math server is started automatically by the client.
Store API keys in a
.envfile.Do not commit
.envto GitHub.
License
This project is intended for learning and experimentation with the Model Context Protocol (MCP).
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Flicense-qualityDmaintenanceA Model Context Protocol (MCP) server that demonstrates mathematical capabilities through a LangChain integration, allowing clients to perform math operations via the MCP protocol.
- Flicense-qualityDmaintenanceDemonstrates 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
- Alicense-qualityDmaintenanceA minimal Python-based server that provides real-time weather data and a safe mathematical expression evaluator. It enables users to fetch current weather conditions and perform complex calculations using the Model Context Protocol.MIT
- Flicense-qualityCmaintenanceA 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.
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
A Model Context Protocol server for Wix AI tools
AI Reasoning Cache & Consensus Layer with 11 MCP tools via Streamable HTTP.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/shreenithi23/mcp-server-practice'
If you have feedback or need assistance with the MCP directory API, please join our Discord server