← Back to directory
M

Mapbox MCP Server

Official
Bring Mapbox's mapping, geocoding, and routing intelligence into your AI assistant
GitHub source repository ↗
★ 352 Stars Category · Other Very popular Source revision a31b07c35b4f
71FMRS · B
Reliability
11/20
Security and permissions
14/20
Maintenance
16/20
Documentation
17/20
Setup experience
13/20

Officially maintained by Mapbox, this MCP server bundles geocoding, POI search, routing, isochrones, map rendering, and a broad set of offline geometry tools into one comprehensive service, but it depends heavily on a Mapbox access token and network connectivity, and sends location data to Mapbox APIs.

Read the FMRS scoring method →

Mapbox MCP Server is a Node.js server officially maintained by Mapbox that exposes geocoding, POI search, multi-modal directions, travel-time matrices, route optimization (TSP), GPS map matching, isochrone analysis, static and interactive map rendering, and offline Turf.js-based geospatial calculations (distance, area, bearing, buffers, union/intersect/difference, etc.) as MCP tools and resources. It can run locally over stdio via npm, or connect directly to Mapbox's hosted streamable-http endpoint; either path requires a Mapbox access token.

Tools

resource_reader_tool
Fallback tool that lets clients without native MCP resource support read resources such as the category list.
category_list_tool
Deprecated tool that returns the category ID list; use resource_reader_tool or the native resource API instead.
distance_tool
Computes the great-circle distance between two coordinates offline using the Haversine formula, in multiple units.
points_within_polygon_tool
Tests one or more points against a polygon or multipolygon, returning only those inside — useful for geofencing and delivery-zone checks.
destination_tool
Calculates a destination point from a starting coordinate, bearing, and distance using a geodesic offset, without any API call.
bearing_tool
Calculates the compass bearing (0-360°) and cardinal direction from one coordinate to another.
midpoint_tool
Finds the geographic midpoint between two coordinates along the great-circle path.
centroid_tool
Calculates the centroid of a polygon or multipolygon.
area_tool
Calculates the area of a polygon in units such as square meters, square kilometers, or acres.
bounding_box_tool
Calculates the minimum bounding box containing a point, line, polygon, or multipolygon.
buffer_tool
Creates a buffer polygon around a point, line, or polygon at a given distance.
simplify_tool
Reduces the vertex count of a line or polygon using the Douglas-Peucker algorithm.
length_tool
Measures the total length of a line defined by a series of coordinates.
convex_tool
Computes the convex hull — the smallest convex polygon containing a set of points.
nearest_point_tool
Finds the nearest point in a collection to a given target point.
nearest_point_on_line_tool
Snaps a point to the nearest position on a line or route and returns the distance.
union_tool
Merges two or more polygons into a single geometry.
intersect_tool
Finds the overlapping area shared by two or more polygons.
difference_tool
Subtracts one polygon from another to compute the remaining area.
matrix_tool
Calls the Mapbox Matrix API to compute travel-time and distance matrices between multiple points, with traffic-aware departure times.
static_map_image_tool
Calls the Mapbox Static Images API to generate static map images with markers, routes, and polygon overlays.
category_search_tool
Calls the Mapbox Search Box category search API to find points of interest by category, filtered by proximity.
reverse_geocode_tool
Calls the Mapbox Geocoding V6 API to convert coordinates into human-readable addresses and location context.
ground_location_tool
Answers 'what's near this coordinate' in one call by combining reverse geocoding, category search, and isochrone, returning cited results.
place_details_tool
Retrieves detailed information for a place by Mapbox ID, including photos, hours, ratings, phone number, and website.
directions_tool
Calls the Mapbox Directions API for driving, walking, and cycling routes, with waypoints, traffic, and exclusion options.
isochrone_tool
Calls the Mapbox Isochrone API to compute areas reachable within a given travel time or distance.
search_and_geocode_tool
Calls the Mapbox Search Box Text Search API to search for and geocode POIs, addresses, and places.
map_matching_tool
Calls the Mapbox Map Matching API to snap noisy GPS traces onto the road network.
optimization_tool
Calls the Mapbox Optimization API to solve the optimal visiting order across multiple stops (TSP).
render_map_tool
Renders a live, interactive Mapbox GL JS map directly inside supported chat clients via the MCP Apps protocol, showing routes, search results, or custom GeoJSON.

