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 分