Mapbox MCP Server

Geocoding, place search, routing, isochrones and map images from Mapbox, plus offline geometry maths

Official · Mapbox TypeScript Remote (hosted) · Streamable HTTPLocal · stdio Maps and travel

73 popularity score ★ 367 ↓ 5.0k/wk

Connect your client

Remote (hosted)

Add in one click

Opens the app, which asks before it adds the server.

Or add it by command or config

Claude Codeterminal, then run /mcp inside Claude Code to sign in
claude mcp add --transport http mapbox-mcp-production https://mcp.mapbox.com/mcp
Claude Desktopclaude_desktop_config.json (Developer → Edit Config)
{
  "mcpServers": {
    "mapbox-mcp": {
      "command": "npx",
      "args": ["mcp-remote", "https://mcp.mapbox.com/mcp"]
    }
  }
}
VS Codemcp.json
{
  "servers": {
    "mapbox-mcp": {
      "type": "http",
      "url": "https://mcp.mapbox.com/mcp"
    }
  }
}
Cursor.cursor/mcp.json or ~/.cursor/mcp.json
{
  "mcpServers": {
    "mapbox-mcp": {
      "url": "https://mcp.mapbox.com/mcp"
    }
  }
}
Local (npm)

Add in one click

Opens the app, which asks before it adds the server. Then replace each <NAME> in its settings with your value.

Or add it by command or config

It needs MAPBOX_ACCESS_TOKEN. Replace each <NAME> with your value.

Claude CodeTerminal
claude mcp add mapbox -e MAPBOX_ACCESS_TOKEN=<MAPBOX_ACCESS_TOKEN> -- npx -y @mapbox/mcp-server
Claude Desktopclaude_desktop_config.json
{
  "mcpServers": {
    "mapbox": {
      "command": "npx",
      "args": [
        "-y",
        "@mapbox/mcp-server"
      ],
      "env": {
        "MAPBOX_ACCESS_TOKEN": "<MAPBOX_ACCESS_TOKEN>"
      }
    }
  }
}
Cursor~/.cursor/mcp.json
{
  "mcpServers": {
    "mapbox": {
      "command": "npx",
      "args": [
        "-y",
        "@mapbox/mcp-server"
      ],
      "env": {
        "MAPBOX_ACCESS_TOKEN": "<MAPBOX_ACCESS_TOKEN>"
      }
    }
  }
}
VS Code.vscode/mcp.json
{
  "servers": {
    "mapbox": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@mapbox/mcp-server"
      ],
      "env": {
        "MAPBOX_ACCESS_TOKEN": "<MAPBOX_ACCESS_TOKEN>"
      }
    }
  }
}
Codex~/.codex/config.toml
[mcp_servers.mapbox]
command = "npx"
args = ["-y", "@mapbox/mcp-server"]

[mcp_servers.mapbox.env]
MAPBOX_ACCESS_TOKEN = "<MAPBOX_ACCESS_TOKEN>"
Gemini CLITerminal
gemini mcp add --scope user -e MAPBOX_ACCESS_TOKEN=<MAPBOX_ACCESS_TOKEN> mapbox npx -- -y @mapbox/mcp-server
Local (from source)

Add in one click

Opens the app, which asks before it adds the server. Then replace each <NAME> in its settings with your value.

Or add it by command or config

It needs MAPBOX_ACCESS_TOKEN. Replace each <NAME> with your value.

