Mapbox MCP server for AI agents and assistants

Securely connect your AI agents and chatbots (Claude, ChatGPT, Cursor, etc) with Mapbox MCP or direct API to search locations, generate maps, calculate routes, and analyze geospatial data through natural language.

Mapbox logoMapbox
Api Key

Mapbox is a platform providing powerful maps, navigation, and location services for developers. Integrate Mapbox for dynamic, interactive mapping and geospatial insights in your apps.

32 Tools

Try Mapbox now

Type what you want done — sign in and watch it run live in the Tool Router playground.

TOOL ROUTER PLAYGROUND
Mapbox
Try asking
TOOLS

Supported Tools

Every Mapbox action and event your agent gets out of the box.

Batch Geocode V6

Tool to perform batch geocoding with up to 1000 queries in a single request.

Forward Geocode V5

Tool to search for places by name or address using Mapbox Geocoding v5 API (forward geocoding).

Batch Geocoding

Tool to perform batch forward or reverse geocoding for multiple locations.

Forward Geocoding

Tool to convert free-form or structured address into geographic coordinates and place features.

Permanent Forward Geocoding

Tool to perform permanent forward geocoding.

Permanent Reverse Geocoding

Tool to perform permanent reverse geocoding.

Reverse Geocoding

Tool to reverse geocode coordinates into place names.

Get Access Token

Tool to extract and validate Mapbox access token from connection metadata.

Get Isochrone

Tool to calculate areas reachable within a specified amount of time or distance from a location.

Get Map Matching

Tool to snap fuzzy GPS traces to roads on the road network.

Get Optimization V1

Tool to calculate optimal driving routes and trips that visit a set of waypoints.

Get Sprite

Tool to retrieve a sprite image or its JSON document from a Mapbox style.

Get Static Image

Request a static map image from a Mapbox Studio style.

Get Static Tiles

Tool to retrieve raster tiles from a Mapbox Studio style.

Get Token Information

Tool to retrieve information about a Mapbox access token and validate its status.

Get Vector Tiles

Tool to retrieve vector tiles from Mapbox-hosted vector tilesets.

Map Matching (POST)

Tool to snap GPS coordinates to the road network using POST method for longer coordinate lists.

Query Tile Features

Tool to retrieve data about specific features from vector tilesets based on a location.

Request Style Embed HTML

Retrieve embeddable HTML for a Mapbox style that can be embedded in an iframe.

Retrieve Directions

Tool to retrieve directions between waypoints.

Retrieve Font Glyph Ranges

Tool to retrieve font glyph ranges as PBF tiles.

Retrieve Marker

Tool to retrieve a standalone marker image without any background map.

Retrieve Matrix

Retrieve a travel time and distance matrix between multiple locations.

Retrieve Searchbox Place Details

Tool to retrieve full details for a specific place by its Mapbox ID.

Retrieve Style

Retrieves the complete Mapbox style specification as JSON, including all layers, sources, sprites, and configuration.

Retrieve Style WMTS

Retrieve a WMTS (Web Map Tile Service) capabilities document for a Mapbox style.

Retrieve Tileset Metadata

Tool to retrieve metadata for a Mapbox tileset.

Reverse Geocoding V6

Tool to convert geographic coordinates to place names using Geocoding v6 API.

Search Box Reverse Geocoding

Tool to convert coordinates to places using the Search Box API (reverse geocoding).

Search Box Forward

Tool to search for places by name or address using the Search Box API.

Search by Category

