# Mapbox — how to use (mcp.ai)

Connect your Mapbox account and use 32 tools for developer tools straight from your AI agent. Connect with your own API key. Mapbox is a platform that provides mapping, navigation, and location data services for developers to integrate into their applications.

## Option A — via MCP (recommended)
Remote MCP endpoint (HTTP, streamable): `https://api.mcp.ai/p_mapbox?ms=1787293680000`
Add it as a custom/remote MCP connector in your client (Claude, Cursor, VS Code…), then authenticate when prompted. Once connected, ask the agent to use the server's tools (e.g. `mapbox_geocode_batch_v6`).

## Option B — via direct REST API
Base URL: `https://api.mcp.ai/api/mapbox`
Auth: `Authorization: Bearer sk_live_…` — create a workspace API key at https://mcp.ai/settings/api-keys
Discover endpoints: `GET https://api.mcp.ai/api/mapbox/_endpoints`

### Endpoints
- `POST https://api.mcp.ai/api/mapbox/geocode/batch/v6` — Tool to perform batch geocoding with up to 1000 queries in a single request. Use when you need to geocode multiple locations efficiently (forward, reverse, or structured). Supports mixing query types 
  - body: { queries: object[] }
- `POST https://api.mcp.ai/api/mapbox/geocode/forward/v5` — Tool to search for places by name or address using Mapbox Geocoding v5 API (forward geocoding). Use when you need to convert place names or addresses to geographic coordinates using the v5 endpoint.
  - body: { bbox?: string, limit?: integer, types?: string, country?: string, routing?: boolean, endpoint?: string, language?: string, entrances?: boolean, proximity?: string, worldview?: string, fuzzyMatch?: boolean, search_text: string, autocomplete?: boolean }
- `POST https://api.mcp.ai/api/mapbox/geocoding/batch` — Tool to perform batch forward or reverse geocoding for multiple locations. Use when you need consistent geocoding of up to 50 queries in one call.
  - body: { bbox?: string, limit?: integer, types?: string, country?: string, queries?: string[], routing?: boolean, language?: string, proximity?: string, worldview?: string, coordinates?: number[][], fuzzy_match?: boolean, autocomplete?: boolean, reverse_mode?: string }
- `POST https://api.mcp.ai/api/mapbox/geocoding/forward` — Tool to convert free-form or structured address into geographic coordinates and place features. Use when you need forward geocoding from text or address components.
  - body: { q?: string, bbox?: string, block?: string, limit?: integer, place?: string, types?: string, format?: string, region?: string, street?: string, country?: string, language?: string, postcode?: string, permanent?: boolean, proximity?: string, worldview?: string, autocomplete?: boolean, address_line1?: string, address_number?: string }
- `POST https://api.mcp.ai/api/mapbox/geocoding/permanent/forward` — Tool to perform permanent forward geocoding. Use when you need enterprise-grade permanent geocoding after confirming account privileges.
  - body: { bbox?: string, limit?: integer, types?: string, country?: string, routing?: boolean, language?: string, proximity?: string, worldview?: string, fuzzyMatch?: boolean, searchText: string, autocomplete?: boolean }
- `POST https://api.mcp.ai/api/mapbox/geocoding/permanent/reverse` — Tool to perform permanent reverse geocoding. Use after obtaining coordinates to get cacheable place data. Example: lon=-73.989, lat=40.733
  - body: { limit?: integer, types?: string, country?: string, routing?: boolean, language?: string, latitude: number, longitude: number, worldview?: string, reverseMode?: string, access_token: string }
- `POST https://api.mcp.ai/api/mapbox/geocoding/reverse` — Tool to reverse geocode coordinates into place names. Use after obtaining coordinates.
  - body: { limit?: integer, types?: string, country?: string, routing?: boolean, language?: string, latitude: number, longitude: number, worldview?: string, reverse_mode?: string }
- `POST https://api.mcp.ai/api/mapbox/get/access/token` — Tool to extract and validate Mapbox access token from connection metadata. Use when you need a valid token for downstream actions.
- `POST https://api.mcp.ai/api/mapbox/get/isochrone` — Tool to calculate areas reachable within a specified amount of time or distance from a location. Use when you need to visualize travel time or distance zones for routing analysis.
  - body: { denoise?: number, exclude?: string, profile: string, polygons?: boolean, depart_at?: string, generalize?: number, coordinates: string, contours_colors?: string, contours_meters?: string, contours_minutes?: string }
- `POST https://api.mcp.ai/api/mapbox/get/map/matching` — Tool to snap fuzzy GPS traces to roads on the road network. Use when you need to clean up inaccurate location traces for display or analysis.
  - body: { tidy?: boolean, steps?: boolean, profile: string, radiuses?: string, geometries?: string, timestamps?: string, annotations?: string, coordinates: string }
- `POST https://api.mcp.ai/api/mapbox/get/optimization/v1` — Tool to calculate optimal driving routes and trips that visit a set of waypoints. Use when you need to find the best order to visit multiple locations with optimized routing.
  - body: { steps?: boolean, source?: string, profile: string, bearings?: string, language?: string, overview?: string, radiuses?: string, roundtrip?: boolean, approaches?: string, geometries?: string, annotations?: string[], coordinates: object[], destination?: string, distributions?: string }
- `POST https://api.mcp.ai/api/mapbox/get/sprite` — Tool to retrieve a sprite image or its JSON document from a Mapbox style. Use when you need sprite assets for rendering map icons. Sprites are collections of small icons used in map styles. The JSON f
  - body: { scale?: string, format: string, style_id: string, username: string }
- `POST https://api.mcp.ai/api/mapbox/get/static/image` — Request a static map image from a Mapbox Studio style. Returns a PNG or JPEG image of the specified map area with customizable parameters including location, zoom level, camera angle, and optional ove
  - body: { lat: number, lon: number, zoom: number, pitch?: number, width: integer, height: integer, retina?: boolean, bearing?: number, overlay?: string, style_id: string, username: string }
- `POST https://api.mcp.ai/api/mapbox/get/static/tiles` — Tool to retrieve raster tiles from a Mapbox Studio style. Use when you need map tiles for specific coordinates and zoom levels. Returns PNG or JPG raster tiles that can be assembled to create map visu
  - body: { x: integer, y: integer, z: integer, retina?: boolean, style_id: string, tilesize: integer, username: string }
- `POST https://api.mcp.ai/api/mapbox/get/token` — Tool to retrieve information about a Mapbox access token and validate its status. Use when you need to check token validity or retrieve token metadata.
  - body: { access_token: string }
- `POST https://api.mcp.ai/api/mapbox/get/vector/tiles` — Tool to retrieve vector tiles from Mapbox-hosted vector tilesets. Use when you need tile data for mapping applications at specific zoom levels and coordinates.
  - body: { x: integer, y: integer, zoom: integer, style?: string, format?: string, tileset_id: string }
- `POST https://api.mcp.ai/api/mapbox/post/map/matching` — Tool to snap GPS coordinates to the road network using POST method for longer coordinate lists. Use when you have GPS traces to match to roads (2-100 coordinates).
  - body: { tidy?: boolean, steps?: boolean, ignore?: string, profile: string, language?: string, overview?: string, radiuses?: string, depart_at?: string, waypoints?: string, approaches?: string, geometries?: string, timestamps?: string, annotations?: string, coordinates: string, openlr_spec?: string, voice_units?: string, access_token: string, openlr_format?: string, waypoint_names?: string, roundabout_exits?: boolean, linear_references?: boolean, voice_instructions?: boolean, banner_instructions?: boolean }
- `POST https://api.mcp.ai/api/mapbox/query/tile/features` — Tool to retrieve data about specific features from vector tilesets based on a location. Use when you need to query tileset features at a geographic point, such as finding buildings, roads, or points o
  - body: { lat: number, lon: number, bands?: string, limit?: integer, dedupe?: boolean, layers?: string, radius?: number, geometry?: string, tileset_id: string }
- `POST https://api.mcp.ai/api/mapbox/request/style/embed/html` — Retrieve embeddable HTML for a Mapbox style that can be embedded in an iframe. Returns a complete HTML document with Mapbox GL JS code that renders an interactive map with the specified style. Useful 
  - body: { title?: string, styleId: string, fallback?: boolean, username: string, zoomwheel?: boolean, mapboxGLVersion?: string, mapboxGLGeocoderVersion?: string }
- `POST https://api.mcp.ai/api/mapbox/retrieve/directions` — Tool to retrieve directions between waypoints. Use when you need navigation routes with optional turn-by-turn instructions after confirming origin and destination.
  - body: { steps?: boolean, profile: string, language?: string, overview?: string, geometries?: string, coordinates: object[], access_token: string, alternatives?: boolean }
