mcp-weather-service
Click on "Deploy 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-servicewhat's the weather in Seattle?"
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-service
An MCP server that gives an AI assistant live weather data. It speaks JSON-RPC over stdio — there is no HTTP port and nothing to open in a browser. An MCP client (Claude Desktop, Claude Code, the MCP Inspector) spawns the process and talks to it over the pipe.
Tools
Tool | Description | Source |
| Current conditions for any location worldwide | OpenWeather |
| 5-day forecast, collapsed to one line per local day | OpenWeather |
| Active alerts for a US state (two-letter code) | US National Weather Service |
get_current_weather and get_forecast accept either a location name ("Tokyo", "Paris,FR") or explicit latitude/longitude, plus an optional units of metric (default) or imperial.
get_alerts is US-only and needs no API key — the NWS API is public. Alerts come from NWS rather than OpenWeather because OpenWeather only exposes them on the paid One Call 3.0 plan.
Related MCP server: Weather MCP Server
Prerequisites
Node.js 18+ (uses the global
fetch)A free OpenWeather API key
Setup
npm install
npm run buildbuild/ is gitignored, so a fresh clone must run npm run build before the server will start.
Configuration
The key is read from the OPENWEATHER_API_KEY environment variable and is never hardcoded.
Note that the MCP SDK does not pass your shell environment to the server it spawns — on Windows it copies only an allowlist (PATH, APPDATA, TEMP, …). Setting the variable in your terminal is therefore not enough for MCP clients; it must be handed over explicitly via an env block or the -e flag.
Copy the template and fill in your key:
cp mcp.example.json mcp.jsonmcp.json is gitignored — keep your real key out of version control.
Running it
MCP Inspector
npm run inspectServes a web UI at http://localhost:6274. Open the URL including the MCP_INSPECTOR_API_TOKEN query parameter it prints; the token changes on every launch.
--config replaces the server command rather than supplementing it — passing both a config file and node build/index.js is an error.
For a one-shot check with no browser:
npx @modelcontextprotocol/inspector --cli --config mcp.json --server weather \
--method tools/call --tool-name get_current_weather --tool-arg location=TokyoIn --cli mode the server command must come before any flags. Leading with -e yields a misleading No servers found in config file.
Claude Desktop
Add the server to claude_desktop_config.json:
Windows —
%APPDATA%\Claude\claude_desktop_config.jsonmacOS —
~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"weather": {
"command": "node",
"args": ["/absolute/path/to/weather-mcp/build/index.js"],
"env": { "OPENWEATHER_API_KEY": "your-key-here" }
}
}
}Use an absolute path for args. On Windows, prefer an absolute path to node.exe (e.g. C:\\Program Files\\nodejs\\node.exe) — Claude Desktop launches outside your shell, and a bare node failing to resolve is the most common reason the server never appears.
Restart Claude Desktop fully afterward (File → Exit — it stays in the tray, so closing the window does not reload the config), then ask "What's the weather in Tokyo?"
Server logs land in %APPDATA%\Claude\logs\mcp-server-weather.log.
Claude Code
claude mcp add weather -e OPENWEATHER_API_KEY=your-key-here -- node /absolute/path/to/weather-mcp/build/index.jsScripts
Script | Action |
| Compile TypeScript to |
| Run the server directly on stdio |
| Launch the MCP Inspector against |
There is no watch mode: MCP clients execute build/index.js, so run npm run build after every change to src/ or you will keep testing stale code.
Project layout
src/index.ts server, tool definitions, API clients
build/index.js compiled output (gitignored)
mcp.example.json config template — copy to mcp.jsonLicense
ISC
Available Tools
3 toolsget_alertsA
Get active weather alerts for a US state. Only supports United States locations.
| Name | Required | Description | Default |
|---|---|---|---|
| state | Yes | Two-letter US state code (e.g. CA, NY) |
get_current_weatherB
Get the current weather conditions for any location worldwide, by city name or coordinates
| Name | Required | Description | Default |
|---|---|---|---|
| units | No | metric = °C and m/s (default), imperial = °F and mph | |
| latitude | No | Latitude, used only when no location name is given | |
| location | No | City name, optionally with country/state code. Examples: "Tokyo", "Paris,FR", "Springfield,US-IL". Preferred over coordinates. | |
| longitude | No | Longitude, used only when no location name is given |
get_forecastA
Get a 5-day weather forecast for any location worldwide, by city name or coordinates
| Name | Required | Description | Default |
|---|---|---|---|
| units | No | metric = °C and m/s (default), imperial = °F and mph | |
| latitude | No | Latitude, used only when no location name is given | |
| location | No | City name, optionally with country/state code. Examples: "Tokyo", "Paris,FR", "Springfield,US-IL". Preferred over coordinates. | |
| longitude | No | Longitude, used only when no location name is given |
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
3 tool updates
v1.0.0- First observed
get_alerts - First observed
get_current_weather - First observed
get_forecast
TDQS
Scored across 3 tools
Each tool addresses a distinct weather data need: current conditions, forecast, and alerts. There is no overlap or ambiguity between them.
All tool names follow a consistent 'get_<resource>' pattern using snake_case, making them predictable and easy to understand.
With only 3 tools, the server is tightly scoped and covers the essential weather service needs without unnecessary bloat.
The tool set provides comprehensive coverage of core weather information: current conditions, forecast, and alerts. There are no obvious missing operations for a basic weather service.
Maintenance
Related MCP Connectors
An MCP server for weather information by @kulybaba
An MCP server for weather information by @kulybaba
Hosted MCP server for Xweather weather data: conditions, forecasts, alerts, and more.
MCP server for weather with reasoning — umbrella advice, outdoor checks, city comparisons.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP server that provides weather information like forecasts and alerts for US locations using the National Weather Service API.5MIT
- FlicenseBqualityDmaintenanceAn MCP server that provides weather information and alerts for US locations using the National Weather Service API, enabling retrieval of weather forecasts and active weather alerts.2-
- FlicenseBqualityDmaintenanceAn MCP server providing US National Weather Service data with tools to fetch weather alerts by state and forecasts by coordinates.2-
- FlicenseCqualityNot gradedmaintenanceAn MCP server that provides weather alerts and forecasts using the National Weather Service API, with additional system tools for shell commands and process information.31-