Add live weather to an AI agent
How do I stop an AI assistant from guessing the current weather?
Use a location string to retrieve current conditions, forecasts, and air quality through the same authenticated MCP endpoint as the rest of your data stack.
The steps
- weather_current
Resolve a city, ZIP code, or place and return current temperature, humidity, wind, pressure, UV, visibility, and precipitation. - weather_forecast
Optional: retrieve a one-to-sixteen-day forecast for planning workflows. - air_quality
Optional: add current air-quality and pollutant readings for health or outdoor decisions.
Result: A current weather answer grounded in a live source rather than model memory.
Safe example
weather_current
{
"location": "Austin, TX"
}Returns current conditions for Austin with observation time, temperature, feels-like temperature, humidity, wind, cloud cover, pressure, precipitation, UV index, and visibility.
This is a fixed documentation example. It makes no API call. The separate anonymous evaluation remains atomically capped at 25 lifetime calls per network; ongoing use requires a metered key.
Connect from your client
Cursor and bearer-header MCP clients
Add this remote server configuration, replacing YOUR_API_KEY.
{
"mcpServers": {
"livedatalink": {
"url": "https://livedatalink.ai/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}VS Code / GitHub Copilot
Save as .vscode/mcp.json. VS Code prompts for the key instead of committing it.
{
"inputs": [
{
"id": "livedatalink-key",
"type": "promptString",
"description": "LiveDataLink API key",
"password": true
}
],
"servers": {
"livedatalink": {
"type": "http",
"url": "https://livedatalink.ai/mcp",
"headers": {
"Authorization": "Bearer ${input:livedatalink-key}"
}
}
}
}OpenAI Responses API
Pass LiveDataLink as a remote MCP tool with an authorization header.
const response = await openai.responses.create({
model: "gpt-5.6",
input: "Use LiveDataLink to answer the request.",
tools: [{
type: "mcp",
server_label: "livedatalink",
server_url: "https://livedatalink.ai/mcp",
headers: { Authorization: "Bearer YOUR_API_KEY" },
require_approval: "never"
}]
});Claude and Claude Desktop
Claude's current remote-connector flow accepts authless or OAuth servers and does not accept LiveDataLink's API-key header directly. Do not paste the older claude_desktop_config.json remote-URL example. OAuth support is the remaining prerequisite for a native Claude connector.
Raw JSON-RPC smoke test
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "weather_current",
"arguments": {
"location": "Austin, TX"
}
}
}Send this body to https://livedatalink.ai/mcp with Authorization: Bearer YOUR_API_KEY.
All 284 tools run under the same key; the free tier gives you 1,000 queries/month with no card.
Related searches: weather mcp server · live weather api ai · chatgpt current weather · claude weather tool · mcp weather forecast.
FAQ
- How do I how do i stop an ai assistant from guessing the current weather?
- Use a location string to retrieve current conditions, forecasts, and air quality through the same authenticated MCP endpoint as the rest of your data stack. In LiveDataLink: weather_current → weather_forecast → air_quality. A current weather answer grounded in a live source rather than model memory.
- What does this cost?
- The free tier includes 1,000 queries/month with no credit card. Every tool in this recipe is callable on the free tier; paid plans start at $10/month for higher volume.
- How do I connect?
- Add https://livedatalink.ai/mcp as a Streamable-HTTP MCP server with a Bearer key in Claude, Cursor, or n8n, then call the tools in order. Get a free key at https://livedatalink.ai/signup/free.
Start free - 1,000 queries/month → Browse all 59 data domains