quickstart_mcpserver_vibe_coding
If you are the rightful owner of quickstart_mcpserver_vibe_coding and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
This is a quickstart implementation of a Model Context Protocol (MCP) server that provides weather information using the National Weather Service API.
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.