OpenWeather MCP Server

Connect AI workflows to real-time weather conditions and forecasts using the OpenWeather MCP Server for enhanced context-aware automation and chatbot experiences.

OpenWeather MCP Server

What does “OpenWeather” MCP Server do?

The OpenWeather MCP Server is a lightweight Model Context Protocol (MCP) service that connects AI assistants to real-time weather data by interfacing with the free OpenWeatherMap API. It enables enhanced development workflows by allowing AI clients to retrieve current weather conditions and 5-day forecasts for any city, with options for configurable units (Celsius, Fahrenheit, Kelvin) and multi-language support. By exposing weather data as structured resources and tools, OpenWeather MCP Server simplifies tasks like weather information retrieval, contextual AI responses, and integration into automation pipelines. This server is ideal for projects that require up-to-date weather context, making it easier to build AI-powered applications that interact with external data sources through MCP.

List of Prompts

No explicit prompt templates are mentioned in the repository.

List of Resources

  • Current Weather Data: Provides current weather conditions for a specified city, including temperature, pressure, humidity, wind, sunrise/sunset, and more.
  • 5-Day Weather Forecast: Delivers a forecast with detailed weather data at 3-hour intervals for up to 5 days.
  • Unit Configuration: Allows clients to choose between Celsius, Fahrenheit, or Kelvin for temperature units.
  • Multi-Language Support: Offers weather data in various languages, as supported by the OpenWeatherMap API.

List of Tools

  • weather: The main tool exposed by the OpenWeather MCP server. It accepts parameters like city (required), units (optional: c|f|k), and lang (optional: en|de|fr|…). It fetches current weather and forecast data for the specified city.

Use Cases of this MCP Server

  • AI-powered Weather Chatbots: Integrate real-time weather data into conversational AI assistants, allowing users to query current conditions or forecasts for any city.
  • Travel and Event Planning: Embed weather checks into workflow automations to provide suggestions or alerts for upcoming trips or events based on forecast data.
  • Contextual AI Responses: Enhance the context-awareness of AI agents by supplying them with up-to-date local weather for better recommendation and decision-making.
  • Smart Home and IoT Integration: Use weather data to trigger smart home routines, such as adjusting heating/cooling or sending notifications based on weather changes.
  • Educational Applications: Build interactive learning tools that use real weather data to teach concepts in science, geography, or language studies.

How to set it up

Windsurf

  1. Ensure Go 1.20+ is installed.
  2. Obtain your OpenWeatherMap API key.
  3. Build the server:
    git clone https://github.com/mschneider82/mcp-openweather.git
    cd mcp-openweather
    go build -o mcp-weather
    
  4. Configure Windsurf to include the server:
    {
      "mcpServers": {
        "mcp-openweather": {
          "command": "/path/to/mcp-weather",
          "env": {
            "OWM_API_KEY": "PUT_API_KEY_HERE"
          }
        }
      }
    }
    
  5. Save changes and restart Windsurf. Verify by checking weather queries.

Claude

  1. Install via Smithery:
    npx -y @smithery/cli install @mschneider82/mcp-openweather --client claude
    
  2. Set your OpenWeatherMap API key:
    export OWM_API_KEY="your_api_key_here"
    
  3. Add to Claude’s configuration:
    {
      "mcpServers": {
        "mcp-openweather": {
          "command": "/path/to/mcp-weather",
          "env": {
            "OWM_API_KEY": "PUT_API_KEY_HERE"
          }
        }
      }
    }
    
  4. Save and restart Claude. Test by requesting weather data.

Cursor

  1. Build the server as above and ensure your API key is set.
  2. Edit Cursor’s MCP configuration file:
    {
      "mcpServers": {
        "mcp-openweather": {
          "command": "/path/to/mcp-weather",
          "env": {
            "OWM_API_KEY": "PUT_API_KEY_HERE"
          }
        }
      }
    }
    
  3. Save and restart Cursor. Confirm setup by running weather queries.

Cline

  1. Build and set up the OpenWeather MCP server as described previously.
  2. Add the server configuration to Cline:
    {
      "mcpServers": {
        "mcp-openweather": {
          "command": "/path/to/mcp-weather",
          "env": {
            "OWM_API_KEY": "PUT_API_KEY_HERE"
          }
        }
      }
    }
    
  3. Save configuration and restart Cline.
  4. Validate by issuing a weather request.

Securing API Keys

Always use environment variables for API keys. Example JSON configuration:

{
  "mcpServers": {
    "mcp-openweather": {
      "command": "/path/to/mcp-weather",
      "env": {
        "OWM_API_KEY": "${OWM_API_KEY}"  // Use your environment variable
      }
    }
  }
}

How to use this MCP inside flows

Using MCP in FlowHunt

To integrate MCP servers into your FlowHunt workflow, start by adding the MCP component to your flow and connecting it to your AI agent:

FlowHunt MCP flow

Click on the MCP component to open the configuration panel. In the system MCP configuration section, insert your MCP server details using this JSON format:

{
  "mcp-openweather": {
    "transport": "streamable_http",
    "url": "https://yourmcpserver.example/pathtothemcp/url"
  }
}

Once configured, the AI agent is now able to use this MCP as a tool with access to all its functions and capabilities. Remember to change “mcp-openweather” to whatever the actual name of your MCP server is and replace the URL with your own MCP server URL.


Overview

SectionAvailabilityDetails/Notes
Overview
List of PromptsNo prompts found
List of Resources
List of Tools
Securing API Keys
Sampling Support (less important in evaluation)Not mentioned

Based on the available information, the OpenWeather MCP Server provides clear weather data tooling and resource exposure, but lacks prompt templates and sampling support. Roots support is not mentioned.

The project is basic but functional for its purpose, with solid setup instructions and all critical features for weather data exposure.

Our opinion

The OpenWeather MCP Server is straightforward, easy to set up, and well-suited for adding weather data to AI workflows. It lacks some advanced MCP features like prompt templates and sampling, but for weather data retrieval it is robust and user-friendly.

Rating: 7/10

MCP Score

Has a LICENSE✅ (MIT)
Has at least one tool
Number of Forks3
Number of Stars2

Frequently asked questions

What is the OpenWeather MCP Server?

The OpenWeather MCP Server is a Model Context Protocol service that connects AI assistants and workflows to real-time weather data using the OpenWeatherMap API. It provides current weather conditions and 5-day forecasts for any city.

What resources and tools does it provide?

It exposes resources for current weather data and 5-day forecasts, with configurable temperature units and language support. The main tool, 'weather', accepts city, units (Celsius, Fahrenheit, Kelvin), and language as parameters.

How can I secure my API key when configuring the MCP server?

Use environment variables to store your OpenWeatherMap API key. Reference the variable (e.g., OWM_API_KEY) in your server configuration to avoid exposing sensitive information in code or version control.

What are common use cases for the OpenWeather MCP Server?

Typical use cases include AI-powered weather chatbots, travel and event planning automation, contextual AI responses, smart home integrations, and educational tools using real-time weather data.

Is it easy to set up and use with FlowHunt?

Yes, the server is lightweight, easy to build, and integrates smoothly with FlowHunt. Just add the MCP component, configure the server details, and your AI agent can access all weather data functions.

Integrate Weather Data with OpenWeather MCP Server

Enhance your AI agents and workflows with real-time weather information using FlowHunt's OpenWeather MCP integration.

Learn more