AccuWeather MCP

io.github.JonJam由 GitHub 帳號 JonJam 發布v1.4.11更新於 Oct 24, 2026

MCP server providing weather tools with data sourced from AccuWeather.

已驗證STDIO僅桌面位置與生活

概覽

AI 產生的概覽

一個 MCP 伺服器,為助理提供以 AccuWeather 資料為來源的天氣工具,例如目前天氣與預報。

可以做什麼
提供資料來自 AccuWeather 的天氣工具,讓助理能依需求查詢天氣資訊。README 中提供了查詢某地目前天氣的範例提示。清單中並未列出個別工具名稱與其參數。
適用情境
當你想讓助理在對話中使用 AccuWeather 資料回答天氣問題時,值得加入。它是僅限桌面的本機伺服器,適合在自己的機器上執行 Claude Desktop 或 Cursor 等 MCP 用戶端的使用者。
執行需求
以 Java 程序(jar 檔或已發佈的 Docker 映像)透過 stdio 在本機執行。需要 AccuWeather API 金鑰,透過環境變數 ACCUWEATHER_API_KEY 提供,並需要網路連線以存取 AccuWeather API。
安裝前請注意
AccuWeather API 金鑰是機密資訊,透過環境變數 ACCUWEATHER_API_KEY 傳入,請勿寫入共用設定或日誌。天氣查詢會將所請求的地點傳送給第三方 AccuWeather。啟用 Java 偵錯工具會寫入標準輸出,README 指出這會破壞 stdio MCP 協定。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 AccuWeather MCP,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

accuweather-mcp

Setup

  • Define the following environment variables in your system
export ACCUWEATHER_API_KEY=replace-with-your-api-key
  • Define a application-local.yaml in src/main/resources/application.yaml with the following content:
YAML
logging:  console:    enabled: true

Run

  • Run with SPRING_PROFILES_ACTIVE=local ./gradlew bootRun

Testing

Note: If you enable the Java debugger, it will produce output to standard out which will trigger errors in the stdio MCP protocol.

Unit and integration testing

Unit and integration tests use mockito and wiremock. To run the tests, use:

bash
./gradlew build

Mutation testing

This project uses PIT mutation testing via the gradle-pitest-plugin to verify that tests detect injected faults, complementing JaCoCo line coverage.

  • ./gradlew pitest — run mutation tests over com.jonjam.accuweathermcp.* (excluding DTOs and the bootstrap class).
  • Open build/reports/pitest/index.html to review results. Surviving mutants indicate code that is executed by tests but where a fault would not be caught.

MCP Inspector

To test with MCP Inspector, run the following from the root of the repo:

bash
npx @modelcontextprotocol/inspector -e 'JAVA_TOOL_OPTIONS=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005' java -jar "build/libs/accuweather-mcp-local-snapshot.jar"

This was sourced from this blog.

AI chat (Claude, Cursor)

  1. Add this configuration to the MCP settings:
json
{  "mcpServers": {    "accuweather-mcp": {      "command": "PATH_TO_JAVA",      "args": ["-jar", "ABSOLUTE_PATH_TO_REPO/build/libs/accuweather-mcp-local-snapshot.jar"],      "env": {        "ACCUWEATHER_API_KEY": "API_KEY"      }    }  }}

If you are using SDKMAN, command should be ~/.sdkman/candidates/java/current/bin/java

This was sourced from the MCP docs.

Example user prompt:

Use the accuweather-mcp to look up the current weather in Manchester, UK.

Docker

This project uses the Jib Gradle plugin to build a Docker image.

  • Build and load the image into your local Docker daemon:
bash
./gradlew jibDockerBuild

The default image name is jonjam/accuweather-mcp.

To use the docker image with MCP Inspector, the command looks as follows:

bash
npx @modelcontextprotocol/inspector docker run --rm -i --env "ACCUWEATHER_API_KEY=$ACCUWEATHER_API_KEY" jonjam/accuweather-mcp:latest

Patterns and practies

More information about patterns and practises for this project can be found in AGENTS.md.

Git

This project uses semantic-release to automate versioning, changelog generation, and publishing.

Important: Commit messages that are intended to trigger a release must be prefixed according to the Conventional Commits standard. For example:

  • feat: add new forecast endpoint
  • fix: correct hourly forecast time calculation

Spotless

This project uses the Spotless Gradle plugin to enforce a consistent Java style.

  • ./gradlew spotlessApply — format sources and fix style issues.
  • ./gradlew spotlessCheck — verify formatting without changing files.

Checkstyle

Static analysis and broader code-quality checks are handled by Checkstyle using a Google-style-based configuration (with formatting delegated to Spotless):

  • ./gradlew checkstyleMain — run Checkstyle over main sources.
  • ./gradlew checkstyleTest — run Checkstyle over test sources.

MCP

  • Tools Ensure to handle errors (i.e. validation) according to the specification

MCP Registry

This server is published to the MCP Registry.

When using an MCP client that supports the registry (e.g. Cursor, Claude Desktop), you can add io.github.jonjam/accuweather-mcp from the registry and configure your AccuWeather API key as the ACCUWEATHER_API_KEY environment variable.

Future improvements

  • Improve error handling in gateway classes based upon AccuWeather status codes
  • Add in-memory caching for AccuWeather API calls that caches data according to expires header
  • Add ability to specify desired metric (i.e. Celsius or Fahrenheit) in Tools
  • End to end integration tests based on Spring AI Examples

來源:README.md,提交 84f01a1

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v1.4.11最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分