mcp-weather-connector
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-weather-connectorwhat's the current weather in San Francisco?"
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-weather-connector
An MCP server that gives an AI agent access to weather forecasts through Open-Meteo — a public API with no key or registration required.
Deliberately small: the repository is about how the tool layer for an agent is structured, not about weather. Weather here is a relatable pretext for showing the trust boundary between the model and the outside world.
Why
Model Context Protocol is a way to give a language model the right to take actions in external services. Once that right exists, the question arises: what happens if the model passes garbage to a tool right as the third-party service returns a 503?
Three decisions are made explicit in this code:
Model input is untrusted. The model can pass an empty string, a ten-kilobyte wall of text, or control characters. All of this is filtered out in server.py before the network call — not in a third-party API.
Errors are distinguished by type. Retrying a 4xx is pointless — it is a request error, and a retry will not fix it. A 5xx is more likely a one-off failure — one retry with a pause. The logic lives in _get_json and is verified by tests that assert the call count.
What goes out is text, not raw JSON. The agent has nothing to second-guess and no way to err when relaying the answer. A 200 response without the required field counts as a failure, not as a reason to return an empty value.
As a separate note: a day count outside the supported range is clamped to the boundary rather than treated as an error. If the model asks for a 30-day forecast, it is more useful to return seven days than to break the conversation with an error message.
Related MCP server: open-meteo-mcp-server
Tools
Tool | What it does |
| Current weather: temperature, feels like, humidity, wind |
| Forecast for 1–7 days with precipitation |
| Checks whether a populated place exists and clarifies the country |
locate exists for the single scenario where the agent is not sure about the spelling: better to check with the user than to silently return the weather for the wrong city.
Installation
pip install -e .Connecting to Claude Desktop
In claude_desktop_config.json:
{
"mcpServers": {
"weather": {
"command": "mcp-weather"
}
}
}After the app restarts, the tools will appear in the list of available tools.
Development
pip install -e ".[dev]"
pytest
ruff check .The tests cover what actually breaks: empty and oversized input, a non-numeric number of days, a 4xx with no retry, a 5xx with one retry, success on the second attempt, a 200 response without a payload, and an unknown weather code. HTTP is mocked with respx — no network is needed in the tests.
Structure
src/mcp_weather/
client.py — работа с Open-Meteo: типы, повторы, разбор ответа
server.py — MCP-слой: валидация входа и форматирование вывода
tests/
test_tools.pyThe network code is deliberately separated from the MCP layer: the client is tested on its own, and the agent's tools remain a thin wrapper over straightforward functions.
License
MIT
Maintenance
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 gradedqualityFmaintenanceEnables AI assistants to retrieve current weather, forecasts, and summaries for any global location using the Open-Meteo API, with no API key required.21Creative Commons Zero v1.0 Universal
- AlicenseAqualityDmaintenanceProvides comprehensive access to Open-Meteo weather APIs, including forecasts, historical data, air quality, marine weather, and geocoding, enabling LLMs to retrieve weather information and location data.176681MIT
- FlicenseBqualityDmaintenanceProvides current weather conditions and forecasts for any location using the Open-Meteo API.2
- AlicenseNot gradedqualityCmaintenanceProvides live weather data (current conditions, forecasts) and city geocoding through Open-Meteo API, enabling AI assistants to answer weather queries without an API key.MIT
Related MCP Connectors
Global weather via Open-Meteo: forecast, ERA5 archive, marine, air quality, geocoding, elevation.
US weather & geo for AI agents: forecasts, alerts, earthquakes, elevation, geocoding. No keys.
Real-time weather conditions and multi-day forecasts via Open-Meteo — free, no API key required
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/KDimkuz/mcp-weather-connector'
If you have feedback or need assistance with the MCP directory API, please join our Discord server