FirstTerminal
git clone https://github.com/mapbox/mcp-server.git
cd mcp-server
npm install
npm run build
Claude CodeTerminal
claude mcp add mapbox -e MAPBOX_ACCESS_TOKEN=<MAPBOX_ACCESS_TOKEN> -- node '<ABSOLUTE_PATH_TO_CLONE>/dist/esm/index.js'
Claude Desktopclaude_desktop_config.json
{
  "mcpServers": {
    "mapbox": {
      "command": "node",
      "args": [
        "<ABSOLUTE_PATH_TO_CLONE>/dist/esm/index.js"
      ],
      "env": {
        "MAPBOX_ACCESS_TOKEN": "<MAPBOX_ACCESS_TOKEN>"
      }
    }
  }
}
Cursor~/.cursor/mcp.json
{
  "mcpServers": {
    "mapbox": {
      "command": "node",
      "args": [
        "<ABSOLUTE_PATH_TO_CLONE>/dist/esm/index.js"
      ],
      "env": {
        "MAPBOX_ACCESS_TOKEN": "<MAPBOX_ACCESS_TOKEN>"
      }
    }
  }
}
VS Code.vscode/mcp.json
{
  "servers": {
    "mapbox": {
      "type": "stdio",
      "command": "node",
      "args": [
        "<ABSOLUTE_PATH_TO_CLONE>/dist/esm/index.js"
      ],
      "env": {
        "MAPBOX_ACCESS_TOKEN": "<MAPBOX_ACCESS_TOKEN>"
      }
    }
  }
}
Codex~/.codex/config.toml
[mcp_servers.mapbox]
command = "node"
args = ["<ABSOLUTE_PATH_TO_CLONE>/dist/esm/index.js"]

[mcp_servers.mapbox.env]
MAPBOX_ACCESS_TOKEN = "<MAPBOX_ACCESS_TOKEN>"
Gemini CLITerminal
gemini mcp add --scope user -e MAPBOX_ACCESS_TOKEN=<MAPBOX_ACCESS_TOKEN> mapbox node -- '<ABSOLUTE_PATH_TO_CLONE>/dist/esm/index.js'

Settings 6

MAPBOX_ACCESS_TOKEN secret Required: Mapbox access token used for every Mapbox API call.
CLIENT_NEEDS_RESOURCE_FALLBACK Optional: Set to true to add resource_reader_tool and category_list_tool for clients without MCP resource support. Default false. For resource_reader_tool.
MAPBOX_API_ENDPOINT Optional: Override the Mapbox API base URL.
Set together: tracing
OTEL_TRACING_ENABLED Optional: Turn OpenTelemetry tracing on or off.
OTEL_EXPORTER_OTLP_ENDPOINT Optional: OTLP endpoint for OpenTelemetry traces.
OTEL_SERVICE_NAME Optional: Service name reported in traces.

What it does

Mapbox's own MCP server puts the Mapbox location APIs in front of an assistant. It turns addresses into coordinates and back, finds places by name or category, pulls opening hours and contact details for a place, plans routes for driving, walking and cycling, builds travel-time matrices, orders multiple stops, snaps GPS traces to roads and draws reachability areas. Results can be shown as a static PNG/JPEG map or, in clients that support MCP Apps, as an interactive map panel inside the chat via render_map_tool; since 0.16.0 that panel lists search results beside the pins with photos from Place Details.

About half the tools never call Mapbox at all: distance, bearing, area, buffers, centroids, convex hulls, polygon union, intersection and difference, and point-in-polygon tests are computed locally with Turf.js. A ground_location_tool combines reverse geocoding, category search and an isochrone in one call for questions about a single coordinate.

Version 0.16.0 registers 29 tools at start (src/tools/toolRegistry.ts at that tag). Two more, resource_reader_tool and the deprecated category_list_tool, appear only when CLIENT_NEEDS_RESOURCE_FALLBACK=true, for clients that cannot read MCP resources. The README already documents two tools that the published package lacks. They are feedback_tool, which reports wrong map, place or routing data to Mapbox, and list_public_tokens_tool, which hands back the account's pk. tokens for a web page built outside the chat. Both are registered on the main branch only, and so is the MAPBOX_PUBLIC_TOKEN setting the second one falls back to. The --enable-tools and --disable-tools flags (comma-separated tool names, read in src/config/toolConfig.ts) trim the tool list. Mapbox also runs the server as a hosted endpoint at https://mcp.mapbox.com/mcp.

What it needs

To run it yourselfNode.js 22+
Runs onmacOS, Windows, Linux
MapboxFree tierAccess token from a Mapbox account; API requests count toward that account's usage

Create a token on the Mapbox account page (a free account works). Node.js 22 or newer for the npm package (engines in package.json at v0.16.0). The hosted endpoint needs no install: sign in with a Mapbox account through the client's OAuth flow, or send the token as a Bearer header. Claude Desktop reaches the hosted endpoint only through mcp-remote, which npx fetches.

