MCP.so
ログイン

Weather API MCP Server

@TuanKiri

基本情報

カテゴリ

メディアとデザイン

ライセンス

MIT

トランスポート

stdio

作者

TuanKiri

Weather API MCP Server について

A lightweight Model Context Protocol (MCP) server that enables AI assistants like Claude to retrieve and interpret real-time weather data. Discuss on Hacker News:

Weather API MCP Server の設定

以下の設定を使って、このサーバーを MCP 対応クライアントに追加してください。

{
  "mcpServers": {
    "weather-mcp-server": {
      "command": "docker",
      "args": [
        "build",
        "-t",
        "weather-mcp-server",
        "."
      ]
    }
  }
}

Weather API MCP Server のツール

1

Gets the current weather for a city

概要

What is Weather API MCP Server?

A lightweight Model Context Protocol (MCP) server that enables AI assistants like Claude to retrieve and interpret real-time weather data. It connects to the WeatherAPI service and exposes a current_weather tool for querying weather by city name.

How to use Weather API MCP Server?

Configure it in Claude Desktop by adding a JSON entry to the mcpServers object. Use the local mode with a compiled binary and the WEATHER_API_KEY environment variable, or the remote mode via an SSE URL. Alternatively, build from source with go build -o weather-mcp-server ./cmd/weather-mcp-server or run the Docker container with docker run -e WEATHER_API_KEY=your-api-key -d --name weather-mcp-server -p 8000:8000 weather-mcp-server.

Key features of Weather API MCP Server

  • Real‑time weather data retrieval via the current_weather tool
  • Local (stdio) and remote (SSE) transport modes
  • Docker container support for easy deployment
  • Built with Go – lightweight and cross‑platform
  • Open‑source under the MIT License

Use cases of Weather API MCP Server

  • An AI assistant answering “What’s the current weather in London?”
  • Automating weather queries inside Claude Desktop workflows
  • Integrating real‑time weather data into custom MCP‑compatible clients

よくある質問

1

What tool does this MCP server provide?

It provides a single tool: `current_weather`, which accepts a required `city` (string) parameter.

2

Where do I get an API key?

You can obtain a free API key from your personal account on [WeatherAPI](https://www.weatherapi.com/my/).

3

How can I run the server locally?

Compile the binary using Go (`go build -o weather-mcp-server ./cmd/weather-mcp-server`) or use the provided Docker image. Then add the binary path and API key to your Claude configuration in local mode.

4

Does the server support remote access?

Yes. In remote mode, you configure the server’s SSE URL (e.g., `http://host:port/sse`) in the Claude configuration instead of a local command.

5

What are the runtime dependencies?

The server is a Go binary with no external runtime dependencies beyond the API key. Building from source requires Go, and the Docker image has no host prerequisites other than Docker.

コメント

「メディアとデザイン」の他のコンテンツ