Mapbox MCP Documentation Server
A Model Context Protocol (MCP) server that gives AI assistants instant access to Mapbox documentation and reference materials — no Mapbox access token required.
Quick Start
Hosted (no install required)
Connect directly to the hosted endpoint — nothing to install or maintain:
Claude Code / Claude Desktop / Cursor / VS Code
npx (runs locally, no install)
Claude Code — run claude mcp add:
Claude Desktop — add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
Cursor / VS Code — add the same mcpServers block to your editor's MCP settings file.
Docker
Build the image:
Or pull from the registry:
Claude Desktop / Cursor / VS Code — configure your MCP client to run the container:
Local (from source)
Claude Desktop / Cursor / VS Code:
Tools
get_document_tool — Fetches the full content of a specific Mapbox documentation page by URL. Use this to follow a link from a resource and retrieve the complete page content.
Example prompts:
- "What Mapbox APIs are available?"
- "How do I add a custom layer to a Mapbox style?"
- "What's the latest Mapbox GL JS version?"
batch_get_documents_tool — Fetches multiple Mapbox documentation pages in a single call (max 20). More efficient than calling get_document_tool multiple times. Failed pages include an error message rather than failing the whole batch.
search_mapbox_docs_tool — Searches Mapbox documentation across API reference, GL JS, Help Center, Style Spec, Studio, Search JS, iOS/Android Maps and Navigation SDKs, and Tilesets, returning ranked page URLs and descriptions. Use this to find relevant documentation before fetching full pages with get_document_tool or batch_get_documents_tool.
Example prompts:
- "Find docs about camera animation"
- "Search for geocoding API examples"
- "What documentation exists for custom layers?"
Resources
MCP resources expose reference data that AI assistants can read on demand:
Development
Prerequisites
Setup
Commands
Architecture
The server is a TypeScript MCP server using @modelcontextprotocol/sdk with a dual ESM/CJS build via tshy.
- Tools extend
BaseTool<InputSchema, OutputSchema> in src/tools/
- Resources extend
BaseResource in src/resources/
- No Mapbox access token required for documentation tools
- HTTP requests use a shared
httpPipeline with 1-hour caching
Creating a New Tool
- Create a directory
src/tools/my-tool/
- Add
MyTool.input.schema.ts (Zod schema), MyTool.output.schema.ts, and MyTool.ts (extends BaseTool)
- Register in
src/tools/toolRegistry.ts
- Add tests in
test/tools/my-tool/
Contributing
Please read CONTRIBUTING.md and VISION.md before submitting a pull request. Contributors using AI coding assistants should also review:
- CLAUDE.md — for Claude Code
- AGENTS.md — for other AI coding assistants (Cursor, Copilot, Aider, etc.)
License
MIT — see LICENSE