weather-mcp-server

bensinclair/weather-mcp-server

3.2

If you are the rightful owner of weather-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

The Weather MCP Server provides weather information using the OpenWeatherMap API.

Tools
1
Resources
0
Prompts
0

Weather MCP Server

A Model Context Protocol (MCP) server that provides weather information using the OpenWeatherMap API.

Prerequisites

  • Node.js (v14 or higher)
  • npm
  • OpenWeatherMap API key

Setup

  1. Clone or download this repository

  2. Install dependencies:

    npm install
    
  3. Create a .env file in the root directory:

    touch .env
    
  4. Add your OpenWeatherMap API key to the .env file:

    OPENWEATHER_API_KEY=your_openweathermap_api_key_here
    

    You can get a free API key from OpenWeatherMap.

Usage with Claude Code

Add this server to your MCP configuration file:

{
  "weather": {
    "command": "node",
    "args": ["index.js"],
    "cwd": "/path/to/weather-mcp-server"
  }
}

Available Tools

  • getWeather: Get current weather information for any city

Testing

Run the test suite:

npm test

Environment Variables

VariableDescriptionRequired
OPENWEATHER_API_KEYYour OpenWeatherMap API keyYes

Example Usage

Once configured with Claude Code, you can ask for weather information:

  • "What's the weather in London?"
  • "Get me the current weather in Tokyo"
  • "How's the weather in New York?"