weather mcp
Weather MCP Server
A lightweight Model Context Protocol (MCP) server that gives AI assistants (like Claude) the ability to fetch real-time weather data for any city using the OpenWeatherMap API.
What It Does
This MCP server exposes a single tool — get_weather — that an AI assistant can call to retrieve the current weather conditions for any city in the world.
Example response:
The weather in London is light rain with 13°C.Related MCP server: mcp-weather
Tech Stack
Python — core language
FastMCP — framework for building MCP servers quickly
OpenWeatherMap API — weather data source
Requests — HTTP client
Getting Started
1. Clone the Repository
git clone https://github.com/Tarun-004/weather-mcp.git
cd weather-mcp2. Install Dependencies
pip install fastmcp requests3. Add Your API Key
Get a free API key from OpenWeatherMap, then open server.py and replace the placeholder:
API_KEY = "your_openweathermap_api_key_here"Never commit your API key to GitHub. Consider using a
.envfile and thepython-dotenvpackage to keep it safe.
4. Run the Server
python server.pyMCP Configuration
To connect this server to an MCP-compatible client (e.g., Claude Desktop), add the following to your MCP config file:
{
"mcpServers": {
"weather": {
"command": "python",
"args": ["server.py"]
}
}
}Available Tool
get_weather
Fetches the current weather for a given city.
Parameter | Type | Description |
| string | Name of the city (e.g., |
Returns: A plain-text string with the weather description and temperature in Celsius.
Ideas for Future Improvements
Add support for forecasts (5-day, hourly)
Return humidity, wind speed, and UV index
Support coordinates (lat/lon) in addition to city name
Use environment variables for the API key
Add error handling for invalid city names
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
- AlicenseBqualityDmaintenanceA Model Context Protocol server that provides comprehensive weather data and forecasts through the OpenWeatherMap API, enabling AI assistants to access real-time weather information, forecasts, air quality data, and location services.Last updated11894MIT
- Flicense-qualityDmaintenanceA Model Context Protocol (MCP) server that enables AI assistants and LLMs to access real-time weather data and forecasts by connecting to the OpenWeatherMap API.Last updated
- Flicense-qualityDmaintenanceA Model Context Protocol server that enables natural language weather queries for global cities, integrating with OpenWeather API to provide real-time weather information in an easy-to-read format.Last updated1
- AlicenseBqualityDmaintenanceA simple Model Context Protocol server that provides real-time weather data to AI agents like GitHub Copilot, allowing users to get current weather information for any city through natural language queries.Last updated25598MIT
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
MCP (Model Context Protocol) server for Appwrite
MCP server for AI dialogue using various LLM models via AceDataCloud
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/Tarun-004/Weather-MCP-Server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server