Skip to main content
Glama

Weather MCP Server

by bensinclair

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?"
Install Server
A
security – no known vulnerabilities
F
license - not found
A
quality - confirmed to work

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

A Model Context Protocol server that retrieves current weather information for any city using the OpenWeatherMap API, designed for integration with Claude Code.

  1. Prerequisites
    1. Setup
      1. Usage with Claude Code
        1. Available Tools
          1. Testing
            1. Environment Variables
              1. Example Usage

                Related MCP Servers

                • A
                  security
                  A
                  license
                  A
                  quality
                  A Model Context Protocol server that retrieves current weather information for specified cities using the Open-Meteo API, requiring no API key.
                  Last updated -
                  3
                  14
                  Python
                  Apache 2.0
                  • Linux
                  • Apple
                • -
                  security
                  F
                  license
                  -
                  quality
                  A Model Context Protocol server that provides current weather information and 3-day forecasts for specified cities using the Open-Meteo API.
                  Last updated -
                  Python
                • -
                  security
                  F
                  license
                  -
                  quality
                  A production-ready Model Context Protocol server that provides weather data from OpenWeatherMap API, allowing users to query current weather by city name or coordinates with support for different temperature units.
                  Last updated -
                  Python
                  • Apple
                  • Linux
                • A
                  security
                  A
                  license
                  A
                  quality
                  A Model Context Protocol server that provides comprehensive weather data and forecasts through the OpenWeatherMap API, enabling AI assistants to access real-time weather information, forecasts, air quality data, and location services.
                  Last updated -
                  11
                  6
                  JavaScript
                  MIT License

                View all related MCP servers

                MCP directory API

                We provide all the information about MCP servers via our MCP API.

                curl -X GET 'https://glama.ai/api/mcp/v1/servers/bensinclair/weather-mcp-server'

                If you have feedback or need assistance with the MCP directory API, please join our Discord server