#STEP 1: install uv
@SageChisanga
Model Context Protocol The Model Context Protocol is an open standard that enables developers to build secure, two-way connections between their data sources and AI-powered tools. The architecture is straightforward: developers can either expose their data through MCP servers or
Overview
What is weather?
This is an MCP server that provides weather data by querying the National Weather Service API (weather.gov). It is designed for developers building AI assistants or tools that need real-time weather forecasts and alerts.
How to use weather?
Install uv, create a new project, set up a virtual environment, and install dependencies (mcp[cli] and httpx). Then create a weather.py file that initializes a FastMCP server named "weather". Configure the server in your Claude desktop config file at ~/Library/Application Support/Claude/claude_desktop_config.json.
Key features of weather
- Built with FastMCP and httpx
- Uses the National Weather Service API
- Includes a user agent header for API requests
- Designed for easy local setup with
uv
Use cases of weather
- Fetch current weather conditions for a location
- Retrieve weather forecasts and alerts
- Integrate weather data into AI assistants or chat applications
FAQ from weather
What programming language is required?
Python 3.10+ is required, along with uv for package management.
What dependencies does it need?
It requires the mcp[cli] and httpx Python packages.
How do I configure the server for Claude Desktop?
Add the server to the Claude desktop config file located at ~/Library/Application Support/Claude/claude_desktop_config.json. The exact configuration format is not shown in this excerpt.
Does this server require an API key?
The National Weather Service API is publicly accessible without an API key, but proper user-agent headers are required.
What transport does this server use?
The server uses FastMCP, which defaults to stdio transport for local MCP communication.