Weather MCP Server

Apache 2.0
1
  • Linux
  • Apple

Integrations

  • Provides weather information through the Open-Meteo API, allowing users to get current weather conditions for specified cities.

Weather MCP Server

A Model Context Protocol (MCP) server that provides weather information using the Open-Meteo API.

Features

  • Get current weather information for a specified city.

Installation

Pip Installation and Usage, This package can be installed using pip:

pip install mcp_weather_server

This server is designed to be installed manually by adding its configuration to the cline_mcp_settings.json file.

  1. Add the following entry to the mcpServers object in your cline_mcp_settings.json file:
{ "mcpServers": { "weather": { "command": "python", "args": [ "-m", "mcp_weather_server" ], "disabled": false, "autoApprove": [] } } }
  1. Save the cline_mcp_settings.json file.

Configuration

This server does not require an API key. It uses the Open-Meteo API, which is free and open-source.

Usage

This server provides several tools: get_weather, get_weather_by_datetime_range, and get_current_datetime.

get_weather

Retrieves the current weather information for a given city.

Parameters:

  • city (string, required): The name of the city.

Example:

To get the weather in Taipei, you would use the tool like this:

<use_mcp_tool> <server_name>weather</server_name> <tool_name>get_weather</tool_name> <arguments> { "city": "Taipei" } </arguments> </use_mcp_tool>

get_weather_by_datetime_range

Retrieves weather information for a specified city between start and end dates.

Parameters:

  • city (string, required): The name of the city.
  • start_date (string, required): Start date in format YYYY-MM-DD (ISO 8601).
  • end_date (string, required): End date in format YYYY-MM-DD (ISO 8601).

Example:

To get the weather in London between 2024-01-01 and 2024-01-07, you would use the tool like this:

<use_mcp_tool> <server_name>weather</server_name> <tool_name>get_weather_by_datetime_range</tool_name> <arguments> { "city": "London", "start_date": "2024-01-01", "end_date": "2024-01-07" } </arguments> </use_mcp_tool>

get_current_datetime

Retrieves the current time in a specified timezone.

Parameters:

  • timezone_name (string, required): IANA timezone name (e.g., 'America/New_York', 'Europe/London'). Use UTC timezone if no timezone provided by the user.

Example:

To get the current time in New York, you would use the tool like this:

<use_mcp_tool> <server_name>weather</server_name> <tool_name>get_current_datetime</tool_name> <arguments> { "timezone_name": "America/New_York" } </arguments> </use_mcp_tool>

For developers

Change Working Directory Before Running Python

python -m mcp_weather_server

Or if you want Python to find your package no matter where you run from, you can set PYTHONPATH:

set PYTHONPATH=C:\xxx\mcp_weather_server\src python -m mcp_weather_server
-
security - not tested
A
license - permissive license
-
quality - not tested

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 specified cities using the Open-Meteo API, requiring no API key.

  1. Features
    1. Installation
      1. Configuration
        1. Usage
          1. get_weather
          2. get_weather_by_datetime_range
          3. get_current_datetime
        2. For developers

          Related MCP Servers

          • -
            security
            -
            license
            -
            quality
            Provides a Model Context Protocol server that enables large language models to query and retrieve real-time weather forecasts for cities and regions across China.
            Last updated -
            Python
          • A
            security
            F
            license
            A
            quality
            A Model Context Protocol server that provides AI agents with tools to retrieve weather alerts and detailed forecasts for US locations using the National Weather Service API.
            Last updated -
            2
            115
            TypeScript
          • A
            security
            F
            license
            A
            quality
            A Model Context Protocol server that provides comprehensive weather data querying capabilities based on the Caiyun Weather API, supporting real-time weather, forecasts, and alerts with multi-language support.
            Last updated -
            7
            1
            TypeScript
          • -
            security
            -
            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

          View all related MCP servers

          ID: d2mbytzdsh