google-weather-mcp
# Google Weather MCP
MCP server for the [Google Maps Platform Weather API](https://developers.google.com/maps/documentation/weather/overview), plus a dashboard that calls the same tools over HTTP.
## What you get
- **MCP tools** (stdio) for Cursor / Claude Desktop:
- `geocode_location`
- `get_current_weather`
- `get_hourly_forecast`
- `get_daily_forecast`
- `get_weather_dashboard`
- **Frontend** at `http://localhost:8787` — current conditions, 24-hour strip, 10-day forecast.
The API key stays on the server. The browser never sees it.
## Setup
```bash
cd google-weather-mcp
npm install
cp .env.example .env
```
Enable **Weather API** in a Google Cloud project and put the key in `.env`:
```
GOOGLE_WEATHER_API_KEY=your_key_here
```
Optional: enable **Geocoding API** on the same key (or set `GOOGLE_GEOCODING_API_KEY`). Without it, city search uses OpenStreetMap Nominatim.
Without a key, the dashboard still runs with **demo weather** so you can check the UI.
## Run the dashboard
```bash
npm start
```
Open [http://localhost:8787](http://localhost:8787). Search a city or use your location.
## Run as an MCP server
```bash
npm run mcp
```
Cursor MCP config (`~/.cursor/mcp.json` or project `.cursor/mcp.json`):
```json
{
"mcpServers": {
"google-weather": {
"command": "npx",
"args": ["tsx", "src/mcp.ts"],
"cwd": "/Users/rajendrasrirangan/Downloads/AI_Projects/google-weather-mcp",
"env": {
"GOOGLE_WEATHER_API_KEY": "your_key_here"
}
}
}
}
```
After adding it, ask the agent for weather in a city. It will call `get_weather_dashboard` (or the more specific tools).
## Google endpoints used
- `GET https://weather.googleapis.com/v1/currentConditions:lookup`
- `GET https://weather.googleapis.com/v1/forecast/hours:lookup`
- `GET https://weather.googleapis.com/v1/forecast/days:lookup`
TDQS
Scored across 5 tools
Each tool targets a clear weather data need: geocoding, current conditions, hourly, daily, and combined dashboard. The dashboard overlaps with the individual forecast tools, but its purpose as a one-call UI filler is clearly distinct.
Most tools follow a get_<detail> pattern, and geocode_location is also verb_noun, so the set is readable and predictable. The only minor deviation is geocode_location not using the get_ prefix.
Five tools is well-scoped for a weather server: geocoding plus current, hourly, daily, and dashboard views cover the domain without unnecessary bloat.
The tool surface covers the full basic weather workflow: resolve location, fetch current conditions, get forecasts at different granularities, and retrieve a combined view. No significant gaps for a weather-focused MCP server.