- `POST https://api.mcp.ai/api/mapbox/retrieve/font/glyph/ranges` — Tool to retrieve font glyph ranges as PBF tiles. Use when you have confirmed the font name, codepoint range, and valid token.
  - body: { end: integer, font: string, start: integer, username: string }
- `POST https://api.mcp.ai/api/mapbox/retrieve/marker` — Tool to retrieve a standalone marker image without any background map. Returns a PNG image file of the specified marker type. Use when you need to obtain marker icons for display or reference purposes
  - body: { marker_name: string }
- `POST https://api.mcp.ai/api/mapbox/retrieve/matrix` — Retrieve a travel time and distance matrix between multiple locations. Use this tool when you need to calculate travel times and/or distances between many origin-destination pairs efficiently (e.g., c
  - body: { profile: string, sources?: string, bearings?: string, depart_at?: string, approaches?: string, annotations?: string, coordinates: object[], access_token?: string, destinations?: string, fallback_speed?: integer }
- `POST https://api.mcp.ai/api/mapbox/retrieve/searchbox/place` — Tool to retrieve full details for a specific place by its Mapbox ID. Use when you have a mapbox_id from a search suggestion and need complete place information.
  - body: { language?: string, mapbox_id: string, session_token: string }
- `POST https://api.mcp.ai/api/mapbox/retrieve/style` — Retrieves the complete Mapbox style specification as JSON, including all layers, sources, sprites, and configuration. A Mapbox style defines how a map is rendered, including data sources, layer stylin
  - body: { style_id: string, username: string }
- `POST https://api.mcp.ai/api/mapbox/retrieve/style/wmts` — Retrieve a WMTS (Web Map Tile Service) capabilities document for a Mapbox style. This action returns an OGC-compliant WMTS XML document that describes how to access map tiles for the specified style. 
  - body: { style_id: string, username: string }
- `POST https://api.mcp.ai/api/mapbox/retrieve/tileset/metadata` — Tool to retrieve metadata for a Mapbox tileset. Use when you need TileJSON details including bounds, zooms, and layer info.
  - body: { secure?: boolean, tileset_id: string }
- `POST https://api.mcp.ai/api/mapbox/reverse/geocode/v6` — Tool to convert geographic coordinates to place names using Geocoding v6 API. Use when you need to perform reverse geocoding from latitude/longitude coordinates.
  - body: { types?: string, country?: string, language?: string, latitude: number, longitude: number, worldview?: string }
- `POST https://api.mcp.ai/api/mapbox/reverse/searchbox` — Tool to convert coordinates to places using the Search Box API (reverse geocoding). Use when you need to find place names, addresses, or points of interest for given coordinates.
  - body: { limit?: integer, types?: string, country?: string, language?: string, latitude: number, longitude: number }
- `POST https://api.mcp.ai/api/mapbox/search/box/forward` — Tool to search for places by name or address using the Search Box API. Use when you need to find locations, addresses, or points of interest based on a text query.
  - body: { q: string, bbox?: string, limit?: integer, types?: string, country?: string, language?: string, proximity?: string, poi_category?: string, auto_complete?: boolean }
- `POST https://api.mcp.ai/api/mapbox/search/category` — Tool to search for places by category (e.g., restaurants, hotels, coffee shops). Use when you need to find POIs in a specific category, optionally filtered by location, bounding box, or proximity.
  - body: { bbox?: string, limit?: integer, route?: string, country?: string, category: string, language?: string, sar_type?: string, proximity?: string, route_geometry?: string, time_deviation?: number, poi_category_exclusions?: string }
- `POST https://api.mcp.ai/api/mapbox/suggest/searchbox` — Tool to get autocomplete suggestions for a partial search query. Use when you need address or place suggestions as users type, before retrieving full details.
  - body: { q: string, bbox?: string, limit?: integer, types?: string, origin?: string, country?: string, eta_type?: string, language?: string, proximity?: string, poi_category?: string, session_token: string, navigation_profile?: string, poi_category_exclusions?: string }

## Example prompts
- "What can I do in Mapbox?"
- "Show me a summary of my Mapbox account"

## More
- Page: https://mcp.ai/mapbox
- Agent spec (llms.txt): https://mcp.ai/mapbox/llms.txt
- Postman collection: https://mcp.ai/mapbox/postman.json
