Goweathermcp
A Model Context Protocol (MCP) server written in Go that provides weather information and forecasts using the free Open-Meteo API.
Installation
npx goweathermcpAsk AI about Goweathermcp
Powered by Claude · Grounded in docs
I know everything about Goweathermcp. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
Go Weather MCP Server
A Model Context Protocol (MCP) server written in Go that provides weather information and forecasts using the free Open-Meteo API.
Features
- Get Weather by Coordinates: Retrieve current weather and forecasts using latitude and longitude.
- Get Weather by City: Search for weather by city name using built-in geocoding.
- Customizable Units: Support for various units for temperature, wind speed, and precipitation.
- Detailed Forecasts: Includes hourly (24h) and daily forecasts.
Tools
get_weather
Get current weather and forecast for a specific location using coordinates.
latitude(required): Latitude of the location.longitude(required): Longitude of the location.location_name(optional): Descriptive name for the location.temperature_unit(optional):celsiusorfahrenheit.wind_speed_unit(optional):kmh,ms,mph,kn.precipitation_unit(optional):mmorinch.
get_weather_by_city
Get weather for a city by name using geocoding.
city(required): Name of the city.country_code(optional): 2-letter country code to narrow down search.temperature_unit(optional):celsiusorfahrenheit.wind_speed_unit(optional):kmh,ms,mph,kn.precipitation_unit(optional):mmorinch.
Installation
Prerequisites
- Go 1.24.0 or later (based on
go.mod).
Build
Clone the repository and build the binary:
go build -o goweathermcp main.go
Configuration
Claude Desktop
To use this server with Claude Desktop, add the following to your claude_desktop_config.json:
{
"mcpServers": {
"goweather": {
"command": "/path/to/goweathermcp/goweathermcp",
"args": ["-temp-unit", "fahrenheit", "-wind-unit", "mph", "-precip-unit", "inch"]
}
}
}
Replace /path/to/goweathermcp/goweathermcp with the actual absolute path to your built binary. You can omit args if you prefer the defaults (celsius, kmh, mm).
Development
To run the server in development mode:
go run main.go
The server uses stdio for communication, so running it directly will wait for MCP JSON-RPC commands.
Releasing
To create a new release:
- Tag the commit:
git tag -a v1.0.0 -m "First release" - Push the tag:
git push origin v1.0.0The GitHub Action will automatically build and publish the release using GoReleaser.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgements
- Weather data provided by Open-Meteo.
- Built using the mcp-go library.
