
Mapbox MCP Server
Geospatial intelligence for AI: geocoding, POI search, routing, isochrones, matrices, and static maps via Mapbox APIs.
Add to your client
Copy the config for your MCP client and paste it into its config file.
npx -y @mapbox/mcp-serverPaste into ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"mapbox-mcp-server": {
"command": "npx",
"args": [
"-y",
"@mapbox/mcp-server"
],
"env": {
"MAPBOX_ACCESS_TOKEN": "<YOUR_TOKEN>"
}
}
}
}Step-by-step guides: Add to Claude Desktop · Add to Cursor · Add to Windsurf
Before you start
- A Mapbox access token (free Mapbox account at mapbox.com/signup)
- Node.js (for the npm package via npx) or Docker, for local stdio usage
- An MCP-compatible client (Claude Desktop, Claude Code, VS Code, Cursor, etc.)
About Mapbox MCP Server
The Mapbox MCP Server turns any MCP-compatible AI client (Claude Desktop, Claude Code, VS Code, Cursor, Goose, smolagents, etc.) into a geospatially-aware system. It wraps Mapbox's Search, Geocoding V6, Directions, Matrix, Isochrone, Optimization, Map Matching, and Static Images APIs, and adds offline Turf.js-based spatial calculations. Use it to build travel assistants, logistics optimizers, location recommenders, and any application that needs to reason about 'where'. It can run locally (npm/Docker/DXT, stdio) or via Mapbox's hosted HTTP endpoint with OAuth or Bearer-token authentication.
Tools & capabilities (19)
search_and_geocode_toolSearch for and geocode POIs, addresses, and places using the Mapbox Search Box Text Search API (consolidates the former forward-geocode and POI-search tools).
category_search_toolFind all places matching a category (restaurants, hotels, gas stations, etc.) with proximity filtering, result limits, and multi-language support via the Search Box category search API.
reverse_geocode_toolConvert geographic coordinates to human-readable addresses using the Geocoding V6 API, with configurable detail levels and type filtering.
directions_toolFetch routing directions for driving (with live or typical traffic), walking, and cycling across 2-25 waypoints, with alternatives, annotations, depart_at/arrive_by scheduling, vehicle constraints, and exclusions.
matrix_toolCalculate travel-time and distance matrices between multiple points (one-to-many, many-to-one, many-to-many) with traffic-aware profiles via the Matrix API.
isochrone_toolCompute areas reachable within given time or distance constraints from a location, generating multiple contours per request, via the Isochrone API.
optimization_toolSolve the traveling-salesman problem to find the optimal visiting order for 2-12 locations, with roundtrip/one-way options and turn-by-turn output, via the Optimization API.
map_matching_toolSnap noisy GPS traces (up to 100 coordinates) to the road network with optional timestamps, snap radiuses, and congestion annotations, via the Map Matching API.
static_map_image_toolGenerate static map images (with styles, markers, polylines/polygons, zoom, auto-fit) via the Static Images API; provides an interactive map preview panel in MCP Apps / MCP-UI capable clients in addition to a base64 image.
distance_toolOffline: calculate great-circle distance between two coordinates (km, miles, meters, feet, nautical miles) using the Haversine formula via Turf.js.
point_in_polygon_toolOffline: test whether a point lies inside a polygon or multipolygon (supports holes), useful for geofencing and service-area checks.
bearing_toolOffline: calculate the compass bearing (degrees and cardinal direction) from one coordinate to another.
midpoint_toolOffline: find the geographic midpoint between two coordinates along the great-circle path.
centroid_toolOffline: calculate the geometric center (centroid) of a polygon or multipolygon.
area_toolOffline: calculate the area of a polygon in square meters, square kilometers, acres, hectares, square miles, or square feet.
bounding_box_toolOffline: calculate the minimum bounding box [minLng, minLat, maxLng, maxLat] containing a geometry.
buffer_toolOffline: create a buffer-zone polygon around a point, line, or polygon for proximity analysis.
simplify_toolOffline: reduce the vertices of a line or polygon using the Douglas-Peucker algorithm with configurable tolerance and optional topology preservation.
resource_reader_toolRead MCP resources (e.g. mapbox://categories) by URI for clients that don't support the native MCP resource API.
What this server can do
Mapbox MCP Server provides tools for these capabilities — tap one to see every MCP server that does the same:
When to use it
- Build an AI travel assistant that finds POIs, gives traffic-aware directions, and renders map images
- Optimize multi-stop delivery or field-service routes (traveling-salesman problem)
- Analyze accessibility and reachability with isochrones and travel-time matrices
- Clean and visualize recorded GPS traces by snapping them to the road network
- Run offline geospatial calculations (distance, area, geofencing) with no API calls
Security notes
Requires a Mapbox access token (MAPBOX_ACCESS_TOKEN). For local stdio usage the token stays on your machine and API calls go directly from your environment to Mapbox APIs; the local server does not store or log data. The hosted endpoint (https://mcp.mapbox.com/mcp) supports OAuth or sending the token as an 'authorization: Bearer <token>' header. Data sent to Mapbox APIs is governed by Mapbox's privacy policy.
Mapbox MCP Server FAQ
How do I authenticate?
You need a Mapbox access token. For local stdio usage set it in MAPBOX_ACCESS_TOKEN. For the hosted endpoint (https://mcp.mapbox.com/mcp) you can use the interactive OAuth flow or send the token as an 'authorization: Bearer <token>' header.
Can I use it without running a server locally?
Yes. Mapbox hosts the server at https://mcp.mapbox.com/mcp over Streamable HTTP. Add it in Claude Code with 'claude mcp add --transport http ... https://mcp.mapbox.com/mcp', or configure VS Code/Cursor/Claude Desktop/OpenAI to point at that URL.
Which tools work offline?
The geospatial calculation tools (distance, bearing, midpoint, centroid, area, bounding box, buffer, simplify, point-in-polygon) use Turf.js and run entirely offline; the geocoding, search, directions, matrix, isochrone, optimization, map-matching, and static-image tools call Mapbox APIs.
Does it support interactive map previews?
Yes. The static_map_image_tool returns a base64 image to all clients and, in clients that support the MCP Apps protocol or the legacy MCP-UI spec (Claude Desktop's MCP Apps, VS Code with Copilot, Claude Code, Goose), renders an interactive map panel with a fullscreen toggle.
Alternatives to Mapbox MCP Server
Compare all alternatives →Official MCP reference server that fetches a URL and returns its content as clean Markdown, with chunking.
Official Firecrawl MCP server — scrape, crawl, map, search, and structured extraction for any LLM client.
Exa's neural web search and crawling MCP server — runs locally via npx or as a hosted remote endpoint.
Compare Mapbox MCP Server with: