Skip to content
Docs navigation

MCP Server

The SmarterWeather MCP (Model Context Protocol) Server gives agents direct access to weather data through 36 tools in 11 toolsets. Connect Claude Desktop, Claude Code, Cursor, VS Code, or any client that speaks remote HTTP.

Smarter Weather covers the 50 US states and DC only. Every route that takes a point (lat and lon, zip or location) returns 404 outside-coverage for a point outside the 50 states and DC. /v1/alerts and /v1/observations return it for a bounding box that touches no US domain (CONUS, Alaska, Hawaii); a box that touches one may still include area outside the US. /v1/weather/batch reports it per item as outside_coverage, and /v1/point with points and /v1/series/batch mark such points out_of_domain, as they do a point the check could not reach in time (retry it). If the location lookup is unavailable, the check can briefly fail open. Routes keyed by a station, radar site, forecast office or alert id, and nationwide lists, are not filtered by point, so do not treat an empty result as an all-clear. See Errors.

Toolsets

A connection serves the toolsets it selects. The root serves core + catalog (14 tools); each badge below is the path that adds that toolset to the root.

planning comparisons, windows, totals

/x/core,catalog,planning · 4 tools

observed stations, soundings, recon

/x/core,catalog,observed · 3 tools

severe happening now

/x/core,catalog,severe · 3 tools

guidance outlooks, forecaster text

/x/core,catalog,guidance · 3 tools

history climate

/x/core,catalog,history · 2 tools

verification accuracy

/x/core,catalog,verification · 2 tools

visual images

/x/core,catalog,visual · 2 tools

exposure people at risk

/x/core,catalog,exposure · 2 tools

agriculture crops

/x/core,catalog,agriculture · 1 tool

/x/all: every toolset, 36 tools.

Connecting a toolset

  • https://mcp.smarterweather.com (root): core + catalog, 14 tools.
  • https://mcp.smarterweather.com/x/{ids}: a comma list of toolset ids, for example /x/core,catalog,planning.
  • https://mcp.smarterweather.com/x/all: every toolset, 36 tools.
  • The X-SW-Toolsets header takes the same list (or all) and wins over the path.
  • An unknown toolset id fails the connection with a 404 problem.

Remote HTTP, every toolset

Cursor syntax; the key comes from the client's environment (see Setup).

{
  "mcpServers": {
    "smarterweather": {
      "url": "https://mcp.smarterweather.com/x/all",
      "headers": {
        "Authorization": "Bearer ${env:SMARTERWEATHER_API_KEY}"
      }
    }
  }
}

stdio bridge, every toolset

The bridge connects to SMARTERWEATHER_MCP_URL when it is set, path included:

{
  "mcpServers": {
    "smarterweather": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@smarterweather/mcp-weather@latest"
      ],
      "envFile": "${workspaceFolder}/.env",
      "env": {
        "SMARTERWEATHER_MCP_URL": "https://mcp.smarterweather.com/x/all"
      }
    }
  }
}

Claude API (MCP connector)

Connect /x/all, defer every tool behind tool search, and keep the core tools loaded. Beta header mcp-client-2025-11-20.

import os

import anthropic

client = anthropic.Anthropic()

response = client.beta.messages.create(
    model="claude-opus-5-5",
    max_tokens=16000,
    betas=["mcp-client-2025-11-20"],
    mcp_servers=[
        {
            "type": "url",
            "url": "https://mcp.smarterweather.com/x/all",
            "name": "smarterweather",
            "authorization_token": os.environ["SMARTERWEATHER_API_KEY"],
        }
    ],
    tools=[
        {"type": "tool_search_tool_bm25_20251119", "name": "tool_search_tool_bm25"},
        {
            "type": "mcp_toolset",
            "mcp_server_name": "smarterweather",
            "default_config": {"defer_loading": True},
            "configs": {
                "search_locations": {"defer_loading": False},
                "get_forecast": {"defer_loading": False},
                "get_hourly_forecast": {"defer_loading": False},
                "get_current_conditions": {"defer_loading": False},
                "get_alerts": {"defer_loading": False},
                "get_observed_precipitation": {"defer_loading": False},
                "get_forecast_distribution": {"defer_loading": False},
                "search_catalog": {"defer_loading": False},
            },
        },
    ],
    messages=[{"role": "user", "content": "How much rain fell in Chicago in the last 24 hours?"}],
)