Skip to Content
BuddyGeoDocs

MCP server for Claude, Cursor & AI agents

Connect Claude Desktop, Cursor, Windsurf, and remote AI agents to BuddyGeo over Hosted Streamable HTTP or local stdio MCP for verified geocoding, messy-address repair, Spatial Q&A, routing, and isochrones.

Public Nominatim MCP wrappers frequently fail with 403 Forbidden or 429 errors when an AI agent geocodes multiple addresses in a single turn. BuddyGeo provides a Hosted Streamable HTTP MCP endpoint with 1-click OAuth 2.1 browser sign-in (plus optional X-API-Key headers) and a zero-dependency local stdio MCP server (@buddygeo/mcp-server), backed by deterministic OpenStreetMap, PostGIS, and Valhalla verification.

Looking for a plain-English visual guide with everyday examples? Visit MCP for AI assistants or the 60-second setup guide.

Modern MCP clients (Claude.ai, Claude Desktop, Cursor, ChatGPT Connectors, and OAuth-enabled remote agents) authenticate automatically via BuddyGeo's RFC 9728 / RFC 8414 discovery endpoints and browser login popup — no manual API key required:

  • MCP Endpoint: https://www.buddygeo.com/v1/mcp
  • Protected Resource Metadata: https://www.buddygeo.com/.well-known/oauth-protected-resource
  • OAuth 2.1 Authorization Server: https://www.buddygeo.com/.well-known/oauth-authorization-server
  • Dynamic Client Registration: POST https://www.buddygeo.com/api/oauth/register
{
  "mcpServers": {
    "buddygeo": {
      "url": "https://www.buddygeo.com/v1/mcp"
    }
  }
}

When your MCP client connects without credentials, /v1/mcp responds with 401 Unauthorized and a standard WWW-Authenticate: Bearer resource_metadata="..." challenge. Your client opens /oauth/authorize in the browser, lets you sign in and choose a workspace, and exchanges a PKCE S256 code for scoped bg_mcp_... access + refresh tokens.

Option 2: Hosted Streamable HTTP MCP with API Key

For headless automations, CI, or clients that prefer static workspace keys, create an API key under API keys and pass it in X-API-Key (or Authorization: Bearer bg_...):

  • Endpoint: https://www.buddygeo.com/v1/mcp
  • Header: X-API-Key: bg_live_your_key_here
{
  "mcpServers": {
    "buddygeo": {
      "url": "https://www.buddygeo.com/v1/mcp",
      "headers": {
        "X-API-Key": "bg_live_your_key_here"
      }
    }
  }
}

Option 3: Local Stdio MCP (Node.js 18+)

Add the buddygeo server to your MCP client configuration (claude_desktop_config.json or .cursor/mcp.json):

{
  "mcpServers": {
    "buddygeo": {
      "command": "npx",
      "args": ["-y", "@buddygeo/mcp-server"],
      "env": {
        "BUDDYGEO_API_KEY": "bg_live_your_key_here"
      }
    }
  }
}

If you are running directly from the repository, point command to node and args to integrations/mcp-server/bin/buddygeo-mcp.mjs.

Tools exposed to your agent (11)

ToolUnderlying endpointWhat it does
buddygeo_clean_geocodePOST /v1/ai/clean-geocodeClean messy delivery addresses, fix typos, extract unit/buzzer notes, and verify against OSM
buddygeo_askPOST /v1/ai/askAnswer plain-English spatial questions across routes, drive-time zones, inline points, or batch jobs
buddygeo_geocodeGET /v1/searchConvert an address or place name into WGS84 coordinates (with optional ai_repair)
buddygeo_reverseGET /v1/reverseConvert lat and lon into the nearest structured street address
buddygeo_routePOST /v1/routeCompute road, cycle, or walk route distance, duration, maneuvers, and GeoJSON
buddygeo_isochronePOST /v1/isochroneGenerate drive, cycle, or walk travel-time polygons around an origin
buddygeo_matrixPOST /v1/matrixCompute travel-time and road-distance matrices between sources and targets
buddygeo_nearby_placesGET /v1/places/nearbyFind nearby OpenStreetMap places within a radius via PostGIS
buddygeo_batch_submitPOST /v1/batchSubmit an asynchronous batch job with optional Cascade AI repair
buddygeo_batch_statusGET /v1/batch/{job_id}Poll batch progress, counts, and credit usage
buddygeo_usageGET /v1/usageInspect remaining monthly spatial credits, AI actions, and rate limits

Credit safety for autonomous agents

  • Empty matches (outcome: "no_match"), placeholder strings, invalid inputs, and throttled requests cost 0 credits.
  • Workspaces enforce a hard monthly cap by default, so a runaway agent cannot trigger surprise overage bills. Free workspaces can add never-expiring prepaid packs, and Developer/Growth workspaces can opt in to pro-rated metered overages with an explicit monthly $ spend cap.
  • Every tool call appears in Request logs with its request ID and credit treatment.

Open in the app

On this page