This repository contains two implementations of a Model Context Protocol (MCP) server that provides current weather data for any 5-digit US zip code.
Both servers expose a get-weather (or get_weather in Python) tool that can be used by AI assistants (like Claude Desktop) to dynamically retrieve weather conditions without needing API keys. They both rely on:
- Zippopotam API for zip code geocoding.
- Open-Meteo API for fetching temperature and wind speed.
The root of this repository contains the TypeScript implementation, built using the official @modelcontextprotocol/sdk.
- Installation:
npm install -g arunsiv-weather-mcp-server - Execution:
npx arunsiv-weather-mcp-server - Configuration (Claude Desktop):
"weather-ts": { "command": "npx", "args": ["-y", "arunsiv-weather-mcp-server"] }
The python folder contains an identical implementation built using the official mcp Python SDK (using the FastMCP class).
- Installation:
pip install arunsiv-weather-mcp-server - Execution:
arunsiv-weather-mcp-server - Configuration (Claude Desktop):
"weather-py": { "command": "arunsiv-weather-mcp-server", "args": [] }
You can use the official MCP Inspector to test either implementation locally.
For TypeScript:
npm install
npm run build
npx @modelcontextprotocol/inspector node dist/index.jsFor Python:
cd python
pip install -e .
npx @modelcontextprotocol/inspector arunsiv-weather-mcp-server