Mapbox
Visit ProjectUnlock geospatial intelligence through Mapbox APIs (geocoding, POI search, directions, isochrones, and more).
Visit ProjectCategory
Tags
What is Mapbox MCP Server?
Mapbox MCP Server is a Node.js implementation of the Model Context Protocol (MCP) that enables AI agents and applications to access Mapbox's geospatial APIs for location intelligence tasks.
How to use Mapbox MCP Server?
- Obtain a Mapbox access token via mapbox.com/signup
- Choose integration method:
- Configure with Claude Desktop
- Set up in Visual Studio Code
- Connect with Smolagents AI agents
- Use provided tools to access geospatial data through API calls
Key features of Mapbox MCP Server?
- Geocoding: Convert addresses to coordinates and vice versa
- POI Search: Find specific points of interest or brand locations
- Multi-modal routing: Driving, walking, cycling with traffic data
- Isochrone generation: Visualize reachable areas by time/distance
- Static map images: Customizable map visualizations
- Travel time matrices: Analyze accessibility and logistics
- Category search: Discover locations by type (restaurants, hotels, etc.)
Use cases of Mapbox MCP Server?
- AI-powered travel assistants with real-time navigation
- Logistics optimization for delivery routes with traffic awareness
- Location-based recommendation systems for businesses
- Urban planning analysis using isochrone mapping
- Emergency response planning with accessibility matrices
FAQ from Mapbox MCP Server?
- What APIs are supported?
Includes geocoding, directions, POI search, isochrones, static maps, and matrix APIs.
- Is a Mapbox account required?
Yes, a valid Mapbox access token is mandatory for API access.
- Which clients are compatible?
Works with Claude Desktop, VS Code, and Smolagents AI agents.
- What geospatial features are available?
Supports global geocoding, multi-modal routing, POI discovery, and advanced spatial analysis tools.
Mapbox MCP Server
Node.js server implementing Model Context Protocol (MCP) for Mapbox APIs.
Unlock Geospatial Intelligence for Your AI Applications
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:
- Global geocoding to convert addresses and place names to coordinates and vice versa
- Points of interest (POI) search across millions of businesses, landmarks, and places worldwide
- Multi-modal routing for driving, walking, and cycling with real-time traffic
- Travel time matrices to analyze accessibility and optimize logistics
- Isochrone generation to visualize areas reachable within specific time or distance constraints
- Static map images to create visual representations of locations, routes, and geographic data
Whether 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
Usage
A Mapbox access token is required to use this MCP server.
To get a Mapbox access token:
- Sign up for a free Mapbox account at mapbox.com/signup
- Navigate to your Account page
- Create a new token or use the default public token
For more information about Mapbox access tokens, see the Mapbox documentation on access tokens.
Integration Guides
For detailed setup instructions for different integrations, refer to the following guides:
- Claude Desktop Setup - Instructions for configuring Claude Desktop to work with this MCP server
- VS Code Setup - Setting up a development environment in Visual Studio Code
- Smolagents Integration - Example showing how to connect Smolagents AI agents to Mapbox's tools
Tools
Mapbox API tools
Matrix tool
Calculates travel times and distances between multiple points using Mapbox Matrix API. Features include:
- Efficient one-to-many, many-to-one or many-to-many routing calculations
- Support for different travel profiles (driving-traffic, driving, walking, cycling)
- Departure time specification for traffic-aware calculations
- Route summarization with distance and duration metrics
- Control approach (curb/unrestricted) and range of allowed departure bearings
Static image tool
Generates static map images using the Mapbox static image API. Features include:
- Custom map styles (streets, outdoors, satellite, etc.)
- Adjustable image dimensions and zoom levels
- Support for multiple markers with custom colors and labels
- Overlay options including polylines and polygons
- Auto-fitting to specified coordinates
POI search tool
Finds specific points of interest or brand locations by name using the Mapbox Search Box forward search API. Features include:
- Search for specific points of interest by proper name or unique brand (e.g., "Amalie Arena", "Starbucks")
- Find all nearby branches of a brand (e.g., "Macy's stores near me")
- Geographic proximity biasing for more relevant results
- Support for multiple languages and countries
Category search tool
Performs a category search using the Mapbox Search Box category search API. Features include:
- Search for points of interest by category (restaurants, hotels, gas stations, etc.)
- Filtering by geographic proximity
- Customizable result limits
- Rich metadata for each result
- Support for multiple languages
Forward geocoding tool
Performs forward geocoding using the Mapbox geocoding V6 API. Features include:
- Convert addresses or place names to geographic coordinates
- Fuzzy matching for partial or misspelled inputs
- Results filtering by country, region, or bounding box
- Customizable result limits
- Multiple language support
Reverse geocoding tool
Performs reverse geocoding using the Mapbox geocoding V6 API. Features include:
- Convert geographic coordinates to human-readable addresses
- Customizable levels of detail (street, neighborhood, city, etc.)
- Results filtering by type (address, poi, neighborhood, etc.)
- Support for multiple languages
- Rich location context information
Directions tool
Fetches routing directions using the Mapbox Directions API. Features include:
- Support for different routing profiles: driving (with live traffic or typical), walking, and cycling
- Route from multiple waypoints (2-25 coordinate pairs)
- Alternative routes option
- Route annotations (distance, duration, speed, congestion)
- Scheduling options:
- Future departure time (
depart_at
) for driving and driving-traffic profiles - Desired arrival time (
arrive_by
) for driving profile only
- Future departure time (
- Profile-specific optimizations:
- Walking: customizable walking speed and bias for/against walkways
- Driving: vehicle dimension constraints (height, width, weight)
- Exclusion options for routing:
- Common exclusions: ferry routes, cash-only tolls
- Driving-specific exclusions: tolls, motorways, unpaved roads, tunnels, country borders, state borders
- Custom point exclusions (up to 50 geographic points to avoid)
- Multiple geometry output formats (GeoJSON, polyline)
Isochrone tool
Computes areas that are reachable within a specified amount of times from a location using Mapbox Isochrone API. Features include:
- Support for different travel profiles (driving, walking, cycling)
- Customizable travel times or distances
- Multiple contour generation (e.g., 15, 30, 45 minute ranges)
- Optional departure or arrival time specification
- Color customization for visualization
Development
Inspecting server
Using Node.js
# Build
npm run build
# Inspect
npx @modelcontextprotocol/inspector node dist/index.js
Using Docker
# 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
Create new tool
npx plop create-tool
# provide tool name without suffix (e.g. Search)
Environment Variables
VERBOSE_ERRORS
Set VERBOSE_ERRORS=true
to get detailed error messages from the MCP server. This is useful for debugging issues when integrating with MCP clients.
By default, the server returns generic error messages. With verbose errors enabled, you'll receive the actual error details, which can help diagnose API connection issues, invalid parameters, or other problems.