Tool to search for places by category (e.

Search Box Suggest

Tool to get autocomplete suggestions for a partial search query.

SETUP GUIDE

Connect Mapbox MCP Tool with your Agent

1

Install Composio

typescript
npm install @composio/core ai @ai-sdk/mcp @ai-sdk/openai
Install the Composio SDK and your agent framework
2

Create a session with MCP enabled

typescript
import { Composio } from "@composio/core";

const composio = new Composio();
const { mcp } = await composio.create("your-user-id", {
  toolkits: ["mapbox"],
  mcp: true,
});
Create a session scoped to Mapbox and read its MCP URL and headers
3

Connect your agent to the MCP server

typescript
import { createMCPClient } from "@ai-sdk/mcp";
import { openai } from "@ai-sdk/openai";
import { generateText, stepCountIs } from "ai";

const client = await createMCPClient({
  transport: { type: "http", url: mcp.url, headers: mcp.headers },
});

const { text } = await generateText({
  model: openai("gpt-5.6-sol"),
  tools: await client.tools(),
  prompt: "Get driving directions from Times Square to Central Park",
  stopWhen: stepCountIs(10),
});

console.log(text);
await client.close();
Pass the session's MCP URL and headers to your agent and run a Mapbox request
SETUP GUIDE

Connect Mapbox API Tool with your Agent

1

Install Composio

typescript
npm install @composio/core @composio/openai openai
Install the Composio SDK, the OpenAI provider, and the OpenAI SDK
2

Create a Composio session

typescript
import OpenAI from "openai";
import { Composio } from "@composio/core";
import { OpenAIResponsesProvider } from "@composio/openai";

const composio = new Composio({ provider: new OpenAIResponsesProvider() });
const client = new OpenAI();

const session = await composio.create("your-user-id", { toolkits: ["mapbox"] });
const tools = await session.tools();
Initialize Composio with the OpenAI Responses provider and create a session scoped to Mapbox
3

Run Mapbox tools with your agent

typescript
let response = await client.responses.create({
  model: "gpt-5.6-sol",
  tools,
  input: [{ role: "user", content: "Get driving directions from Times Square to Central Park" }],
});

while (response.output.some((o) => o.type === "function_call")) {
  const outputs = await composio.provider.handleToolCalls(session, response.output);
  response = await client.responses.create({
    model: "gpt-5.6-sol",
    tools,
    previous_response_id: response.id,
    input: outputs,
  });
}

console.log(response.output_text);
Send a request, execute the Mapbox tool calls through the session, and print the final answer

Why Use Composio?

AI Native Mapbox Integration

  • Supports both Mapbox MCP and direct API based integrations
  • Structured, LLM-friendly schemas for reliable tool execution
  • Rich coverage for geocoding, mapping, and navigation features

Managed Auth

  • Centralized API key management with secure storage
  • Easy rotation and environment-specific credentials
  • Quickly onboard users without sharing sensitive keys

Agent Optimized Design

  • Tools tuned for natural language map queries and results
  • Reliable execution and full logging of agent interactions

Enterprise Grade Security

  • Fine-grained RBAC for Mapbox tool usage
  • Scoped access so agents only reach what they need
  • Complete audit trail of every map, search, or route request

Rolling this out across your team?

Give your team centralized access control across every framework with Composio’s MCP Gateway.

EXPLORE MCP GATEWAY
FAQ

Frequently asked questions

Yes, Mapbox requires you to configure your own API key credentials. Once set up, Composio handles secure credential storage and API request handling for you.

Yes! Composio's Tool Router enables agents to use multiple toolkits. Learn more.

Yes. Composio is SOC 2 Type II compliant and is built to keep your Mapbox connection and credentials secure. OAuth tokens and API keys are encrypted, and sensitive customer data is protected at rest and in transit.

Composio also undergoes independent security testing and continuously monitors its systems for security threats. You can review the latest reports and policies in the Composio Trust Center.

Composio maintains and updates all toolkit integrations automatically, so your agents always work with the latest API versions.

Create the key in your Mapbox account settings, then paste it once on Composio's connection page. Composio stores it encrypted and uses it only for the Mapbox actions your agent runs. Nobody else in your workspace can read it, and you can revoke it inside Mapbox at any time.

When you connect a Mapbox account through Composio, every action runs under that account, so anything the agent creates, sends, or changes shows up in Mapbox as done by you. Keep an approval step in your prompt for actions with side effects, such as sending or deleting, and have the agent draft first.

Whatever the credentials you connect allow inside Mapbox. If Mapbox lets you scope a key to specific permissions, create a scoped one so the agent can only do what you intend. You can revoke the key inside Mapbox at any time.

Yes. Composio supports multiple connected accounts for the same app, and that works in Claude, ChatGPT, or any other assistant you connect through Composio. Give each Mapbox connection a name such as work or personal, and the assistant uses the one you mention in the request. Each account keeps its own credentials and nothing is merged.

The connection stops working the moment Mapbox rejects the old key. Create a new key in Mapbox and reconnect the account from the Composio dashboard or by asking your agent to reconnect Mapbox. Nothing else changes.

Composio's free Hobby plan includes 100,000 tool calls per month with no credit card, which covers most personal Mapbox use. Paid plans add higher limits and team features. Your Mapbox plan and its API limits still apply as usual.

Built-in connectors usually give one AI access to a limited set of apps. Many people use Composio because it lets their AI connect to more apps than it normally supports, or connect to multiple accounts for the same app (e.g. connect Claude to multiple Mapbox accounts).

With Composio, you connect Mapbox once and then use it across different AI assistants without setting it up separately in each one. Connect your apps to Composio once, then connect Composio to whichever AI you use, whether that's Claude, ChatGPT, Hermes, or your own custom assistant.

Start with Mapbox.It takes 30 seconds.

Managed auth, hosted MCP servers, and every Mapbox tool your agent needs.Free to start.

Start building