Java MCP weather server

Java MCP weather server

weather-mcp-server-java•bychrischiedo

A simple Model Context Protocol server built in Java that retrieves current weather information for any location using the wttr.in API.

License: MIT License•Runtime: Awaiting documentation review•Category: search web

WHAT IT DOES

  • •Provides the getWeatherDetailsByLocation tool for retrieving current weather conditions for any location via an MCP client.
  • •Fetches weather data from the free wttr.in weather API, requiring no API key.
  • •Uses STDIO transport mode and is typically started automatically by the MCP client.

BEST FOR

  • •AI assistant workflows needing current weather conditions for a location, such as checking weather in Nairobi or rain in London.
  • •Users wanting temperature information for a city through an MCP client.

ABOUT WEATHER-MCP-SERVER-JAVA

Java MCP weather server is cataloged as an MCP server attributed to chrischiedo. A simple Model Context Protocol server built in Java that retrieves current weather information for any location using the wttr.in API. It is categorized under search web. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: MIT License. Check the source repository's current license and terms before using, modifying or distributing this software.

能力检查器

能力定义尚未审核。未核验的采集内容不会作为可信接口展示。

Tools (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Resources (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Prompts (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for Java MCP weather server are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

Does the server require a weather API key?

No, it uses the free wttr.in weather API which requires no API key.

How does the server connect to MCP clients?

The server uses STDIO transport mode and is typically started automatically by the client.

上游原版 README

在 GitHub 查看同一版本原文

README.md · f448212f69f3 · 采集于 2026-11-13 13:12:27 UTC

保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。

当前显示最后一次成功采集的文档快照,请以来源页面为准。

MCP Weather Server - Java implementation

A simple Model Context Protocol (MCP) server that provides weather information for any location.

Accompanying blog post: Building a simple MCP Server in Java.

What is MCP?

The Model Context Protocol (MCP) is a standardized way for AI applications and agents to connect with data sources and tools. It allows AI models like Claude to interact with your local system, external services, and custom tools through a standardized interface.

Project Features

  • Get current weather information for any location
  • Compatible with Claude Desktop and other MCP clients
  • Uses the free wttr.in weather API (no API key required)

Project Requirements

  • Java 17 or later
  • Maven 3.6 or later
  • Spring Boot 3.3.x or later
  • Claude for Desktop for AI assistant integration (used as an MCP Client)

Dependencies

This project relies on the following key components:

<dependencies>
    <dependency>
        <groupId>org.springframework.ai</groupId>
        <artifactId>spring-ai-starter-mcp-server</artifactId>
    </dependency>

    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-web</artifactId>
    </dependency>
</dependencies>

Building and Running

The server uses STDIO transport mode and is typically started automatically by the client.

Clone the repository

The first step is to clone the project:

git clone https://github.com/chrischiedo/weather-mcp-server-java.git
cd weather-mcp-server-java

Build the project

To build the server jar, use:

./mvnw clean install -DskipTests

This will create a jar file in the target directory.

Run tests

To run tests, use:

./mvnw test

Usage

Running the server

Execute the jar file to start the MCP server:

java -jar target/weather-mcp-server-0.0.1-SNAPSHOT.jar

Claude Desktop Integration

To integrate the MCP server with Claude Desktop, add the following configuration to your Claude Desktop config settings:

{
  "mcpServers": {
    "mcp-weather-server": {
      "command": "java",
      "args": [
        "-Dspring.ai.mcp.server.stdio=true",
        "-jar",
        "/absolute/path/to/weather-mcp-server-0.0.1-SNAPSHOT.jar"
      ]
    }
  }
}

Note: On MacOS, the config settings file can be opened using:

vi ~/Library/Application\ Support/Claude/claude_desktop_config.json

Note: Remember to replace /absolute/path/to/ with the actual path to your built jar file.

Example prompts for Claude Desktop

Once connected, you can ask Claude to use the weather tool:

1. "What's the current weather in Nairobi?" sample-claude-desktop-screenshot1
2. "Is it raining in London right now?" sample-claude-desktop-screenshot2
3. "Tell me the temperature in Paris right now." sample-claude-desktop-screenshot2

Note: The prompts above were issued on 4th May 2025.

How it works

This server implements the Model Context Protocol to provide a tool that fetches weather data from the wttr.in API. When Claude or another MCP client connects to this server, they can use the getWeatherDetailsByLocation tool to retrieve current weather conditions for any location.

Extending the server

You can extend this server by:

  1. Adding more weather-related tools (forecasts, alerts, historical data, etc.)
  2. Implementing other MCP capabilities like resources or prompts
  3. Using a different weather API with more features (for example, wunderground)

License

This project is open source and available under the MIT License.

Further Resources

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for Java MCP weather server from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/weather-mcp-server-java)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

下载与拉取统计

来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。

尚无已审核的包 / 镜像标识,暂不展示下载统计。

Related search web MCP Servers

Alternative and complementary servers in the same category

View all in search web →

An MCP server that merges Google Search Console history with a live first-party crawl of your site to produce a prioritised, evidence-backed technical SEO audit inside Claude, complete with paste-ready fixes.

Repository stats unavailable
Search & Web Research

An MCP server that offers intelligent web search using OpenAI reasoning models, with support for fast iterations and deep research.

94
Search & Web Research