Docs navigation
REST API
Weather MCP
Agents as developers
Authentication
Every REST request (except the health probe) sends an HTTP Bearer token. The same key works for the weather MCP.
Send Authorization: Bearer <key> on each request (RFC 6750). Keys come in two prefixes:
sw_live_*— production trafficsw_test_*— CI and local development
Create, rotate, and revoke keys in the dashboard. Need an account first? Create one. Your agent can mint a key after OAuth consent via create_api_key — see agents as developers.
curl "https://api.smarterweather.com/v1/weather?location=Boston,%20MA&units=imperial" \
-H "Authorization: Bearer YOUR_API_KEY"const res = await fetch(
"https://api.smarterweather.com/v1/weather?location=Boston,%20MA&units=imperial",
{ headers: { Authorization: `Bearer ${process.env.SMARTERWEATHER_API_KEY}` } },
);
const data = await res.json();import os, requests
data = requests.get(
"https://api.smarterweather.com/v1/weather",,
params={"location":"Boston, MA","units":"imperial"},
headers={"Authorization": f"Bearer {os.environ['SMARTERWEATHER_API_KEY']}"},
).json()req, _ := http.NewRequest("GET",
"https://api.smarterweather.com/v1/weather?location=Boston,%20MA&units=imperial",
nil)
req.Header.Set("Authorization", "Bearer "+os.Getenv("SMARTERWEATHER_API_KEY"))
res, _ := http.DefaultClient.Do(req)