A simple Model Context Protocol (MCP) server that provides weather information for any location.
The Model Context Protocol (MCP) is a standardized way for AI applications and agents to connect with data sources and tools. It allows AI models like Claude to interact with your local system, external services, and custom tools through a standardized interface.
- Get current weather information for any location
- Compatible with Claude Desktop and other MCP clients
- Uses the free wttr.in weather API (no API key required)
# Clone the repository
git clone <your-repo-url>
cd mcp-weather-server
# Install dependencies
npm install
node index.js
- Open Claude Desktop
- Go to Settings > MCP Servers
- Add a new server
- Select "Custom" and enter the path to your server executable
- Set the command to:
node /Users/le-yo/CascadeProjects/mcp-weather-server/index.js
- Save and restart Claude Desktop
Once connected, you can ask Claude to use the weather tool:
- "What's the current weather in New York?"
- "Tell me the temperature in London right now."
- "Is it raining in Tokyo?"
This server implements the Model Context Protocol to provide a tool that fetches weather data from the wttr.in API. When Claude or another MCP client connects to this server, they can use the get_weather
tool to retrieve current weather conditions for any location.
You can extend this server by:
- Adding more weather-related tools (forecast, historical data, etc.)
- Implementing other MCP features like resources or prompts
- Using a different weather API with more features
MIT