The Mapbox MCP Server provides AI agents and applications with access to Mapbox's geospatial APIs through the Model Context Protocol, enabling capabilities such as geocoding, points of interest search, multi-modal routing, travel time analysis, route optimization, map matching, isochrone generation, static map rendering, and offline spatial calculations. The server solves the problem of integrating location intelligence into AI systems, allowing them to understand geographic data, optimize logistics, and reason about physical locations. It can be deployed as a Node.js server or accessed via Mapbox's hosted endpoint, and integrates with popular clients like Claude Desktop, VS Code, and the Goose AI agent framework.
Node.js server implementing Model Context Protocol (MCP) for Mapbox APIs.
The Mapbox MCP Server transforms any AI agent or application into a geospatially-aware system by providing seamless access to Mapbox's comprehensive location intelligence platform. With this server, your AI can understand and reason about places, navigate the physical world, and access rich geospatial data including:
render_map_tool) to display routes, search results, and your own custom GeoJSON on a real Mapbox GL JS map directly inside the chatWhether you're building an AI travel assistant, logistics optimizer, location-based recommender, or any application that needs to understand "where", the Mapbox MCP Server provides the spatial intelligence to make it possible. You can also enable it on popular clients like Claude Desktop and VS Code. See below for details

A Mapbox access token is required to use this MCP server.
For quick access, you can use our hosted MCP endpoint:
Endpoint: https://mcp.mapbox.com/mcp
For detailed setup instructions for different clients and API usage, see the Hosted MCP Server Guide.
To get a Mapbox access token:
For more information about Mapbox access tokens, see the Mapbox documentation on access tokens.
For detailed setup instructions for different integrations, refer to the following guides:
render_map_tool Guide - The map visualization primitive: full payload schema and how to render your own data standalone, without any other Mapbox toolsearch_and_geocode_tool and directions_tool ask the user to disambiguate results or pick a route, and how they fall back gracefully when the client doesn't support itTry these prompts with Claude Desktop or other MCP clients after setup:
For coordinate-first queries — "what's near me", "what neighborhood is this", "what's reachable in N minutes" — use ground_location_tool. It composes reverse geocoding, category search, and isochrone in a single call, adaptively choosing the right strategy based on the query, and returns typed records (names, addresses, coordinates, distances, reachability polygons) with citations.
Each of the four prompts below exercises a different strategy in one tool call:
render_map_tool, no other Mapbox tool neededDetailed examples: See examples/search-along-route.md for comprehensive examples of the search-along-route prompt with different use cases and MCP Inspector testing instructions.
The MCP server exposes static reference data as MCP resources. Resources provide read-only access to data that clients can reference directly without making tool calls.
URI Pattern: mapbox://categories or mapbox://categories/{language}
Access the complete list of available category IDs for use with the category search tool. Categories can be used to filter search results by type (e.g., "restaurant", "hotel", "gas_station").
Examples:
mapbox://categories - Default (English) category listmapbox://categories/ja - Japanese category namesmapbox://categories/es - Spanish category namesAccessing Resources:
resources/read MCP protocol methodresource_reader_tool with the resource URIrender_map_tool)Every geospatial tool in this server (directions, isochrone, search, and more) can display its result as a live, interactive Mapbox GL JS map via render_map_tool — the server's single visualization primitive. It renders through the MCP Apps protocol (@modelcontextprotocol/ext-apps) as a self-contained HTML panel directly inside the chat, with a Fullscreen toggle, in supported clients:
You don't need any of this server's other tools to use it. render_map_tool also accepts hand-composed GeoJSON directly — your own polygons, markers, and routes — with no dependency on directions_tool, isochrone_tool, or any other Mapbox API call. See the full render_map_tool guide for the payload schema and a complete standalone example.
If you need a guaranteed static image in clients without MCP Apps support, use static_map_image_tool instead — it returns a base64-encoded PNG/JPEG that every client can display.
Resource Fallback Tools (Opt-In for Non-Compliant Clients)
Resources are a core MCP feature supported by most clients (Claude Desktop, VS Code, MCP Inspector, etc.). However, some clients (like smolagents) don't support resources at all. For these clients, the server can provide "resource fallback tools" that deliver the same content as resources but via tool calls.
Fallback Tools:
resource_reader_tool - Generic fallback for reading any resource by URIcategory_list_tool - Provides access to category list (mapbox://categories)By default, these tools are NOT included (assumes your client supports resources). If your client doesn't support resources, enable the fallback tools:
export CLIENT_NEEDS_RESOURCE_FALLBACK=true
When to set this:
true if using smolagents or other clients without resource supportProvides access to MCP resources for clients that don't support the native MCP resource API. Use this tool to read resources like the category list.
Parameters:
uri: The resource URI to read (e.g., mapbox://categories, mapbox://categories/ja)Example Usage:
{"uri": "mapbox://categories"}{"uri": "mapbox://categories/ja"}Note: If your MCP client supports native resources, prefer using the resource API directly for better performance.
These tools perform geospatial calculations completely offline without requiring Mapbox API calls. They use Turf.js for accurate geographic computations and work anywhere, even without internet connectivity.
Calculate the distance between two geographic coordinates using the Haversine formula.
Features:
Example Usage: "What's the distance between San Francisco (37.7749°N, 122.4194°W) and New York (40.7128°N, 74.0060°W)?"
Test one or more points against a polygon or multipolygon, returning only those inside. Handles a single point or a batch in one call.
Features:
Example Usage: "Which of these delivery addresses are inside our service area?"
Calculate a destination point given a starting point, bearing, and distance using geodesic (great-circle) offset.
Features:
Example Usage: "What's the point 10km northeast of the Space Needle?"
Calculate the compass direction (bearing) from one coordinate to another.
Features:
Example Usage: "What direction should I head to go from here to the airport?"
Find the geographic midpoint between two coordinates along the great circle path.
Features:
Example Usage: "What's halfway between San Francisco and New York?"
Calculate the geometric center (centroid) of a polygon or multipolygon.
Features:
Example Usage: "Where should I place a marker for this neighborhood boundary?"
Calculate the area of a polygon.
Features:
Example Usage: "What's the area of this park in acres?"
Calculate the minimum bounding box (bbox) that contains a geometry.
Features:
Example Usage: "What's the bounding box for this route?"
Create a buffer zone (polygon) around a point, line, or polygon.
Features:
Example Usage: "Show me a 5km buffer zone around this location"
Reduce the number of vertices in a line or polygon using the Douglas-Peucker algorithm.
Features:
Example Usage: "Simplify this complex boundary to reduce the number of points"
Measure the total length of a line defined by a series of coordinates.
Features:
Example Usage: "How long is this hiking trail?"
Compute the convex hull of a set of points — the smallest convex polygon containing all of them.
Features:
Example Usage: "What's the smallest polygon that contains all of these store locations?"
Find the nearest point in a collection to a given target point.
Features:
distance_tool for each candidate and sortingExample Usage: "Which of these stores is closest to my current location?"
Snap a point to the nearest position on a line or route, returning that point and the distance to it.
Features:
Example Usage: "Where on this hiking trail am I closest to right now?"
Combine or compare two or more polygons — union_tool merges them into one geometry, intersect_tool finds the area they share, and difference_tool subtracts one from another.
Features:
render_map_tool reference so the result can be visualized directlyExample Usage: "Combine these two delivery zones into one coverage area" / "Where do these two isochrones overlap?" / "What part of this service area isn't covered by our 15-minute isochrone?"
⚠️ Deprecated: Use the resource_reader_tool with URI mapbox://categories instead, or access the mapbox://categories resource directly if your client supports MCP resources.
This tool is maintained for backward compatibility with clients that don't support MCP resources or the resource_reader_tool.
Calculates travel times and distances between multiple points using Mapbox Matrix API. Features include:
Generates static map images using the Mapbox static image API. Features include:
Performs a category search using the Mapbox Search Box category search API. Features include:
Performs reverse geocoding using the Mapbox geocoding V6 API. Features include:
Answers "what's near this coordinate" questions in a single call — place name, nearby points of interest, and travel-time reachability — sourced from live Mapbox data with citations. Use this instead of chaining reverse_geocode_tool with a web search.
Features:
render_map_tool reference with the grounded location and nearby POIs plottedExample Usage: "What neighborhood is this coordinate in, and are there any coffee shops nearby?"
Retrieves detailed information about a specific place using its Mapbox ID — photos, opening hours, ratings, phone numbers, and website URLs. Use after search_and_geocode_tool, category_search_tool, or reverse_geocode_tool to get more detail on a specific result.
Example Usage: "Tell me more about that first coffee shop result — hours, phone number, and website"
Fetches routing directions using the Mapbox Directions API. Features include:
depart_at) for driving and driving-traffic profilesarrive_by) for driving profile onlyComputes areas that are reachable within a specified amount of times from a location using Mapbox Isochrone API. Features include:
Uses the Mapbox Search Box Text Search API endpoint to power searching for and geocoding POIs, addresses, places, and any other types supported by that API. This tool consolidates the functionality that was previously provided by the ForwardGeocodeTool and PoiSearchTool (from earlier versions of this MCP server) into a single tool.
Snaps GPS traces to the road network using the Mapbox Map Matching API. Features include:
Example Usage: "Clean up this GPS trace and snap it to roads: [coordinates with timestamps]"
Finds the optimal route through multiple locations using the Mapbox Optimization API. Features include:
Example Usage: "Find the optimal route to visit these 5 stops: [list of addresses or coordinates]"
Note: A V2 API with advanced features (time windows, capacity constraints, multiple vehicles) is available but requires beta access. The V2 implementation is included in the codebase but not registered by default.
# Run the built image
npm run inspect:build
# Build the Docker image
docker build -t mapbox-mcp-server .
# Run and inspect the server
npx @modelcontextprotocol/inspector docker run -i --rm --env MAPBOX_ACCESS_TOKEN="YOUR_TOKEN" mapbox-mcp-server
npx plop create-tool
# provide tool name without suffix (e.g. Search)
# 1. Bump version in package.json
npm version <new-version> --no-git-tag-version
# 2. Sync version to manifest.json and server.json
npm run sync-manifest
# 3. Prepare CHANGELOG (replaces "Unreleased" with version and date)
npm run changelog:prepare-release <new-version>
# 4. Update package-lock.json
npm install
# 5. Review changes, then commit and tag
git add package.json package-lock.json manifest.json server.json CHANGELOG.md
git commit -m "Release v<new-version>"
git tag v<new-version>
git push && git push --tags
Important: The publisher workflow validates that package.json and server.json versions match the release version. Skipping the version bump or manifest sync will cause publish failures.
This MCP server includes comprehensive OpenTelemetry tracing for production observability:
# 1. Copy the example configuration
cp .env.example .env
# 2. Edit .env to add your MAPBOX_ACCESS_TOKEN and configure tracing
# 3. Start Jaeger for local development
npm run tracing:jaeger:start
# 4. Run the server (it will automatically use .env configuration)
npm run inspect:build
# 5. View traces at http://localhost:16686
# 6. Stop Jaeger when done
npm run tracing:jaeger:stop
Note: The server automatically loads configuration from your .env file at startup. The .env.example file includes configuration examples for multiple observability platforms.
Configuration examples included in .env.example for:
Cloud Providers:
SaaS Platforms:
See docs/tracing.md for complete setup instructions including:
Tracing Features:
We welcome contributions to the Mapbox MCP Server! Please read CONTRIBUTING.md before submitting a pull request.
Full standards and guidelines:
npm installnpm test && npm run lintAll contributions must pass our CI checks and code review process. See docs/engineering_standards.md for detailed requirements.
When you use the MCP server tools, the following data is sent directly from your environment to Mapbox APIs:
This MCP server is officially maintained by Mapbox, Inc. We provide:
MAPBOX_ACCESS_TOKEN*secretYour Mapbox access token
com.mcparmory/google-search
io.github.pipeworx-io/brave-search
marcopesani/mcp-server-serper
brave/brave-search-mcp-server
com.mcparmory/google-search-console
acamolese/google-search-console-mcp