home / mcp / mcp weather server
Provides weather tools powered by the National Weather Service API for MCP clients to fetch alerts and forecasts.
Configuration
View docs{
"mcpServers": {
"broerjuang-mcp-weather": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"mcp-weather-server:latest"
]
}
}
}This MCP Weather Server provides weather-related tools for AI assistants by leveraging the National Weather Service data. It runs as a containerized MCP endpoint that you can connect to from your MCP client to fetch weather alerts and forecasts for US locations.
You interact with the server through your MCP client to perform weather-related tasks. Use the get_alerts tool to receive weather alerts for a specific US state (for example, CA or NY) and use the get_forecast tool to obtain a forecast for given coordinates (latitude and longitude). Start by adding the weather MCP endpoint to your client configuration, then issue natural language requests like “Get alerts for California” or “What’s the forecast for coordinates 40.7128, -74.0060?”. The tools respond with the relevant weather information drawn from the National Weather Service.
Once configured, you can combine weather data with other context in your conversations. The weather data is sourced for US locations only.
Prerequisites you need before installing: Docker Desktop installed and running, and access to your MCP client environment (Cursor IDE or equivalent).
Step 1 — Build the MCP Weather Server image using the provided build target.
make docker-buildStep 2 — Add the MCP server entry to your MCP client configuration. Create or edit the following file at your home directory to register the weather server. The example uses the Docker runtime to launch the server container.
{
"mcpServers": {
"weather": {
"command": "docker",
"args": ["run", "--rm", "-i", "mcp-weather-server:latest"],
"env": {}
}
}
}Step 3 — Restart your MCP client (for example, close and reopen Cursor) to load the new weather server configuration.
Optional: If your environment requires you to set environment variables for the container, add them under the env object in the snippet above or adjust the env section accordingly in your MCP client configuration.
Weather data is provided by the National Weather Service for US locations. This server exposes two tools: get_alerts for alerts by state and get_forecast for forecasts by coordinates.
Supported commands in this setup include building the image and registering the MCP server with your client, followed by restarting the client to apply changes.
mcp-weather-server:latest is accessible from your environment.make docker-build and re-add the MCP server configuration.Weather alerts for any US state (e.g., CA, NY)
Weather forecast for coordinates (latitude, longitude)