MCP 天气服务器
该项目是模型上下文协议 (MCP) 服务器的演示实现,该服务器提供与天气相关的工具。该服务器公开两个工具:
get-alerts :获取特定美国州的有效天气警报。
get-forecast :根据纬度和经度提供特定位置的天气预报。
特征
使用 Node.js 构建。
实施 MCP 工具来检索天气数据。
使用美国国家气象局 API 获取准确和最新的天气信息。
先决条件
您的系统上安装了 Node.js。
熟悉 MCP 概念和工具。
设置
通过 Smithery 安装
要通过Smithery自动为 Claude Desktop 安装 mcp-server-learn:
npx -y @smithery/cli install @adarshem/mcp-server-learn --client claude
手动安装
克隆存储库:
git clone <repository-url> cd weather使用
pnpm
安装依赖项(如项目中配置的那样):pnpm install构建项目:
pnpm build
配置
更新 VSCode 的settings.json
文件以添加此 MCP 服务器
{
"mcpServers": {
"weather": {
"command": "node",
"args": [
"/ABSOLUTE/PATH/TO/PARENT/FOLDER/weather/build/index.js"
]
}
}
}
资源
美国国家气象局 API # mcp-server-learn
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.
模型上下文协议服务器提供使用美国国家气象局 API 获取美国各州天气警报和基于纬度/经度坐标的预报的工具。
Related MCP Servers
- -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 -
- AsecurityFlicenseAqualityA Model Context Protocol server that provides AI agents with tools to retrieve weather alerts and detailed forecasts for US locations using the National Weather Service API.Last updated -288
- AsecurityFlicenseAqualityA Model Context Protocol server that provides current weather forecasts for specific locations and active weather alerts for US states.Last updated -2
- -securityFlicense-qualityA Model Context Protocol server that enables AI models to fetch weather alerts and detailed forecasts for US locations using the National Weather Service API.Last updated -88