Mapbox MCP server for AI agents

Live

API KEY

MAPS AND LOCATION

Search

Mapbox gives your agent location data from your Mapbox account: geocode addresses, search places, get directions, travel-time matrices, and isochrones, optimize multi-stop trips, and read datasets and tilesets.

  • Per-user credentials: each call uses the actual user's API key, never a shared bot.
  • Encrypted per-tenant vault: AES-256, resolved at request time, never in LLM context.
  • Scoped before every call: pre-call scope check, 90-day SIEM-exportable audit chain.
Mapbox
agent · Acme Q3
Run
How long is the drive from the Ferry Building to Oakland Airport?
S
mapbox_directions_get
410ms
Location agent
About 31 km and 28 minutes by car, via the Bay Bridge and I-880.
Sources: Mapbox Directions, 1 route
mapbox
1 route
18:29
Message Claude...

Tools your maps and location agent reaches for on Mapbox, scoped per user.

CALL ANY TOOL
20 tools for maps and location in Mapbox: geocode forward, structured, reverse, and in batches, search places, get directions, matrices, isochrones, and optimized trips, and read datasets and tilesets.
mapbox_dataset_feature_get
Get dataset feature
Get one GeoJSON feature from a Mapbox dataset by its ID. Returns the feature with id, geometry and properties. Use mapbox_dataset_feature_get when you know the feature ID. Use mapbox_dataset_features_list to browse. Needs a token with the datasets:read scope.
Parameters
Name
Type
Required
Description
dataset_id
string
Required
ID of the dataset, from mapbox_datasets_list. Example: cjvf1msb3060i2vp6bq9m7t6l.
feature_id
string
Required
ID of the feature, from mapbox_dataset_features_list. Example: f6d9.
username
string
Required
The Mapbox username of the account that owns the datasets, shown in the Mapbox console. Example: mapbox-user.
mapbox_dataset_features_list
List dataset features
mapbox_dataset_get
Get dataset
mapbox_datasets_list
List datasets
mapbox_directions_get
Get directions
mapbox_geocode_batch
Batch geocode
mapbox_geocode_forward
Geocode forward
mapbox_geocode_forward_structured
Geocode forward structured
mapbox_geocode_reverse
Geocode reverse
mapbox_isochrone_get
Get isochrone
mapbox_map_matching_get
Get map matching
mapbox_matrix_get
Get matrix
mapbox_optimized_trip_get
Get optimized trip
mapbox_search_categories_list
List search categories
mapbox_search_category
Search category
mapbox_search_forward
Search forward
mapbox_search_retrieve
Search retrieve
mapbox_search_reverse
Search reverse
mapbox_search_suggest
Search suggest
mapbox_tilequery_get
Get tilequery
Build your Agent
Same auth pattern across LangChain, OpenAI, Anthropic, and Google ADK.
Python · LlamaIndex
import { ScalekitClient } from "@scalekit-sdk/node";
import { createReactAgent } from "@langchain/langgraph/prebuilt";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);

// Mapbox tools scoped to this user
const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["mapbox"], toolNames: [
    "mapbox_geocode_forward",
    "mapbox_directions_get",
    "mapbox_isochrone_get"] },
  pageSize: 100,
});

const agent = createReactAgent({ llm, tools });
await agent.invoke({ messages: [{ role: "user", content: "Geocode this address, get driving directions from the office, and show what is reachable in 15 minutes" }] });
import OpenAI from "openai";
import { ScalekitClient } from "@scalekit-sdk/node";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);
const openai = new OpenAI();

const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["mapbox"] }, pageSize: 100,
});

const res = await openai.chat.completions.create({
  model: "gpt-5",
  messages: [{ role: "user", content: "Geocode this address, get driving directions from the office, and show what is reachable in 15 minutes" }],
  tools,
});

// Execute the tool call with the user's vaulted Mapbox API key
await sk.tools.executeTool(res.choices[0].message.tool_calls[0], "user_123");
import Anthropic from "@anthropic-ai/sdk";
import { ScalekitClient } from "@scalekit-sdk/node";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);
const anthropic = new Anthropic();

const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["mapbox"] }, pageSize: 100,
});

const msg = await anthropic.messages.create({
  model: "claude-sonnet-5",
  max_tokens: 1024,
  messages: [{ role: "user", content: "Geocode this address, get driving directions from the office, and show what is reachable in 15 minutes" }],
  tools,
});

// Tool call runs with the user's vaulted Mapbox API key
await sk.tools.executeTool(msg.content, "user_123");
import { Agent } from "@google/adk/agents";
import { ScalekitClient } from "@scalekit-sdk/node";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);

const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["mapbox"] }, pageSize: 100,
});

const agent = new Agent({
  name: "location_agent",
  model: "gemini-2.5-pro",
  instruction: "Mapbox tools scoped to this user",
  tools,
});

