OpenWeather MCP Server logo

OpenWeather MCP Server

by Zippland

A simple weather forecast MCP server providing global weather forecasts and current weather conditions. It allows users to query weather data from anywhere in the world using an OpenWeatherMap API key.

View on GitHub

Last updated: N/A

What is OpenWeather MCP Server?

This is an MCP (Model Control Protocol) server that provides weather forecasts and current weather conditions globally. It acts as an intermediary between an MCP client and the OpenWeatherMap API, allowing users to easily access weather data through MCP commands.

How to use OpenWeather MCP Server?

  1. Obtain an OpenWeatherMap API key. 2. Install the required packages: pip install mcp-server requests pydantic. 3. Run the server using python weather_mcp_server.py, providing the API key either as an environment variable or as a parameter when calling the tools. 4. Configure your MCP client to use the server by adding the provided JSON configuration.

Key features of OpenWeather MCP Server

  • No separate configuration file needed

  • Support for querying weather conditions anywhere in the world

  • Provides current weather and future forecasts

  • Detailed weather information including temperature, humidity, wind speed, etc.

  • Support for different time zones

Use cases of OpenWeather MCP Server

  • Integrating weather information into AI assistants

  • Displaying weather data in a desktop application

  • Automating weather-related tasks

  • Providing weather updates in a chatbot

FAQ from OpenWeather MCP Server

How do I get an OpenWeatherMap API key?

Visit OpenWeatherMap and register an account to obtain an API key.

How do I provide the API key to the server?

You can provide the API key either by setting the OPENWEATHER_API_KEY environment variable or by passing it as the api_key parameter when calling the tools.

What happens if I don't provide an API key?

You will encounter a 'No API key provided' error. Make sure to set the environment variable or provide the parameter.

What if the location is not found?

You might receive a 'Location not found' error. Try using a more accurate city name or add a country code, e.g., 'Beijing,CN' or 'Paris,FR'.

What tools are available?

The available tools are get_weather (for current weather and forecast) and get_current_weather (for current weather).