mcpapp1
mcpapp1 — Weather MCP Server
一个小型 Model Context Protocol 服务器,向 MCP 客户端(如 Claude Desktop、Claude Code 和 Cursor)提供实时美国天气警报。
数据来自 National Weather Service API,该 API 免费且无需 API 密钥。
它提供的内容
类型 | 名称 | 描述 |
工具 |
| 美国某个州的活跃天气警报,使用两字母代码(例如 |
资源 |
| 将消息原样返回;用于验证服务器是否可达 |
Related MCP server: Weather MCP Server
环境要求
Python 3.13+
安装
git clone https://github.com/eyosiasbisrat/mcpapp1.git
cd mcpapp1
uv sync运行
通过 stdio 直接运行服务器:
uv run server/weather.py或者通过 MCP CLI:
uv run mcp run server/weather.py在 MCP Inspector 中以交互方式检查它:
uv run mcp dev server/weather.pyMCP 服务器通过 stdin/stdout 使用 JSON-RPC 通信,因此手动运行它只会静默等待输入。这是正常现象——通常由客户端为你启动它。
连接客户端
Claude Code / Cursor
两个配置文件都已提交到仓库,并使用相对路径,因此运行 uv sync 后无需任何修改即可使用:
.mcp.json — Claude Code
.cursor/mcp.json — Cursor
重新加载编辑器窗口,并在出现提示时批准该服务器。
Claude Desktop
uv run mcp install server/weather.py然后完全退出 Claude Desktop——包括托盘图标,因为关闭窗口后它仍在运行——然后重新打开。
如果 Claude Desktop 确实已安装,但此命令输出 Claude app not found,请参阅下文。
故障排查
在 Windows 上出现 Claude app not found
mcp install 会在固定位置查找 Claude Desktop 的配置:
%APPDATA%\Claude如果 Claude Desktop 是作为 MSIX / Microsoft Store 包安装的,其数据会被重定向到包容器中,该目录永远不会存在:
%LOCALAPPDATA%\Packages\Claude_<id>\LocalCache\Roaming\Claude\claude_desktop_config.json有两种解决方法。
直接编辑真实配置——在上面的打包路径下,向 claude_desktop_config.json 添加一个 mcpServers 条目,并保留所有现有键不变。
或者使用目录联接一次性桥接路径,之后 mcp install 就能正常用于每个服务器:
cmd /c mklink /J "%APPDATA%\Claude" "%LOCALAPPDATA%\Packages\Claude_<id>\LocalCache\Roaming\Claude"将 Claude_<id> 替换为你实际的包文件夹名称。要撤销此操作,cmd /c rmdir "%APPDATA%\Claude" 只会删除该链接,而不会删除配置。
在 Windows 上手动注册服务器时,请使用 uv 的绝对路径(例如 C:\Users\<you>\.local\bin\uv.exe)。打包应用无法可靠地继承你的 shell PATH,因此单独的 uv 可能无法启动。
验证服务器是否确实已加载
通过检查进程的父进程来确认客户端已启动它:
Get-CimInstance Win32_Process -Filter "Name='uv.exe'" | ForEach-Object {
$p = Get-CimInstance Win32_Process -Filter "ProcessId=$($_.ParentProcessId)"
"$($_.ProcessId) <- $($p.Name)"
}如果 uv.exe 的父进程是 Claude.exe,则说明服务器正在运行。请注意,某些 Claude Desktop 版本不会将每个服务器的日志写入 logs\,因此日志文件夹为空并不能证明失败。
项目结构
server/weather.py the MCP server: tool, resource, and NWS client
main.py placeholder entrypoint
.mcp.json Claude Code server config
.cursor/mcp.json Cursor server config
pyproject.toml dependencies (httpx, mcp[cli])备注
get_alerts仅覆盖美国各州,因为 NWS 是美国机构。请求会携带
User-Agent头,这是 NWS API 所要求的。网络和 HTTP 错误会被吞掉,并以友好的“unable to fetch”消息呈现,而不是堆栈跟踪。
Available Tools
1 toolget_alertsA
Get weather alerts for a US state.
Args: state: Two-letter US state code (e.g. CA, NY)
Inputs: state (required). Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 1 tool
With only one tool, there is no possibility of ambiguity or misselection. The tool's purpose is clearly defined in its name and description.
The single tool name follows the verb_noun pattern (get_alerts), which is clean and predictable. There are no other tools to create inconsistency.
One tool feels thin for a server, even one dedicated to weather alerts. While alerts retrieval is a focused task, a small set of supporting tools (e.g., list states or get alert details) would make the server feel more complete.
For the stated purpose of retrieving weather alerts, the get_alerts tool covers the core operation without obvious gaps. The domain is narrow, and no additional lifecycle operations are necessary for read-only alert access.
Maintenance
Related MCP Connectors
Hosted MCP server for Xweather weather data: conditions, forecasts, alerts, and more.
Get US weather forecasts, active and recent alerts, and current observations.
NOAA and ECMWF weather forecast MCP for discovery, validation, and GribStream OAuth queries.
US weather alerts (NWS): warnings, watches. $0.01/query. Be born in one call — free testnet funds.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceThis 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)-
- FlicenseNot gradedqualityDmaintenanceEnables users to get real-time weather alerts for US states and echo messages through both MCP server tools and a modern web interface. Provides weather information access with multiple deployment options for different use cases.1-
- AlicenseBqualityDmaintenanceProvides weather forecasts and alerts for US locations using the National Weather Service API. Enables users to retrieve active alerts by state and detailed forecasts by coordinates via MCP tools.2ISC
- FlicenseNot gradedqualityDmaintenanceEnables querying live U.S. National Weather Service alerts by state through MCP, with both Python and TypeScript implementations.-