gfwx/weather_mcp

A simple location-based current weather / weather forecast MCP using OpenWeather API

0

stars

7

commits

Go

primary language

Sep 14, 2026

updated

README

weather_mcp

MCP server providing weather data via OpenWeatherMap API.

Prerequisites

  • Go 1.25+
  • OpenWeatherMap API key

Build

go build -o weather ./cmd/weather

Configuration

Copy .env.example to .env and set your API key:

cp .env.example .env
# Edit .env with your OPENWEATHER_API_KEY

Run

./weather

MCP Config

Config definition

Add to your MCP client config:

{
  "mcpServers": {
    "weather": {
      "command": "./weather",
      "args": [],
      "env": {}
    }
  }
}

Opencode example config (~/.config/opencode/opencode.json)

{
  "mcpServers": {
    "weather": {
      "type": "local",
      "enabled": false,
      "command": [
        "/[absolute_path]/weather_mcp/weather"
      ],
      "environment": {
        "PATH": "/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/sbin",
        "HOME": "/Users/[username]",
        "USER": "[username]"
      },
    }
  }
}

Tools

  • get_forecast — 5-day weather forecast for coordinates
  • get_current_weather — Current weather for coordinates

Contributors

gfwx

7 commits

gfwx/weather_mcp

A simple location-based current weather / weather forecast MCP using OpenWeather API

0

stars

7

commits

Go

primary language

Sep 14, 2026

updated

README

weather_mcp

MCP server providing weather data via OpenWeatherMap API.

Prerequisites

  • Go 1.25+
  • OpenWeatherMap API key

Build

go build -o weather ./cmd/weather

Configuration

Copy .env.example to .env and set your API key:

cp .env.example .env
# Edit .env with your OPENWEATHER_API_KEY

Run

./weather

MCP Config

Config definition

Add to your MCP client config:

{
  "mcpServers": {
    "weather": {
      "command": "./weather",
      "args": [],
      "env": {}
    }
  }
}

Opencode example config (~/.config/opencode/opencode.json)

{
  "mcpServers": {
    "weather": {
      "type": "local",
      "enabled": false,
      "command": [
        "/[absolute_path]/weather_mcp/weather"
      ],
      "environment": {
        "PATH": "/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/sbin",
        "HOME": "/Users/[username]",
        "USER": "[username]"
      },
    }
  }
}

Tools

  • get_forecast — 5-day weather forecast for coordinates
  • get_current_weather — Current weather for coordinates

Contributors

gfwx

7 commits

Languages

Go

100.0%