Mapbox DevKit MCP Server
Current version:v0.4.6
- Manage Mapbox styles conversationally
- Create and manage access tokens
- Access user feedback and map issues
- Preview GeoJSON and convert coordinates
The Mapbox DevKit MCP Server provides AI assistants with direct access to Mapbox developer APIs, documentation, and other helpful developer tools through the Model Context Protocol. This server helps developers build Mapbox applications more efficiently by enabling conversational interactions with style management, token creation, documentation access, and more.
Installation
Requirements:
- Node.js LTS or later is required to build and run the DevKit MCP Server.
You will need a Mapbox Access Token with appropriate scopes to use the DevKit MCP Server. An access token associates your use of Mapbox Services with your account. If you don't have one, you can create a free account, then copy your access token from the Access Tokens page.
Use the Mapbox DevKit MCP Server
The Mapbox DevKit MCP Server can be used in several ways:
- Option 1: Hosted Endpoint
- Option 2: Quick Start with npm
- Option 3: Local Deployment
Hosted Endpoint
For the simplest setup, you can connect directly to Mapbox's hosted DevKit MCP endpoint without installing or running anything locally. This endpoint is available at https://mcp-devkit.mapbox.com/mcp.
For example, Claude Desktop users can configure the hosted endpoint by adding the mcpServers key to their claude_desktop_config.json file:
{
"mcpServers": {
"MapboxDevKitServer": {
"url": "https://mcp-devkit.mapbox.com/mcp",
"env": {
"MAPBOX_ACCESS_TOKEN": "YOUR_MAPBOX_ACCESS_TOKEN"
}
}
}
}
This hosted option eliminates the need for Node.js installation or local builds, making it ideal for quick setup and testing.
Quick Start with npm
You must configure consuming applications to connect to the Mapbox DevKit MCP Server. This typically involves referencing the MCP Server's NPM package via npx and setting your Mapbox Access Token as an environment variable.
For example, Claude Desktop users can configure MCP servers by adding the mcpServers key to their claude_desktop_config.json file:
{
"mcpServers": {
"MapboxDevKitServer": {
"command": "npx",
"args": [ "-y", "@mapbox/mcp-devkit-server"],
"env": {
"MAPBOX_ACCESS_TOKEN": "YOUR_MAPBOX_ACCESS_TOKEN"
}
}
}
}
If you use a Node version manager like fnm or nvm to manage multiple versions of Node.js, Claude may not automatically resolve the correct version when launching the MCP Server via npx.
To make sure the server runs using the same Node.js version as npx, you should explicitly specify the full path to the node executable in the command field.
First, find your Node.js installation path by running this in your terminal (after activating your desired Node version):
On macOS/Linux:
which node
which npx
On Windows (PowerShell):
(Get-Command node).Path
(Get-Command npx).Path
On Windows (Command Prompt):
where node
where npx
Then use those paths in your configuration. For example:
{
"mcpServers": {
"MapboxDevKitServer": {
"command": "/Users/your-username/.local/state/fnm_multishells/12345_1234567890123/bin/node",
"args": ["/Users/your-username/.npm/_npx/1234567890/node_modules/.bin/npx", "-y", "@mapbox/mcp-devkit-server"],
"env": {
"MAPBOX_ACCESS_TOKEN": "YOUR_MAPBOX_ACCESS_TOKEN"
}
}
}
}
The exact paths will vary depending on your system and version manager. Use the output from which node and which npx to find your actual paths.
Consult the documentation of your AI model or application for specific instructions on how to configure MCP servers.
Installation guides are available for the following applications in the public repository:
Local Deployment
To use Mapbox DevKit MCP Server with local Node.js involves two main steps:
- Clone the MCP Server code repository and build the project.
- Configure a consuming application to run and connect to the MCP Server, providing your Mapbox Access Token.
Clone and build the DevKit MCP Server
- Clone the repository:
$git clone https://github.com/mapbox/mcp-devkit-server.git
- Change into the project directory:
$cd mcp-devkit-server
- Install dependencies:
$npm install
- Build the project:
$npm run build
The built DevKit MCP Server will be located in the dist directory in two formats:
dist/esm/index.jsfor ESM (ECMAScript Module) supportdist/commonjs/index.jsfor CommonJS support
You will need to reference one of these locations when configuring consuming applications. Use the ESM version unless you have specific CommonJS requirements.
You may also build and run the DevKit MCP Server using Docker. See the Dockerfile in the project repository.
Configure the consuming application
You must configure consuming applications to connect to the Mapbox DevKit MCP Server. This typically involves specifying the path to the MCP Server node.js file and providing your Mapbox Access Token as an environment variable.
For example, Claude Desktop users can configure MCP servers by adding the mcpServers key to their claude_desktop_config.json file:
{
"mcpServers": {
"MapboxDevKitServer": {
"command": "node",
"args": ["/Users/username/github-projects/mcp-devkit-server/dist/esm/index.js"],
"env": {
"MAPBOX_ACCESS_TOKEN": "YOUR_MAPBOX_ACCESS_TOKEN"
}
}
}
}
Consult the documentation of your AI model or application for specific instructions on how to configure MCP servers.
Installation guides are available for the following applications in the public repository:
Configuration
The Mapbox DevKit MCP Server supports several configuration options to customize its behavior.
Environment Variables
MAPBOX_ACCESS_TOKEN(required): Your Mapbox access token for authenticating API requests. Different tools require different token scopes.VERBOSE_ERRORS(optional): Enable enhanced error messaging for debugging purposes.
Token Scope Requirements
Different tools in the DevKit MCP Server require specific token scopes:
- Style operations:
styles:list,styles:read,styles:download,styles:write - Token management:
tokens:read,tokens:write - Feedback access:
user-feedback:read - Preview generation:
tokens:readand at least one public token withstyles:read
You can configure these scopes when creating your access token on the Access Tokens page.
Resources
The Mapbox DevKit MCP Server provides access to static reference data through MCP Resources. Clients can access these resources using the following URIs:
mapbox://docs/style-spec- Mapbox Style Specification documentationmapbox://docs/token-scopes- Available token scope definitionsmapbox://docs/layer-types- Map layer type referencemapbox://docs/field-definitions- Field definitions for various APIs
These resources provide comprehensive reference materials to help you understand Mapbox APIs and build applications more effectively.
Tools
The Mapbox DevKit MCP Server provides the following tools for managing Mapbox resources and accessing developer APIs:
| Tool | Description |
|---|---|
GetDocsTool | Fetches the latest Mapbox documentation from official sources to help answer questions about Mapbox APIs and features. |
CreateStyleTool | Creates a new Mapbox style with specified properties. Powered by the Styles API. |
GetStyleTool | Retrieves an existing Mapbox style by ID. Powered by the Styles API. |
UpdateStyleTool | Updates an existing Mapbox style with new properties. Powered by the Styles API. |
DeleteStyleTool | Deletes a Mapbox style by ID. Powered by the Styles API. |
ListStylesTool | Lists all styles associated with your Mapbox account. Powered by the Styles API. |
StyleBuilderTool | Conversational style builder that helps create Mapbox styles through natural language interactions. |
GeneratePreviewUrlTool | Generates a preview URL for a Mapbox style with customizable map parameters like center, zoom, bearing, and pitch. |
CreateTokenTool | Creates a new Mapbox access token with specified scopes and URL restrictions. Powered by the Tokens API. |
ListTokensTool | Lists all access tokens for your account with optional filtering by date. Powered by the Tokens API. |
GetFeedbackTool | Retrieves individual user feedback items about map issues. Powered by the Feedback API. |
ListFeedbackTool | Queries and filters user-reported map issues and suggestions by status, category, or date. Powered by the Feedback API. |
PreviewGeoJSONTool | Generates a preview URL for GeoJSON data using geojson.io for visualization. |
ConvertCoordinatesTool | Converts coordinates between WGS84 (EPSG:4326) and Web Mercator (EPSG:3857) projection systems. |
CalculateBoundingBoxTool | Calculates bounding boxes for various GeoJSON geometry types (Point, LineString, Polygon, etc.). |