MCP.so
Sign In

Weather API MCP Server

@TuanKiri

About 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:

Basic information

Category

Media & Design

License

MIT

Runtime

go

Transports

stdio

Publisher

TuanKiri

Config

Add this server to your MCP-compatible client using the configuration below.

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

Tools

1

Gets the current weather for a city

Overview

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

FAQ from Weather API MCP Server

What tool does this MCP server provide?

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

Where do I get an API key?

You can obtain a free API key from your personal account on WeatherAPI.

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.

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.

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.

Comments

More Media & Design MCP servers