
mcp demo
一个基于MCP协议的天气信息服务,提供美国地区的天气警报和预报。
Repository Info
About This Server
一个基于MCP协议的天气信息服务,提供美国地区的天气警报和预报。
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
Weather MCP Server
A Model Context Protocol (MCP) server that provides weather information using the National Weather Service (NWS) API. This server offers tools to fetch weather alerts and forecasts for locations in the United States.
Features
- Get active weather alerts for any US state
- Fetch detailed weather forecasts for specific coordinates
- Built using FastMCP for efficient API communication
- Asynchronous HTTP requests using httpx
- Clean and formatted output for weather information
Prerequisites
- Python 3.12 or higher
uvpackage manager (recommended for installation)
Installation
- Clone the repository:
git clone <repository-url>
cd weather
- Create and activate a virtual environment:
python -m venv .venv
source .venv/bin/activate # On Unix/macOS
# or
.venv\Scripts\activate # On Windows
- Install dependencies using
uv:
uv pip install -e .
Usage
The server provides two main tools:
1. Get Weather Alerts
get_alerts(state: str) -> str
Fetches active weather alerts for a specified US state using its two-letter code (e.g., "CA" for California).
2. Get Weather Forecast
get_forecast(latitude: float, longitude: float) -> str
Retrieves a detailed weather forecast for a specific location using its latitude and longitude coordinates.
Running the Server
To start the MCP server:
uv run weather.py
Dependencies
- httpx >= 0.28.1: For making HTTP requests
- mcp[cli] >= 1.9.2: For MCP server functionality
Quick Start
Clone the repository
git clone https://github.com/jeringeorge98/mcp-demoInstall dependencies
cd mcp-demo
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.