weather-server
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., "@weather-serverWhat's the weather in Tokyo and the 3-day forecast?"
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.
Model Context Protocol (MCP) - Weather Tool Server & Agent Interoperability
An implementation of Anthropic's Model Context Protocol (MCP) using the Python MCP SDK. This repository demonstrates how to standardize communication between an AI agent and external tools, separating tool execution from agent logic for true cross-framework interoperability.
π Overview
The Model Context Protocol (MCP) defines an open standard for AI models to discover and call tools, read data resources, and utilize prompt templates over a unified interface (using JSON-RPC 2.0).
This project implements:
Custom MCP Server (
weather_server.py): Exposesget_weatherandget_forecastover standard input/output (stdio).MCP Client (
mcp_client.py): Demonstrates protocol initialization, dynamic tool discovery (list_tools), and structured tool calls (call_tool).Interoperability Demo (
mcp_client_interop.py): Demonstrates how multiple distinct agent client implementations consume the exact same MCP tool server without modifying server-side code.Complete Experiment Report (
experiment_report.md): Comprehensive lab documentation with JSON-RPC payload breakdowns.
Related MCP server: weather-mcp-server
π Repository Structure
.
βββ weather_server.py # MCP Tool Server implementation
βββ mcp_client.py # Standard async MCP Client
βββ mcp_client_interop.py # Multi-agent framework interoperability test
βββ requirements.txt # Dependencies (mcp SDK)
βββ experiment_report.md # Detailed experiment writeup & JSON-RPC spec
βββ README.md # Project documentationπ Getting Started
Prerequisites
Python 3.10 or higher
pippackage manager
1. Installation
Clone the repository and install the dependencies:
git clone https://github.com/your-username/mcp-weather-server.git
cd mcp-weather-server
pip install -r requirements.txtπ οΈ Usage
Run Primary MCP Client & Server Interaction
Executes the client, spawns weather_server.py via stdio, initializes the session, discovers tools, and invokes get_weather for Mumbai and get_forecast for Chennai:
python mcp_client.pyExpected Output:
==================================================
Model Context Protocol (MCP) Client Initializing
==================================================
[Transport] Connecting via Stdio: python weather_server.py
[Step 1] Initializing MCP Session...
-> Connected to Server: weather-server v0.1.0
-> Server Protocol Version: 2025-06-18
[Step 2] Executing list_tools() Request...
-> Discovered 2 tool(s):
- Tool Name: get_weather
- Tool Name: get_forecast
[Step 3] Executing call_tool('get_weather', city='Mumbai')...
-> Response received from server:
[TextContent]: Mumbai: 28 deg C, Partly Cloudy, Humidity 65%
[Step 4] Executing call_tool('get_forecast', city='Chennai')...
-> Response received from server:
[TextContent]: Chennai 3-day: Day1: 28C Sunny | Day2: 25C Rainy | Day3: 30C SunnyRun Interoperability Test
Demonstrates two different simulated agent frameworks executing against the same MCP tool server without code modifications:
python mcp_client_interop.pyπ Connecting to Claude Desktop
You can easily plug this weather_server.py into Claude Desktop:
Open your Claude Desktop configuration file:
Windows:
%APPDATA%\Claude\claude_desktop_config.jsonmacOS:
~/Library/Application Support/Claude/claude_desktop_config.json
Add your server under
mcpServers:
{
"mcpServers": {
"weather": {
"command": "python",
"args": [
"C:/path/to/repository/weather_server.py"
]
}
}
}Restart Claude Desktop. You will now see the
get_weatherandget_forecasttools available directly in your chat interface!
π Protocol Flow Breakdown (JSON-RPC 2.0)
1. Initialization (initialize)
{
"jsonrpc": "2.0",
"id": 1,
"method": "initialize",
"params": {
"protocolVersion": "2025-06-18",
"clientInfo": { "name": "mcp-python-sdk", "version": "1.19.0" }
}
}2. Tool Discovery (tools/list)
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/list"
}3. Tool Invocation (tools/call)
{
"jsonrpc": "2.0",
"id": 3,
"method": "tools/call",
"params": {
"name": "get_weather",
"arguments": { "city": "Mumbai" }
}
}π License
Distributed under the MIT License. See LICENSE for details.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
No tool schema history has been recorded yet.
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 Connectors
Hosted MCP server for Xweather weather data: conditions, forecasts, alerts, and more.
1Weather, code search, currency & Solana trust scoring as MCP tools. Free, no API key needed.
MCP server for weather with reasoning β umbrella advice, outdoor checks, city comparisons.
Get current weather for any city and create images from your prompts. Streamline planning, reportsβ¦
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceEnables AI agents to retrieve live weather updates for any city via OpenWeatherMap, wrapped in MCP format.1-
- AlicenseAqualityCmaintenanceProvides real-time weather and forecast data via MCP tools, enabling AI agents to query current weather and up to 3-day forecasts for any city.3MIT
- AlicenseAqualityBmaintenanceMCP server that provides current weather for any city using Open-Meteo APIs. It exposes a single tool 'get_weather' returning temperature, humidity, wind, and other weather data.116MIT
- FlicenseAqualityCmaintenanceProvides current weather data for any city using the Open-Meteo API, exposed as an MCP tool for integration with MCP clients.1-
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/nishnarudkar/Model-Context-Protocol-MCP---Weather-Tool-Server-Agent-Interoperability'
If you have feedback or need assistance with the MCP directory API, please join our Discord server