mapbox-mcp-server
The Mapbox MCP Server provides navigation, matrix calculations, and geocoding services through the Mapbox API:
Navigation: Get directions between coordinates (
mapbox_directions) or places by name (mapbox_directions_by_places) for driving, walking, cycling, or driving with traffic.Matrix Calculations: Calculate travel time and distance matrices between coordinates or places with customizable options.
Geocoding: Search for places and convert addresses to coordinates with support for fuzzy matching, language preferences, and result filtering.
Error Handling: Comprehensive validation and error management for API interactions.
Provides navigation and geocoding capabilities through the Mapbox API, including routing between coordinates or place names, calculating travel time and distance matrices, and converting place names to coordinates.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mapbox-mcp-serverget directions from Central Park to Times Square"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Mapbox MCP Server
MCP Server for the Mapbox API.
Features
Navigation Tools
mapbox_directionsGet directions between coordinates
Inputs:
coordinates({latitude: number, longitude: number}[])profile(optional): "driving-traffic", "driving", "walking", "cycling"
Returns: route details with steps, distance, duration
mapbox_directions_by_placesGet directions between places using their names
Inputs:
places(string[]): Array of place namesprofile(optional): "driving-traffic", "driving", "walking", "cycling"language(optional): Two-letter language code (e.g., "zh", "en")
Returns:
Geocoding results for each place
Route details with steps, distance, duration
Any errors that occurred during processing
mapbox_matrixCalculate travel time and distance matrices between coordinates
Inputs:
coordinates({latitude: number, longitude: number}[])profile(optional): "driving", "walking", "cycling"annotations(optional): "duration", "distance", "duration,distance"sources(optional): Indices of source coordinatesdestinations(optional): Indices of destination coordinates
Returns: Matrix of durations and/or distances between points
mapbox_matrix_by_placesCalculate travel time and distance matrices between places using their names
Inputs:
places(string[]): Array of place names (2-25 places)profile(optional): "driving", "walking", "cycling"annotations(optional): "duration", "distance", "duration,distance"language(optional): Two-letter language codesources(optional): Indices of source placesdestinations(optional): Indices of destination places
Returns:
Geocoding results for each place
Matrix of durations and/or distances
Any errors that occurred during processing
Search Tools
mapbox_geocodingSearch for places and convert addresses into coordinates
Inputs:
searchText(string): The place or address to search forlimit(optional): Maximum number of results (1-10)types(optional): Filter by place types (country, region, place, etc.)language(optional): Two-letter language codefuzzyMatch(optional): Enable/disable fuzzy matching
Returns: Detailed location information including coordinates and properties
Related MCP server: Overture Maps MCP
Claude Desktop Integration
Add this configuration to your Claude Desktop config file (typically located at ~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"mapbox-mcp-server": {
"command": "node",
"args": ["/absolute/path/to/mapbox-mcp-server/build/index.js"],
"env": {
"MAPBOX_ACCESS_TOKEN": "your-api-key"
}
}
}
}Setup
Prerequisites
Node.js 16 or higher
TypeScript 4.5 or higher
A valid Mapbox API key
API Key
Get a Mapbox API key by following the instructions here.
Set your API key as an environment variable:
export MAPBOX_ACCESS_TOKEN=your_api_key_hereRate Limits
Directions API: 300 requests per minute
Matrix API:
60 requests per minute for driving/walking/cycling
30 requests per minute for driving-traffic
Geocoding API: 600 requests per minute
Deployment
Structure
In mapbox-mcp-server, we use the following structure to manage the server's handlers:
src/server/handlers/base.ts: Base class for all handlerssrc/server/registry.ts: Registry for all handlerssrc/server/main.ts: Main entry point for the server
Each feature module follows this structure:
src/
├── types/ # Type definitions
├── schemas/ # Zod schemas for validation
├── tools/
│ ├── definitions/ # Tool definitions
│ └── handlers/ # Tool implementations
└── server/
└── handlers/ # Handler classesClass Diagram:

Process Diagram:

