Weather MCP 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 MCP ServerWhat's the weather in London?"
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.
Weather MCP Server (OpenWeather API)
A Model Context Protocol (MCP) server built with Python and uv that provides weather information by city name using the OpenWeather API (https://api.openweathermap.org/data/2.5/weather).
Table of Contents
Related MCP server: Weather MCP Server
Features
Get Weather by City Name: Fetches real-time weather metrics for any city (e.g.,
London,Chennai,New York,US).Structured JSON Output: Returns temperature (°C), feels-like (°C), humidity (%), pressure (hPa), weather conditions, and wind speed (m/s).
Environment Key Integration: Loads
OPENWEATHER_API_KEYautomatically via.env/dotenv.Package Management via
uv: Usespyproject.tomlanduvfor reproducible builds.
Prerequisites
Python:
>= 3.10uv: Fast Python package manager (Installation Guide)Node.js & npx (Optional, for testing with MCP Inspector)
OpenWeather API Key: Free key from OpenWeather SignUp
Step-by-Step Setup Guide
Step 1: Clone / Navigate to Project Directory
cd /Users/jayarajkannan/Learnings/project/mcpStep 2: Environment Configuration
Create a .env file from .env.example and set your OpenWeather API key:
cp .env.example .envEdit .env:
OPENWEATHER_API_KEY=your_actual_openweather_api_key_hereStep 3: Install Dependencies
Sync virtual environment and lockfile using uv:
uv syncThis installs mcp, httpx, and python-dotenv into the project environment.
Step 4: Run the MCP Server
You can run the server directly using uv:
uv run server.pyOr using the CLI script entry point defined in pyproject.toml:
uv run weather-mcpNote: MCP servers communicate over
stdiovia JSON-RPC. Running the script directly will wait for input on stdin.
Step 5: Test Interactively with MCP Inspector
Use the official MCP Inspector to test and verify all tool calls in your browser UI:
npx @modelcontextprotocol/inspector uv run server.pyOpen the URL printed in the terminal (e.g.
http://127.0.0.1:6274?...).Click Connect.
Select the
get_weathertool.Input a city name (e.g.
LondonorChennai) and click Run Tool.
Step 6: Run Automated Tests
Run the test suite using unittest and uv:
uv run python -m unittest test_server.pyMCP Tools Reference
get_weather
Gets current weather for a city using OpenWeather API.
Input Schema
Parameter | Type | Required | Description |
|
| Yes | City name (e.g. |
Example Response Output
{
"city": "London",
"country": "GB",
"temperature_c": 21.57,
"feels_like_c": 21.58,
"humidity": 69,
"pressure": 1006,
"weather": "Clouds",
"description": "broken clouds",
"wind_speed_mps": 9.26
}MCP Client Integration
Add the Weather MCP server to your MCP client configuration (e.g. Claude Desktop claude_desktop_config.json or Antigravity .mcp.json):
{
"mcpServers": {
"weather": {
"command": "uv",
"args": [
"--directory",
"/Users/jayarajkannan/Learnings/project/mcp",
"run",
"server.py"
],
"env": {
"OPENWEATHER_API_KEY": "YOUR_OPENWEATHER_API_KEY"
}
}
}
}Project Structure
├── pyproject.toml # Project dependencies and script entry points
├── uv.lock # Locked dependency tree
├── server.py # Weather MCP server implementation
├── test_server.py # Automated unit tests
├── .env.example # Sample environment configuration
├── .env # Local environment variables (API Key)
└── README.md # DocumentationMaintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Tools
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables users to get current weather information for any city using the OpenWeatherMap API. Returns formatted weather data including temperature, humidity, and weather description through natural language queries.MIT
- AlicenseNot gradedqualityDmaintenanceProvides current weather information for any city worldwide using the free Open-Meteo API, enabling users to query temperature, wind speed, humidity, and weather conditions through natural language.21MIT
- AlicenseNot gradedqualityDmaintenanceEnables querying real-time weather and 5-day forecasts for any city using the OpenWeatherMap API.214MIT
- FlicenseNot gradedqualityDmaintenanceProvides current weather information for any city using the OpenWeatherMap API.
Related MCP Connectors
Real-time weather conditions and multi-day forecasts via Open-Meteo — free, no API key required
OpenWeather MCP — wraps the OpenWeatherMap API (openweathermap.org)
Global weather via Open-Meteo: forecast, ERA5 archive, marine, air quality, geocoding, elevation.
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/jayaraj-kannan/mcp-weather'
If you have feedback or need assistance with the MCP directory API, please join our Discord server