Weather MCP
About
An MCP server for accessing real-time weather data and forecasts.
Details
- Author
- suraj0223
- Categories
- Cloud Service, Other, API
Jump to
Setup
Install Weather MCP in your MCP client (Claude Desktop, Cursor, Windsurf, and others).
Repository: https://github.com/suraj0223/weather-mcp
Follow the installation instructions in the repository README, then restart your MCP client.
A Model Context Protocol (MCP) server for weather data using Spring AI.
# Build the JAR file first ./mvnw clean package # Start the MCP server docker-compose up # The server will be available at: # - HTTP: http://localhost:8080 # - MCP Endpoint: http://localhost:8080/sse # - Health: http://localhost:8080/actuator/health
{ "mcpServers": { "weather": { "command": "<ABSOLUTE_PATH_OF_REPO_ON_LOCAL_MACHINE>/weather/start-mcp-server.sh" } } }
- getWeatherForecastByLocation(latitude, longitude)- Get weather forecast
- getAlerts(state)- Get weather alerts for US states
# Build the JAR (required before running docker-compose) ./mvnw clean package # Start in background docker-compose up -d # View logs docker-compose logs -f # Stop docker-compose down # Rebuild and start ./mvnw clean package && docker-compose up --build
- Java 21 (e.g. OpenJDK 21 or Temurin 21)
- Maven 3.9+
- Docker & Docker Compose
# Compile & run unit tests ./mvnw clean verify # Build the runnable JAR (output in target/) ./mvnw clean package
# Run with the JVM directly java -jar target/weather-0.0.1-SNAPSHOT.jar # Or use Spring Boot devtools for hot-reload ./mvnw spring-boot:run # Or run with Docker Compose ./mvnw clean package && docker-compose up
The server starts onhttp://localhost:8080by default.
Variables can be defined insrc/main/resources/application.yml, overridden via-Dflags, or exported in your shell.
This project exposes two flavours of API:
- MCP Tool Endpoints– consumed by supporting IDEs (e.g. Cursor).
- REST Endpoints– ordinary HTTP endpoints that you can call withcurl, Postman, etc.
Note: the REST layer simply proxies to the same service methods backing the MCP tools.
Fetches precipitation forecast data for a specific location using the Buienradar service.
Query weather information and meteorological warnings for Chinese cities using the QWeather API.
A server for fetching weather information using the OpenWeather API.
Provides hourly weather forecasts using the AccuWeather API.
Access global weather forecasts and historical data through the Open-Meteo API.
Access global weather data and forecasts using the OpenMeteo API, including current conditions, historical data, and location search.
Provides comprehensive weather data and forecasts using the OpenWeatherMap API.
An MCP server providing weather tools from the National Weather Service (weather.gov) API, built with Spring Boot.
Provides real-time weather alerts for US states using the National Weather Service API.
Provides weather information using the free and open-source Open-Meteo API. No API key required.
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.





