MCP Hub
Back to servers

Weather MCP Server

Enables fetching current temperature for any city using the Open-Meteo API, requiring no API key.

glama
Updated
May 4, 2026

Weather MCP Server

An example Model Context Protocol (MCP) server that exposes a get_weather tool, letting any MCP-compatible AI client fetch current temperatures by city name.

How it works

  1. Resolves the city name to coordinates via the Open-Meteo Geocoding API
  2. Fetches the current temperature from the Open-Meteo Forecast API

No API key required — both APIs are free and open.

Tool

ToolDescriptionInput
get_weatherGet current temperature for a citycity (string)

Example response: San Francisco: 14.2°C

Setup

npm install

Running the server

node weather-server.js

The server communicates over stdio using the MCP protocol.

Connecting to Claude Code

The repo includes a .mcp.json file that Claude Code picks up automatically. When you open this directory in Claude Code, the weather-server MCP server is registered and the get_weather tool becomes available.

To connect manually, add the following to your MCP client config:

{
  "mcpServers": {
    "weather-server": {
      "command": "node",
      "args": ["./weather-server.js"]
    }
  }
}

Requirements

  • Node.js 18+ (native fetch required)
  • No external API keys

Reviews

No reviews yet

Sign in to write a review