omaciel/go-temperature-server
If you are the rightful owner of go-temperature-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
Go Temperature Server is a simple Go-based MCP server that provides the current temperature for a given location via a REST API.
Go Temperature Server
This is a simple Go-based MCP server that provides the current temperature for a given location via a REST API.
Usage
-
Set your OpenWeatherMap API key as an environment variable (see below), or pass it as the
appidquery parameter to the API. -
Run the server:
go run main.go -
Query the temperature endpoint:
# Using environment variable for API key curl 'http://localhost:8080/temperature?location=London' # OR, pass API key as a query parameter curl 'http://localhost:8080/temperature?location=London&appid=your_api_key_here'
Weather API Key
This server requires an API key for a weather provider (e.g., OpenWeatherMap). You can:
-
Set it as an environment variable:
export WEATHER_API_KEY=your_api_key_here -
Or provide it as the
appidquery parameter in your request:curl 'http://localhost:8080/temperature?location=London&appid=your_api_key_here'
Configuration
PORT(optional): The port to run the server on (default: 8080)WEATHER_API_KEY: Your weather API key (optional if you provideappidas a query parameter)