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
Setup
- Clone or download this repository
- Install dependencies:
- Create a
.env
file in the root directory: - Add your OpenWeatherMap API key to the
.env
file:You 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 |
---|---|---|
OPENWEATHER_API_KEY | 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?"
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.
Tools
A Model Context Protocol server that retrieves current weather information for any city using the OpenWeatherMap API, designed for integration with Claude Code.
Related MCP Servers
- AsecurityAlicenseAqualityA Model Context Protocol server that retrieves current weather information for specified cities using the Open-Meteo API, requiring no API key.Last updated -314PythonApache 2.0
- -securityFlicense-qualityA Model Context Protocol server that provides current weather information and 3-day forecasts for specified cities using the Open-Meteo API.Last updated -Python
- -securityFlicense-qualityA 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
- AsecurityAlicenseAqualityA 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 -116JavaScriptMIT License