quickstart_mcpserver_vibe_coding
The Quickstart MCP Server is designed to offer weather information through the National Weather Service API. It provides weather alerts for US states and forecasts for specific coordinates, making it a useful tool for weather monitoring in the United States.
Quickstart MCP Server
This is a quickstart implementation of a Model Context Protocol (MCP) server that provides weather information using the National Weather Service API.
Features
- Get weather alerts for any US state
- Get detailed weather forecasts for specific coordinates
Prerequisites
- Python 3.10 or higher
- MCP SDK 1.2.0 or higher
Installation
- Create a virtual environment:
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
- Install dependencies:
pip install -e .
Usage
To run the server:
python -m quickstart_mcpserver.weather
The server exposes two tools:
-
get_alerts(state: str)
: Get weather alerts for a US state- Example:
get_alerts("CA")
for California alerts
- Example:
-
get_forecast(latitude: float, longitude: float)
: Get weather forecast for a location- Example:
get_forecast(38.5816, -121.4944)
for Sacramento, CA
- Example:
Integration with Claude for Desktop
To use this server with Claude for Desktop:
- Make sure Claude for Desktop is installed and updated to the latest version
- Open the configuration file at:
- Windows:
%AppData%\Claude\claude_desktop_config.json
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
- Windows:
- Add the following configuration:
{
"mcpServers": {
"weather": {
"command": "python",
"args": ["-m", "quickstart_mcpserver.weather"]
}
}
}
- Restart Claude for Desktop
Testing
You can test the server by asking Claude questions like:
- "What's the weather in Sacramento?"
- "What are the active weather alerts in Texas?"
Note: The server uses the National Weather Service API, so it only works for US locations.