
weather
MCP Server for weather API (Anthropic tutorial)
Repository Info
About This Server
MCP Server for weather API (Anthropic tutorial)
Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.
Documentation
MCP Weather Server
A simple MCP (Model Context Protocol) server that provides weather information tools for Large Language Models.
Overview
This server implements the MCP protocol to provide weather data from the National Weather Service API. It exposes two tools:
get_alerts: Get weather alerts for a US stateget_forecast: Get weather forecast for a location based on latitude and longitude
Installation
- Set up a Python virtual environment:
cd weather
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
- Install dependencies:
pip install "mcp[cli]" httpx
Usage
Run the server with:
python weather.py
Integrating with Claude for Desktop
To use this server with Claude for Desktop:
-
Make sure Claude for Desktop is installed
-
Edit Claude's configuration file:
- macOS/Linux:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%AppData%\Claude\claude_desktop_config.json
- macOS/Linux:
-
Add this server to the configuration:
{
"mcpServers": {
"weather": {
"command": "python",
"args": [
"/ABSOLUTE/PATH/TO/weather/weather.py"
]
}
}
}
- Restart Claude for Desktop
Example Queries
Once integrated, you can ask Claude questions like:
- "What's the weather in San Francisco?"
- "Are there any weather alerts in California?"
Quick Start
Clone the repository
git clone https://github.com/tomatitito/weatherInstall dependencies
cd weather
npm installFollow the documentation
Check the repository's README.md file for specific installation and usage instructions.
Repository Details
Recommended MCP Servers
Discord MCP
Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.
Knit MCP
Connect AI agents to 200+ SaaS applications and automate workflows.
Apify MCP Server
Deploy and interact with Apify actors for web scraping and data extraction.
BrowserStack MCP
BrowserStack MCP Server for automated testing across multiple browsers.
Zapier MCP
A Zapier server that provides automation capabilities for various apps.