getWeatherForecastByLocationLABSCO SUMMARY
A small job, done completely.
Coordinates in, readable forecast out, plus state-level alerts - and the same endpoints answer over plain REST, so a script and an MCP client can use one deployment.
What it is
A Spring AI MCP server for weather data with two tools: a readable multi-day forecast for a latitude and longitude, and the active weather alerts for a US state. It runs over HTTP with an SSE endpoint, or over stdio for editor integrations.
What you get
- A multi-day forecast in readable prose, for a latitude and longitude
- Active weather alerts for a US state
- The same two calls exposed as ordinary REST endpoints, for callers that are not MCP clients
Requirements
Java 21 and a current Maven to build the JAR, then Docker Compose to run it - build first, or Compose has nothing to start. The server listens on its configured port with the MCP endpoint at /sse; one environment switch turns it into a stdio server for an editor that wants that instead. Alerts cover US states only.
Setup effort
Build from source — git clone https://github.com/suraj0223/weather-mcp
USE CASES
Checking the weather where you are heading
Coordinates rather than a city name, so it works for a trailhead or a site as easily as a town.
Deciding whether an outdoor job can go ahead
Read the forecast, then check whether the state has an active alert against it.
Watching for severe weather in a state you operate in
Alerts come back for the state as a whole, not one point in it.
Adding weather to a report from a script
The REST endpoints answer the same two calls without an MCP client in the loop.
Planning around coordinates you were given, not a place name
The forecast takes latitude and longitude directly, so no geocoding step is needed.
2 tools
Listed in project docs. Your client may show a different list.
getAlertsBEFORE YOU INSTALL
What to know first
Tools you get
2 tools named in the project's documentation.
Requires
- Java 21
- Maven 3.9+
- Docker
Where it runs
The documented client runs the server on your machine.
INSTALLATION
Connect your client
You clone and build this one yourself.
Server setup
git clone https://github.com/suraj0223/weather-mcp
cd weather-mcp
./mvnw clean packageAdd the mcpServers block to ~/.cursor/mcp.json pointing at start-mcp-server.sh
MCP Clients
Cursor
{
"mcpServers": {
"weather": {
"command": "<YOUR_PATH_TO_WEATHER_MCP>/start-mcp-server.sh"
}
}
}~/.cursor/mcp.json