Error Handling
All tools implement comprehensive error handling:
Input validation errors
API request failures
Rate limit errors
Service-specific errors (e.g., no routes found, invalid coordinates)
License
This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository.
Available Tools
5 toolsmapbox_directionsC
Get navigation route between two points
| Name | Required | Description | Default |
|---|---|---|---|
| coordinates | Yes | Array of coordinates | |
| profile | No | Navigation mode | driving-traffic |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. While 'Get navigation route' implies a read-only operation, it doesn't disclose important behavioral traits like authentication requirements, rate limits, response format, error conditions, or whether this is a real-time vs. cached service. The description is minimal and lacks operational context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise - a single sentence that gets straight to the point with zero wasted words. It's front-loaded with the core functionality and uses clear, direct language without unnecessary elaboration.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with no annotations and no output schema, the description is insufficiently complete. It doesn't explain what the tool returns (route geometry? distance? duration? turn-by-turn instructions?), doesn't mention error conditions or limitations, and provides no context about the Mapbox service it interacts with. The agent would have significant gaps in understanding how to properly use this tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema description coverage is 100%, with both parameters well-documented in the schema itself. The description doesn't add any meaningful parameter semantics beyond what's already in the schema - it mentions 'between two points' which implies the coordinates array should contain exactly two coordinate objects, but this constraint isn't explicitly stated in either the description or schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb ('Get') and resource ('navigation route between two points'), making the purpose immediately understandable. However, it doesn't distinguish this tool from its sibling 'mapbox_directions_by_places', which likely serves a similar purpose with different input parameters.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. There's no mention of sibling tools like 'mapbox_directions_by_places' or 'mapbox_matrix', nor any context about when coordinate-based routing is preferred over place-based routing or matrix calculations.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
mapbox_directions_by_placesC
Get navigation route between multiple places using their names
| Name | Required | Description | Default |
|---|---|---|---|
| places | Yes | Array of place names to route between | |
| profile | No | Navigation mode | driving |
| language | No | Language for geocoding results |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions geocoding implicitly ('using their names'), but doesn't clarify authentication needs, rate limits, error handling, or what the route output includes (e.g., distance, duration, geometry). For a tool that performs geocoding and routing, this is a significant gap.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that front-loads the core functionality. Every word earns its place, with no redundant or vague phrasing, making it easy for an agent to parse quickly.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no annotations and no output schema, the description is incomplete for a tool with geocoding and routing complexity. It doesn't explain what the route output includes (e.g., JSON structure, key fields like distance or polyline), error cases (e.g., invalid place names), or behavioral constraints, leaving gaps for agent invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema fully documents parameters. The description adds minimal value beyond the schema—it implies 'places' are names (not coordinates) and mentions geocoding, but doesn't explain parameter interactions or usage nuances. Baseline 3 is appropriate as the schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb ('Get navigation route') and resource ('between multiple places'), specifying it uses place names rather than coordinates. However, it doesn't explicitly differentiate from sibling tools like 'mapbox_directions' (which likely uses coordinates) or 'mapbox_matrix_by_places' (which might calculate multiple routes).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives. The description doesn't mention sibling tools like 'mapbox_directions' (for coordinate-based routing) or 'mapbox_matrix_by_places' (which might handle distance matrices between places), leaving the agent without context for tool selection.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
mapbox_geocodingC
Search for places and convert addresses into coordinates
| Name | Required | Description | Default |
|---|---|---|---|
| searchText | Yes | The search text to geocode | |
| limit | No | Limit the number of results | |
| types | No | Filter results by feature types | |
| language | No | Language of the search results | |
| fuzzyMatch | No | Enable/disable fuzzy matching |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden but offers minimal behavioral insight. It mentions 'search' and 'convert' but doesn't disclose rate limits, authentication needs, error handling, or what the output looks like (e.g., coordinates format). This is inadequate for a tool with 5 parameters and no output schema.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence with zero waste. It's front-loaded with the core purpose and appropriately sized for the tool's complexity, making it easy for an agent to parse quickly.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's moderate complexity (5 parameters, no annotations, no output schema), the description is incomplete. It lacks behavioral details, usage context, and output information, leaving significant gaps for an agent to operate effectively without trial and error.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema fully documents all 5 parameters. The description adds no additional meaning beyond implying geocoding functionality, which aligns with the schema but doesn't enhance parameter understanding. Baseline 3 is appropriate as the schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose with specific verbs ('search for places' and 'convert addresses into coordinates') and identifies the resource (geographic data). It distinguishes from sibling tools like mapbox_directions by focusing on geocoding rather than routing, though it doesn't explicitly name the differentiation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives like mapbox_directions or mapbox_matrix. It doesn't mention use cases, prerequisites, or exclusions, leaving the agent to infer usage from the purpose alone.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
mapbox_matrixC
Calculate travel time and distance matrices between coordinates
| Name | Required | Description | Default |
|---|---|---|---|
| coordinates | Yes | Array of coordinates | |
| profile | No | Navigation mode | driving |
| annotations | No | Type of matrix to return | duration,distance |
| approaches | No | Approaches to coordinates | |
| bearings | No | Bearings for coordinates | |
| sources | No | Indices of source coordinates | |
| destinations | No | Indices of destination coordinates | |
| fallback_speed | No | Speed for direct path calculation when no route exists | |
| depart_at | No | Departure time in ISO 8601 format |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure but only states the basic function without addressing critical aspects. It doesn't mention whether this is a read-only operation, potential rate limits, authentication requirements, error handling, or what the output looks like (e.g., matrix format). For a complex tool with 9 parameters, this lack of behavioral context is a significant gap.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, clear sentence that efficiently communicates the core functionality without any wasted words. It's appropriately sized and front-loaded, making it easy for an agent to quickly grasp the tool's purpose while leaving detailed parameter information to the schema.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a complex tool with 9 parameters, no annotations, and no output schema, the description is insufficiently complete. It doesn't explain the output format (e.g., what the matrix looks like), error conditions, performance characteristics, or how it differs from sibling tools. The agent would need to rely heavily on trial and error or external knowledge to use this tool effectively.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description adds no parameter-specific information beyond what's already in the schema, which has 100% coverage with detailed descriptions for all parameters. While the description implies the tool uses coordinates and calculates matrices, it doesn't explain parameter interactions, defaults, or practical usage examples. Given the high schema coverage, a baseline score of 3 is appropriate as the schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose with a specific verb ('calculate') and resource ('travel time and distance matrices between coordinates'), making it immediately understandable. However, it doesn't distinguish this tool from its sibling 'mapbox_matrix_by_places', which likely serves a similar purpose with different input methods, leaving room for improvement in sibling differentiation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives like 'mapbox_matrix_by_places' or other siblings such as 'mapbox_directions'. There's no mention of prerequisites, constraints, or typical use cases, leaving the agent with insufficient context to make informed decisions about tool selection.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
mapbox_matrix_by_placesB
Calculate travel time and distance matrices between places using their names
| Name | Required | Description | Default |
|---|---|---|---|
| places | Yes | Array of place names | |
| profile | No | Navigation mode | driving |
| annotations | No | Type of matrix to return | duration,distance |
| language | No | Language for geocoding results | |
| sources | No | Indices of source places | |
| destinations | No | Indices of destination places | |
| fallback_speed | No | Speed for direct path calculation when no route exists | |
| depart_at | No | Departure time in ISO 8601 format |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions what the tool does but lacks critical behavioral details: it doesn't specify rate limits, authentication requirements, error handling, or what happens when place names are ambiguous. For a tool with 8 parameters and no annotation coverage, this is a significant gap in transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that states the core functionality without unnecessary words. It's front-loaded with the main purpose and uses clear terminology. Every word earns its place, making it highly concise and well-structured.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (8 parameters, no output schema, no annotations), the description is incomplete. It covers the basic purpose but lacks context on behavioral traits, usage guidelines, and output format. While the schema handles parameter documentation well, the description doesn't compensate for the absence of annotations or output schema, leaving gaps for the agent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents all parameters thoroughly. The description adds minimal value beyond the schema—it implies the 'places' parameter uses names rather than coordinates, but doesn't explain parameter interactions or provide examples. With high schema coverage, the baseline score of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Calculate travel time and distance matrices between places using their names'. It specifies the verb ('calculate'), resource ('travel time and distance matrices'), and method ('using their names'). However, it doesn't explicitly differentiate from sibling tools like 'mapbox_matrix' (which likely uses coordinates rather than place names), leaving room for improvement.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like 'mapbox_matrix' (which might use coordinates) or 'mapbox_directions_by_places' (which might provide route details rather than matrices), nor does it specify prerequisites or exclusions. The agent must infer usage from the name and description alone.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
5 tool updates
v1.0.0- First observed
mapbox_directions - First observed
mapbox_directions_by_places - First observed
mapbox_geocoding - First observed
mapbox_matrix - First observed
mapbox_matrix_by_places
TDQS
The tools are mostly distinct, with clear purposes like routing, geocoding, and matrix calculations. However, the two directions tools (mapbox_directions and mapbox_directions_by_places) and two matrix tools (mapbox_matrix and mapbox_matrix_by_places) could cause minor confusion as they overlap in functionality but differ in input types (coordinates vs. place names). Descriptions help clarify this distinction.
All tool names follow a consistent 'mapbox_' prefix with descriptive suffixes (e.g., directions, geocoding, matrix), using snake_case uniformly. The naming pattern is predictable and readable, making it easy for agents to understand the tool's purpose at a glance.
With 5 tools, the server is well-scoped for its mapping and navigation domain. Each tool serves a distinct function (e.g., routing, geocoding, matrix calculations), and the count is neither too sparse nor overwhelming, fitting typical use cases effectively.
The tool set covers core mapping operations like routing, geocoding, and travel time calculations, with good coverage for the domain. A minor gap might be the lack of tools for additional Mapbox services (e.g., static maps or spatial analysis), but the provided tools enable key workflows without significant dead ends.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
The official MCP Server for the Mux API
- earthOAuthcom.mireye
MCP server for Mireye Earth — federal-source-cited geospatial data for any MCP-aware agent.
Unofficial MCP server for the public PortlandMaps property/permit/zoning API. Not city-affiliated.
Related MCP Servers
- -licenseNot gradedqualityAmaintenanceMCP Server for the Google Maps API.11,86890,042MIT
- FlicenseNot gradedqualityBmaintenancePython MCP server for querying Overture Maps building footprint data via address search, building lookups, and nearby building listings.-
- AlicenseNot gradedqualityDmaintenanceAn MCP server for forward geocoding via the Nominatim API (OpenStreetMap) with no API key required.21MIT
- FlicenseNot gradedqualityAmaintenanceAn MCP server providing geocoding, routing, isochrones, and POI-by-proximity search through self-hosted OpenStreetMap backends.-
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/AidenYangX/mapbox-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server