arunsiv-weather-mcp-server
v1.0.1
Published
MCP server providing weather by zip code
Readme
arunsiv-weather-mcp-server
A Model Context Protocol (MCP) server that provides current weather data for any 5-digit US zip code.
Built with TypeScript and the official @modelcontextprotocol/sdk, this server exposes a get-weather tool that can be used by AI assistants (like Claude) to dynamically retrieve weather conditions.
Features
- Zip Code Geocoding: Converts 5-digit US zip codes into latitude and longitude using the free Zippopotam API.
- Current Weather Data: Fetches the current temperature (°F) and wind speed (mph) using the free Open-Meteo API.
- Zero Configuration: No API keys are required to run this server.
Installation
You can run this server directly using npx (which will download and execute it on the fly) or install it globally via npm:
npm install -g arunsiv-weather-mcp-serverUsage with Claude Desktop
To use this server with Claude Desktop, you need to add it to your Claude configuration file.
- Open your Claude Desktop configuration file:
- Mac:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
- Mac:
- Add the server under the
mcpServersobject:
{
"mcpServers": {
"weather": {
"command": "npx",
"args": [
"-y",
"arunsiv-weather-mcp-server"
]
}
}
}- Restart Claude Desktop. You can now ask Claude questions like, "What is the weather like in 90210?"
Local Development & Testing
If you want to clone this repository and test the server locally:
- Install dependencies:
npm install - Build the TypeScript code:
npm run build - Test using the official MCP Inspector:
npx @modelcontextprotocol/inspector node dist/index.js
Available Tools
get-weather
Fetches the current weather for a specific location.
- Arguments:
zipCode(string): The 5-digit US zip code.
- Returns: A text string containing the current temperature and wind speed for the matched location.
