Mapbox Geospatial Intelligence
Transform your AI agent into a geospatially-aware system with seamless access to Mapbox's comprehensive location intelligence platform.
Overview
This skill provides access to Mapbox APIs through a Model Context Protocol (MCP) server, enabling your AI to understand and reason about places, navigate the physical world, and access rich geospatial data.
Capabilities
**Global Geocoding**: Convert addresses and place names to coordinates and vice versa**POI Search**: Search millions of businesses, landmarks, and places worldwide**Multi-Modal Routing**: Get directions for driving, walking, and cycling with real-time traffic**Travel Time Matrices**: Analyze accessibility and optimize logistics**Route Optimization**: Solve traveling salesman problems for multiple stops**Map Matching**: Snap GPS traces to road networks for clean route visualization**Isochrone Generation**: Visualize areas reachable within time/distance constraints**Static Map Images**: Create visual representations of locations, routes, and geographic data**Offline Geospatial Calculations**: Distance, area, bearing, buffers, and spatial analysis without API callsPrerequisites
**Required**: A Mapbox access token
1. Sign up for a free account at [mapbox.com/signup](https://www.mapbox.com/signup/)
2. Navigate to your [Account page](https://account.mapbox.com/)
3. Create a new token or use the default public token
Installation
Using Hosted MCP Endpoint (Recommended)
Connect to the hosted MCP server:
**Endpoint**: `https://mcp.mapbox.com/mcp`
Configure your MCP client to connect to this endpoint with your Mapbox access token.
Local Installation
```bash
npx -y @mapbox/mcp-server
```
Set environment variable:
```bash
export MAPBOX_ACCESS_TOKEN="your_token_here"
```
Configuration
Claude Desktop
Edit `~/Library/Application Support/Claude/claude_desktop_config.json`:
```json
{
"mcpServers": {
"mapbox": {
"command": "npx",
"args": ["-y", "@mapbox/mcp-server"],
"env": {
"MAPBOX_ACCESS_TOKEN": "your_token_here"
}
}
}
}
```
Optional Configuration
**Disable MCP-UI** (if not needed):
```bash
export ENABLE_MCP_UI=false
```
**Enable Resource Fallback Tools** (for clients without native resource support):
```bash
export CLIENT_NEEDS_RESOURCE_FALLBACK=true
```
Available Resources
Access static reference data via MCP resources:
`mapbox://categories` - Default (English) category list`mapbox://categories/{language}` - Localized category names (e.g., `ja`, `es`)Tools Reference
Location Discovery
**Category Search**: Search for POIs by category (restaurants, hotels, gas stations, etc.)
Filter by category IDs from the categories resourceSupports proximity-based and bounding box searchesReturns rich place information including addresses, coordinates, and contact details**Geocoding**: Convert addresses to coordinates or coordinates to addresses
Forward geocoding: address → coordinatesReverse geocoding: coordinates → addressSupports autocomplete and place name disambiguation**Search Along Route**: Find POIs along a route
Specify route coordinates and search categoryControl search radius and maximum detour timeUseful for "find gas stations on my way" queriesNavigation & Travel
**Routing**: Get directions between waypoints
Profiles: driving-traffic, driving, walking, cyclingReal-time traffic considerationTurn-by-turn instructions availableDistance and duration estimates**Travel Time Matrix**: Calculate travel times between multiple points
One-to-many, many-to-one, or many-to-many calculationsSupport for departure time and trafficOptimal for logistics and accessibility analysis**Route Optimization**: Find optimal visiting order for multiple stops
Solves traveling salesman problemSupports different travel profilesReturns optimized waypoint order**Isochrones**: Generate reachable areas within time/distance constraints
Create polygons showing areas accessible within specified time or distanceSupport for all routing profilesUseful for service area visualizationGPS & Route Matching
**Map Matching**: Snap GPS traces to road network
Clean up noisy GPS dataAlign coordinates with actual road geometrySupports timestamps and speed informationVisualization
**Static Map Images**: Generate map visualizations
Multiple map styles (streets, satellite, outdoors, etc.)Custom markers with colors and labelsOverlay polylines and polygonsAuto-fitting to coordinatesMCP-UI support for inline renderingOffline Geospatial Calculations
**Distance**: Calculate distance between two coordinates
Units: kilometers, miles, meters, feet, nautical milesHaversine formula for great-circle distance**Point in Polygon**: Test if a point is inside a polygon
Geofencing and service area checksSupports complex polygons with holes**Bearing**: Calculate compass direction between coordinates
Returns degrees (0-360°) and cardinal direction**Midpoint**: Find geographic midpoint between two points
Great circle path calculationUseful for meeting point suggestions**Centroid**: Calculate geometric center of a polygon
Arithmetic mean of all pointsUseful for label placement**Area**: Calculate polygon area
Units: square meters, square kilometers, acres, hectares, square miles, square feetAccurate surface area calculation**Bounding Box**: Calculate minimum bounding box for geometry
Returns [minLng, minLat, maxLng, maxLat]Useful for viewport calculations**Buffer**: Create buffer zones around geometries
Circular buffers around pointsMultiple distance units supportedProximity analysis**Simplify**: Reduce vertices in lines/polygons
Douglas-Peucker algorithmConfigurable toleranceOptional topology preservationExample Prompts
Location Discovery
"Find coffee shops within walking distance of the Empire State Building""Show me gas stations along the route from Boston to New York""What restaurants are near Times Square?"Navigation & Travel
"Get driving directions from LAX to Hollywood with current traffic""How long would it take to walk from Central Park to Times Square?""Calculate travel time from Four Seasons hotel to JFK Airport by taxi during rush hour"Visualization & Maps
"Create a map image showing the route from Golden Gate Bridge to Fisherman's Wharf""Show me a satellite view of Manhattan with key landmarks marked""Generate a map highlighting Starbucks locations within a mile of downtown Seattle"Analysis & Planning
"Show me areas reachable within 30 minutes of downtown Portland by car""Calculate a travel time matrix between these 3 hotels and the convention center""Find the optimal route visiting these 3 tourist attractions in San Francisco"GPS & Route Matching
"Clean up this GPS trace and show the actual route on roads""Snap this recorded bicycle ride to the cycling network"Offline Calculations
"What's the distance in miles between these two coordinates?""Calculate the area of this polygon in square kilometers""Is this point inside our service area polygon?""What's the bearing from San Francisco to New York?""Create a 5-mile buffer zone around this location"Tips for Best Results
1. **Be specific about locations**: Use full addresses or landmark names
2. **Specify travel method**: State your preferred mode (driving, walking, cycling)
3. **Include time constraints**: Mention relevant times ("during rush hour", "at 3 PM")
4. **Request specific formats**: Specify output format when needed ("as a map image", "in JSON")
5. **Use categories effectively**: Reference the categories resource for accurate POI filtering
Important Notes
All API-based tools require a valid Mapbox access tokenOffline geospatial tools work without API calls or internet connectivityRate limits apply based on your Mapbox account tierMCP-UI support provides enhanced visualization in compatible clientsResource fallback tools are available for clients without native resource supportTroubleshooting
**Authentication errors**: Verify your Mapbox access token is valid and has appropriate scopes
**Resource not found**: Ensure your client supports MCP resources or enable `CLIENT_NEEDS_RESOURCE_FALLBACK=true`
**Empty results**: Check that location names are specific enough and categories are valid
**Performance issues**: Use offline tools when possible; they don't require API calls
For more information, visit the [Mapbox MCP Server repository](https://github.com/mapbox/mcp-server) or [Mapbox documentation](https://docs.mapbox.com/).