home / mcp / weather mcp server

Weather MCP Server

Provides weather data and forecasts via MCP, with address/coordinates queries and current-location support.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "alchaincyf-mcp": {
      "command": "node",
      "args": [
        "/path/to/weather-mcp-server/dist/index.js"
      ]
    }
  }
}

A Weather MCP Server provides weather data and forecasts through the Model Context Protocol (MCP). You can query current conditions, 1–10 day forecasts, and geocode addresses or coordinates, making it easy to integrate weather info into your MCP-enabled clients and apps.

How to use

Connect to the Weather MCP Server from any MCP client using a standard stdio configuration. Start the local server process and call the available tools to fetch current weather, forecasts, or geocoding results. You can query by address, by coordinates, or request weather for your current location.

How to install

Prerequisites: ensure you have Node.js installed (version 18 or later) and npm available on your system.

Step 1: Clone the project directory and open it.

git clone <repository-url>
cd weather-mcp-server

Step 2: Install dependencies.

npm install

Step 3: Build the TypeScript sources and start the server.

# Compile TypeScript
npm run build

# Start the server
npm start

# Optional: development mode with automatic rebuilds
npm run dev

Additional sections

MCP configuration for clients and quick start hints are shown below. You can connect using a local stdio channel and start the server with a direct Node.js command.

Claude Desktop (example integration) configuration shows how to register the Weather MCP Server in the MCP client configuration. The following setup uses a local stdio connection to the server binary.

{
  "mcpServers": {
    "weather": {
      "command": "node",
      "args": ["/path/to/weather-mcp-server/dist/index.js"]
    }
  }
}

Notes on usage and examples

Other MCP clients can connect via stdio to the same server process using the same starting command. For example, you can run the server directly in a separate session and point clients to the same Node.js entry point.

Available tools include querying current weather, getting forecasts for a given address or coordinates, and geocoding addresses. Use these tools in your MCP client to deliver weather information to users.

Available tools

get-weather-by-address

Returns current weather data for a specified address, including temperature, conditions, humidity, wind, pressure, visibility, UV index, and last update time.

get-forecast-by-address

Provides a multi-day forecast for a given address. You can specify the number of days (1–10) and receive daily temperature ranges, humidity, and rain probability.

get-current-location-weather

Fetches current weather information for the detector's inferred location based on IP or provided location context.

get-current-location-forecast

Fetches a multi-day forecast for the detector's inferred location with configurable day range.

get-weather-by-coordinates

Queries weather data for exact latitude and longitude coordinates.

geocode-address

Converts a textual address into geographic coordinates (latitude and longitude).

weather://status

Displays the current configuration status and availability of the weather service.

weather-assistant

Weather query assistant that helps format and refine weather requests and answers for end users.