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 right now?"
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
A clean, readable learning project that wraps OpenWeatherMap into a small MCP-style server. It exposes friendly endpoints for current weather and daily forecasts, normalizes provider output, and includes a demo browser UI.
Why this exists
Many weather APIs return complex or inconsistent responses. This project makes it easy to:
query weather by city name or coordinates,
get a standardized JSON response for current conditions,
get a simplified daily forecast summary,
optionally include raw provider payloads for debugging,
cache results so repeated requests are faster.
It is built as a learning exercise for REST integration, data normalization, and service design.
Related MCP server: weather-mcp-server
What is MCP here?
“MCP” stands for Minimal Common Platform in this context. The goal is to provide a tiny wrapper layer that:
hides provider-specific API details,
offers a stable contract to clients,
handles validation and error responses uniformly,
keeps the implementation simple and transparent.
This server is not a full real-world platform; it is a small, usable sample service for education and experimentation.
What this project solves
This project solves the problem of consuming raw weather API responses directly in a client or another service. It:
abstracts OpenWeatherMap endpoint details,
normalizes temperature and weather condition fields,
aggregates 3-hour forecast data into daily summaries,
adds caching and validation,
provides a tiny demo UI so you can try the API instantly.
Features
GET
/mcp/current?city=LondonGET
/mcp/forecast?days=3&city=Londonoptional
?raw=trueto include raw provider datacity name or latitude/longitude input
in-memory TTL cache
optional Redis cache when
REDIS_URLis setfriendly JSON error responses
minimal static UI at
/basic automated tests with Jest + Supertest
API Reference
GET /mcp/current
Parameters:
city(string) ORlatandlon(numbers)raw=true(optional)
Returns current weather normalized to:
temperature in Kelvin, Celsius, Fahrenheit
feels-like temperature
humidity
pressure
wind speed and direction
simple weather conditions array
GET /mcp/forecast
Parameters:
city(string) ORlatandlon(numbers)days(1–5, optional, default 3)raw=true(optional)
The forecast response uses OpenWeatherMap's free 5-day / 3-hour endpoint and groups results into daily summaries with:
min/max temperatures,
average humidity,
max wind speed,
most frequent weather condition,
precipitation probability.
GET /health
Returns a simple health check JSON object.
Project structure
src/server.js— Express server, request validation, cache integration, endpointssrc/weather.js— OpenWeatherMap integration and data normalizationsrc/cache.js— in-memory TTL cache plus optional Redis supportsrc/logger.js— simple logging with winstonpublic/index.html— small demo UI pagepublic/app.js— UI fetch helpers for current and forecast__tests__/server.test.js— basic test coverage for endpointsREADME.md— this file
Setup
Install Node.js 18+ and npm.
In the project root, install dependencies:
npm installCreate a
.envfile in the project root with:
OPENWEATHER_API_KEY=your_api_key_hereStart the server:
npm run devOpen the demo UI:
http://localhost:3000Example usage
Current weather by city:
curl "http://localhost:3000/mcp/current?city=London"3-day forecast by city:
curl "http://localhost:3000/mcp/forecast?days=3&city=London"Include raw provider data:
curl "http://localhost:3000/mcp/forecast?days=3&city=London&raw=true"What you learn from this project
integrating with third-party REST APIs
designing a stable output contract for clients
normalizing and summarizing complex provider data
building a small Express service with validation
caching results for performance
serving a static UI from the same app
writing simple endpoint tests
Notes
Keep your
.envfile secret and do not commit it.This project is meant for learning and prototyping, not production use.
The free OpenWeatherMap tier may restrict some endpoints, so this project uses the free current weather and forecast APIs.
License
MIT
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
- MIT
- -licenseBquality-maintenancemcp server for weather information queryLast updated82
- Alicense-qualityDmaintenanceMCP Server for global weather, forecasts, air quality, and climate data using Open-Meteo, no API key required.Last updatedMIT
- Flicense-qualityDmaintenanceMCP server that provides current weather and forecasts via Open-Meteo API, with an optional ML-based next-day max temperature prediction.Last updated
Related MCP Connectors
WeatherAPI.com MCP — wraps WeatherAPI.com (api.weatherapi.com)
MCP server for Grok Imagine AI video generation
OpenWeather MCP — wraps the OpenWeatherMap API (openweathermap.org)
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/AvniBhardwaj1/weather-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server