
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 分
請在儲存庫或註冊中心條目中宣告授權條款。