Limits

  • Not covered feedback_tool and list_public_tokens_tool, both in the README, are registered only on main and are not in the published package
  • Platform render_map_tool shows an interactive map only in MCP Apps clients (README names Claude Desktop, VS Code with Copilot, Claude Code, Goose); elsewhere use static_map_image_tool
  • Size cap directions_tool takes 2-25 waypoints, map_matching_tool up to 100 coordinate pairs, optimization_tool 2-12 locations
  • Limit Since 0.16.0, directions and isochrone results over 50 KB come back as a mapbox://response ref; reading it runs the API request again, so live-traffic results can differ slightly
  • Cost Every Mapbox API call, including the extra Place Details lookup per photo in render_map_tool's panel, counts toward the token's account usage
  • Limit The hosted endpoint speaks Streamable HTTP only, not SSE
  • Limit A .env file in the working directory is loaded at start and overrides variables already set

Two tools in the README are not in the published package. feedback_tool will need the user-feedback:write scope to send a report and user-feedback:read for its duplicate check. list_public_tokens_tool will need tokens:read to list the account's public tokens, and with a pk. token it returns that token alone. On a local install it can fall back to MAPBOX_PUBLIC_TOKEN, but only for callers using the server's own MAPBOX_ACCESS_TOKEN (ListPublicTokensTool.ts on main). Neither tool nor that setting does anything in 0.16.0.

Who it suits

Suits developers building travel, logistics or location features who already use Mapbox or are willing to create an account, and who want routing, isochrones and geocoding rather than just a map image. The hosted endpoint suits anyone who would rather not run Node 22 locally and whose client supports OAuth. The offline geometry tools are useful on their own, but the server is built around a Mapbox token. In 0.16.0 no tool changes anything in a Mapbox account. Teams standardised on another map provider will want that provider's server instead. For Mapbox developer work (styles, tokens, docs) Mapbox publishes separate servers, mcp-devkit-server and mcp-docs-server, which we also list.

Tools 31

31 only read.

search_and_geocode_tool
Find places, addresses and POIs by text and return their coordinates
reverse_geocode_tool
Turn coordinates into an address or place name
category_search_tool
List places of a category such as cafés or fuel stations near a point
place_details_tool
Fetch hours, phone, website, ratings and photos for a Mapbox place ID
ground_location_tool
Describe one coordinate: place name, nearby POIs and what is reachable, in one call
directions_tool
Plan a route over 2-25 waypoints with traffic, exclusions and timing options
matrix_tool
Compute travel times and distances between many origins and destinations
optimization_tool
Order 2-12 stops into the shortest trip
map_matching_tool
Snap a recorded GPS trace onto the road network
isochrone_tool
Draw the area reachable within given times or distances
static_map_image_tool
Render a map image with markers and overlays as PNG or JPEG
render_map_tool
Show results or your own GeoJSON as an interactive map in MCP Apps clients
distance_tool
Great-circle distance between two points, computed locally
bearing_tool
Compass bearing from one point to another
midpoint_tool
Midpoint between two points along the great circle
destination_tool
Point reached from a start, bearing and distance
length_tool
Total length of a line
area_tool
Area of a polygon in a chosen unit
centroid_tool
Centre point of a polygon
bbox_tool
Bounding box of any geometry
buffer_tool
Polygon around a point, line or shape at a set distance
simplify_tool
Cut the vertex count of a line or polygon
convex_tool
Convex hull around a set of points
points_within_polygon_tool
Return which of a batch of points lie inside a polygon
nearest_point_tool
Closest point in a set to a target
nearest_point_on_line_tool
Snap a point to the nearest spot on a line
union_tool
Merge polygons into one shape
intersect_tool
Area shared by polygons
difference_tool
Subtract one polygon from another
resource_reader_tool
Read an MCP resource by URI; only with CLIENT_NEEDS_RESOURCE_FALLBACK=true
category_list_tool
Deprecated category list; only with CLIENT_NEEDS_RESOURCE_FALLBACK=true

Resources 3

mapbox://categories
Category IDs for category search; mapbox://categories/{language} for a localised list
mapbox://place-photo/{mapbox_id}
First Place Details photo of a place as base64, used by the render_map_tool panel
mapbox://response/{tool}
Short ref to a large directions or isochrone result; reading it reruns the request

Similar servers