Provides environment variable management for storing the OpenWeatherMap API key securely in a .env file
Runtime environment required to execute the MCP server (v14 or higher)
Package manager used for installing dependencies and running the test suite
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
Related MCP server: Weather MCP
Setup
Clone or download this repository
Install dependencies:
npm installCreate a
.envfile in the root directory:touch .envAdd your OpenWeatherMap API key to the
.envfile:OPENWEATHER_API_KEY=your_openweathermap_api_key_hereYou can get a free API key from OpenWeatherMap.
Usage with Claude Code
Add this server to your MCP configuration file:
Available Tools
getWeather: Get current weather information for any city
Testing
Run the test suite:
Environment Variables
Variable | Description | Required |
| Your OpenWeatherMap API key | Yes |
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?"