
Weather
io.github.dingw1982由 GitHub 账号 dingw1982 发布v1.0.1更新于 Oct 24, 2026
An MCP server for weather information.
概览
一个本地 stdio MCP 天气服务器,为助手提供两个工具,用于查询美国国家气象局的天气预报和天气警报。
- 可以做什么
- 通过美国国家气象局 API 获取某地天气预报(get_forecast / get-forecast)。查询当前生效的天气警报(get_alerts / get-alerts)。两个工具都返回结构化结果,并按各自声明的 schema 进行校验。
- 适用场景
- 适合让助手回答美国天气预报或生效警报相关问题,也适合作为了解 MCP 服务器如何通过 stdio 暴露工具的最小参考示例。
- 运行要求
- 以本地 stdio 进程方式运行,来自 npm 包 @dingw1982/mcp-quickstart-ts,需要 Node.js 和 npm。清单声明了一个必需的环境变量密钥 YOUR_API_KEY。工具需要访问美国国家气象局 API 的网络连接。
安装
在 SourceWeft 中
- 打开 控制台中的 Weather,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
MCP Quickstart Resources
Example servers and clients for the Model Context Protocol (MCP), in five languages. These are companion examples for two official tutorials:
- Build an MCP server – a simple MCP weather server exposing two tools backed by the US National Weather Service API
- Build an MCP client – an LLM-powered chatbot MCP client that connects to any stdio server and lets Claude call its tools
What's in this repository
Each example lives in its own directory with its own README covering prerequisites, setup, and how to run it:
All servers communicate over stdio and expose the same two tools: get_forecast and get_alerts (or get-forecast and get-alerts in TypeScript).
All clients launch a server, list its tools, and start an interactive chat loop in which Claude can call those tools. The Python, TypeScript, and Ruby clients take a path to a server script; the Go and Rust clients take the command to run, plus any arguments.
Note: These example clients need an ANTHROPIC_API_KEY to operate. Without a key, each client still connects and lists the server's tools before exiting, so you can verify the MCP wiring without credentials.
You can mix and match across languages: for example, the Python client can drive the TypeScript server. Each client's README lists which server launch forms it supports.
The tests directory contains the smoke tests that run in CI against these examples. See tests/README.md for how they work.
Prerequisites
Each example only needs its own language toolchain. To work across the whole repository (for example, to run the smoke tests) you need:
- Node.js 24+ and npm
- Python 3.10+ and uv
- Go 1.25+
- Rust 1.88+ and Cargo
- Ruby 3.4+ and Bundler
Running the tests
The smoke tests verify that every server starts and answers MCP requests (including validating structured tool results against the schemas each tool advertises), and that the Python, TypeScript, and Ruby clients can connect to a mock server and list tools. They run automatically on every pull request via GitHub Actions.
Contributing
Contributions are welcome. To submit a change:
- Fork the repository and create a branch from
main. - Make your change. Keep the examples minimal - they exist to teach the protocol, not to be production services.
- If you change an example's behavior, setup, or dependencies, update that example's README to match.
- Run
./tests/smoke-test.shand make sure it passes. - Open a pull request against
maindescribing what changed and why.
A few conventions to follow, in line with the broader Model Context Protocol contributing guidelines:
- Keep documentation clear, concise, and technically accurate. Include code examples where appropriate, and test the commands and links you add.
- Disclose AI assistance. If you used any kind of AI assistance to prepare your contribution, say so in the pull request or issue. See AI_POLICY.md for what the disclosure should cover.
- Be respectful. This project follows the MCP community's Code of Conduct. Concerns can be reported to [email protected].
Security note
These examples are intentionally minimal. If you expose an MCP server over a network (HTTP/SSE/WebSocket), add authentication and basic hardening (CORS allowlist, request size limits, timeouts, rate limits, and log redaction). See SECURITY.md.
License
The MCP project is transitioning from the MIT License to Apache-2.0. New code contributions are licensed under Apache-2.0, and documentation (excluding specifications) under CC-BY-4.0. Earlier contributions whose authors have not consented to relicensing remain under the MIT License. See LICENSE for the full terms.
来源:README.md,提交 7ff523b
工具
0版本历史
1- v1.0.1最新Sep 16, 2026
评分
已满足适用检查项的 40%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分
请在仓库或注册中心条目中声明许可证。