Setup

  1. Sign up for a Mapbox account at mapbox.com/signup and create (or use the default) access token from your account page.
  2. For local use, add @mapbox/mcp-server to your MCP client config to be launched via npx, setting the MAPBOX_ACCESS_TOKEN environment variable.
  3. Alternatively, point your client directly at the hosted endpoint https://mcp.mapbox.com/mcp (streamable-http) without running anything locally.
  4. If your client lacks native MCP resource support (e.g. smolagents), set CLIENT_NEEDS_RESOURCE_FALLBACK=true to enable fallback tools.
  5. Restart the client and test with a geocoding or directions query to confirm connectivity.
claude_desktop_config.json
{"mcpServers": {"mapbox": {"command": "npx", "args": ["-y", "@mapbox/mcp-server"], "env": {"MAPBOX_ACCESS_TOKEN": "YOUR_MAPBOX_ACCESS_TOKEN"}}}}

Fit and risk

Best for

  • Developers building AI applications that need real geocoding, POI search, and routing data
  • Logistics, travel, and site-selection workflows that need offline geometry operations (area, buffers, union/intersect/difference)
  • Users on clients with MCP Apps support (Claude Desktop, VS Code Copilot, Claude Code, Goose) who want visual, interactive map output

Not for

  • Users without a Mapbox account who don't want to obtain an access token
  • Fully offline geocoding or routing needs, since most location APIs require live Mapbox connectivity (only the Turf.js geometry tools work offline)
  • Fleet-scale optimization with time windows, capacity constraints, or multiple vehicles — the V2 Optimization API needs beta access and isn't registered by default

Required permissions

  • Requires a valid Mapbox access token (MAPBOX_ACCESS_TOKEN), supplied as a secret environment variable
  • Local stdio deployment needs outbound network access to call Mapbox APIs
  • Using the hosted endpoint requires network access to https://mcp.mapbox.com/mcp

Risks and side effects

  • A leaked Mapbox access token can be abused, incurring extra API charges or exceeding quota
  • Geocoding, search, and directions tools send addresses, coordinates, and routing preferences to Mapbox APIs, subject to Mapbox's privacy policy
  • render_map_tool renders an HTML panel via the MCP Apps protocol, which relies on the client's handling of rich content being trustworthy
  • The advanced V2 Optimization API ships in the codebase but is unregistered by default, requiring deliberate beta opt-in

Troubleshooting

  1. Verify MAPBOX_ACCESS_TOKEN is set correctly, unexpired, and scoped for the APIs being used
  2. If tool calls fail, check network access to api.mapbox.com or mcp.mapbox.com
  3. If your client doesn't support MCP resources, set CLIENT_NEEDS_RESOURCE_FALLBACK=true to enable resource_reader_tool and category_list_tool
  4. If map rendering doesn't appear, confirm the client supports MCP Apps (Claude Desktop, VS Code Copilot, Claude Code, Goose); otherwise use static_map_image_tool for a static image
  5. For version-related issues, confirm package.json, manifest.json, and server.json versions are in sync

Use cases

Building location-aware AI travel assistants or place recommendation apps
Computing travel-time matrices and optimizing multi-stop delivery routes for logistics
Cleaning up and visualizing GPS traces snapped to the road network
Analyzing reachable areas within a given time or distance (isochrones) for site selection or coverage analysis
Rendering interactive or static maps of routes and locations directly inside a chat session

Supported clients

Claude DesktopFull support
Claude CodeFull support
VS Code (GitHub Copilot)Full support
GooseFull support
CursorPartial support
SmolagentsPartial support