Integrations
Used for API key management and configuration through environment variables loaded from .env files
Supports repository cloning for installation of the weather service
Hosts the weather-mcp repository which can be cloned for installation
Weather MCP Service
一个基于 Model Control Protocol (MCP) 的天气信息服务,提供天气预报和警报查询功能。
功能
- 获取美国各州的天气警报(
get_alerts
) - 通过经纬度查询天气预报(
get_forecast
)
技术栈
- Python 3.11+
- MCP (Model Control Protocol)
- FastMCP 服务器
- LangGraph + LangChain
- SSE (Server-Sent Events) 传输
安装
- 克隆仓库:Copy
- 创建虚拟环境:Copy
- 安装依赖:Copy
- 配置环境变量:
- 创建
.env
文件,参考.env.example
文件格式 - 添加必要的 API 密钥
- 创建
使用方法
- 启动 Weather 服务器:服务器将在 http://localhost:8000 上启动,使用 SSE 传输。Copy
- 在另一个终端窗口中运行客户端:客户端将连接到服务器并执行一系列天气查询测试。Copy
API 功能
天气警报查询
state
: 两字母美国州代码(例如:CA, NY)- 返回:该州的活跃天气警报列表
天气预报查询
latitude
: 位置纬度longitude
: 位置经度- 返回:该位置的天气预报
项目结构
weather-mcp/ ├── weather/ │ ├── weather.py # 主服务器文件 │ ├── mcp_client.py # 客户端测试文件 ├── requirements.txt # 项目依赖 ├── .env.example # 环境变量示例 └── README.md # 本文档
- 编辑
.env
文件,填入您的实际配置:Copy - 确保
.env
文件不会被提交到版本控制系统中
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
A Model Control Protocol (MCP) based service that allows users to query weather forecasts by coordinates and receive weather alerts for U.S. states.
Related MCP Servers
- -securityFlicense-qualityThis SSE-based MCP server allows users to connect and interact with National Weather Service APIs to retrieve weather alerts and forecasts.Last updated -90Python
- -securityFlicense-qualityThis is a Model Context Protocol (MCP) server that provides weather information using the National Weather Service (NWS) API. Features Get weather alerts for a US state Get weather forecast for a specific location (using latitude and longitude)Last updated -Python
- AsecurityAlicenseAqualityModel Context Protocol (MCP) server that provides weather forecast, warnings, water level associated with flood, and earthquake reports from Malaysia Government's Open API.Last updated -4PythonMIT License
- -securityFlicense-qualityAn MCP server implementation that allows users to fetch and display weather information for specified cities, including temperature, humidity, wind speed, and weather descriptions.Last updated -Python