await agent.run("Geocode this address, get driving directions from the office, and show what is reachable in 15 minutes");
Try these prompts
Copy any prompt into your agent. Each maps directly to a Mapbox tool. Click to copy, paste into your agent, done.
Geocode and search
Copy the prompt
Copied
Convert 1 Market St, San Francisco to coordinates.
Copy the prompt
Copied
What address is at longitude -122.39 and latitude 37.79?
Copy the prompt
Copied
Find coffee shops near the Ferry Building.
Routes and travel time
Copy the prompt
Copied
Get driving directions from the Ferry Building to Oakland Airport.
Copy the prompt
Copied
Find the fastest order to visit these 6 stops.
Copy the prompt
Copied
Show the area reachable in 15 minutes on foot from this point.
Datasets and tilesets
Copy the prompt
Copied
List the datasets in my Mapbox account.
Copy the prompt
Copied
Show the features in my stores dataset.
Copy the prompt
Copied
Query the tileset features at this coordinate.
SEE HOW AUTH WORKS
Each user connects their own Mapbox API key once, and Scalekit sends it with every call. Keys stay vaulted, every call is scope checked, and every action is logged.
1
Authorize
Your user connects
Mapbox
once. We tie it to their identity and the access they approved, with no shared bot account and no org-wide access
Who:
user ‘A’
when:
Once per user
access:
Limited to user
2
Store
Their
Mapbox
credential lives in a vault scoped to them. User A's data is never reachable by an agent acting for user B, even on the same connection
vault:
encrypted
scope:
per-user
tenants:
isolated
3
Resolve
When your agent calls a
Mapbox
tool, we fetch the right credential server-side. It never touches your agent, never appears in the LLM context, never shows up in your logs
speed:
~40ms
check:
before every call
seen by:
nobody
4
Audit
Every
Mapbox
tool call is logged: who triggered it, which tool ran, what came back. 90 days of history, tied to the user who authorized it
history:
90 days
export:
SIEM-ready
logged:
every call
Test other agents
See the same per-user auth pattern across other search connectors.
Support and Ops Teams
Meeting prep
Pulls agenda, participant context, and open action items before every meeting.
Engineering Teams
Engineering standup agent
Pulls commits from GitHub and GitLab, tracks issue movement in Jira, and posts a per-engineer standup brief to Slack. Each engineer's activity is read on their own delegated OAuth.
Test other agents
See the same per-user auth pattern across other search connectors.
OPS
Meeting prep agent
Assemble the agenda, HubSpot attendee history, and open action items from Gmail before every meeting on the calendar.
ENGINEERING
Engineering standup agent
Pull commits from GitHub and GitLab, track Jira issue movement, and post a per-engineer standup brief to Slack.
Why Scalekit
Secure your agent's access. Connectors ship in minutes
01.
Shared tokens break per-user analytics
A shared Mapbox API key looks fine in a demo. In production every lookup and route request looks like one service account, and you cannot tell which user triggered it. Scalekit resolves the credential of the actual user who triggered the agent, never a shared bot.
// shared key
audit → bot_service_account

// scalekit
audit → user_abc ✓
02.
Authentication is not authorization
03.
Multi-tenancy is architectural
04.
Mapbox today. Ten connectors tomorrow.
“Our agents act across Salesforce, Gong, Google Drive, and more, on behalf of every customer. Scalekit behind the scenes meant we can keep adding tools without ever rebuilding how credentials or tool calling work.”
Venu Madhav Kattagoni
Head of Engineering / Von
FAQs
Frequently Asked Questions
Does the agent access Mapbox as the user or through a shared key?
As the user. Each user connects their own Mapbox API key once, and Scalekit sends it with every call. Every lookup and route request in your audit trail is attributed to that user, not a shared service account.
Where is the Mapbox API key stored?
In Scalekit's managed AES-256 token vault, namespaced per tenant. To rotate it, the user reconnects with a new API key. Revocation is a single dashboard action. Credentials never appear in prompts, logs, or LLM context.
Can I limit what the agent does in Mapbox?
Yes, though every tool only reads: none of the 20 tools creates, changes, or deletes anything. Filter by tool name in listScopedTools to expose only what you want, for example the geocoding and search tools without the dataset tools. Scalekit also enforces scope checks before every API call.
What happens when a user revokes Mapbox access?
The connection is invalidated on the next tool call. Subsequent requests for that user fail closed with a clear error. Other users in the tenant remain unaffected. The event is logged for audit.
Can the agent plan a multi-stop route?
Yes. mapbox_optimized_trip_get finds the fastest order to visit 2 to 12 stops, and mapbox_directions_get routes between 2 to 25 points. mapbox_matrix_get returns travel times and distances between many origins and destinations.
Start in your coding agent
Up and running in one command
Install the Scalekit skill in your editor of choice. Connector, auth, tools, prompt, all wired up
Claude Code REPL
/plugin marketplace add scalekit-inc/claude-code-authstack
/plugin install agentkit@scalekit-auth-stack
Cursor Code REPL
# ~/.cursor/mcp.json
{
""mcpServers"": {
""mapbox"": {
""url"": ""https://mcp.scalekit.com/mapbox"",
""headers"": { ""Authorization"": ""Bearer $SCALEKIT_TOKEN"" }
}
}
}
Codex Code REPL
# ~/.codex/config.toml
[mcp_servers.mapbox]
url = ""https://mcp.scalekit.com/mapbox""
auth_env = ""SCALEKIT_TOKEN""
Copilot Code REPL
# .vscode/mcp.json
{
""servers"": {
""mapbox"": {
""url"": ""https://mcp.scalekit.com/mapbox"",
""type"": ""http""
}
}
}