Skip to main content
Glama
mapbox

mapbox-docs

Official
by mapbox

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

{
  "mcpServers": {
    "mapbox-docs": {
      "url": "https://mcp-docs.mapbox.com/mcp"
    }
  }
}

npx (runs locally, no install)

Claude Code — run claude mcp add:

claude mcp add mapbox-docs -- npx -y @mapbox/mcp-docs-server

Claude Desktop — add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "mapbox-docs": {
      "command": "npx",
      "args": ["-y", "@mapbox/mcp-docs-server"]
    }
  }
}

Cursor / VS Code — add the same mcpServers block to your editor's MCP settings file.


Docker

Build the image:

docker build -t mapbox/mcp-docs-server .

Or pull from the registry:

docker pull mapbox/mcp-docs-server

Claude Desktop / Cursor / VS Code — configure your MCP client to run the container:

{
  "mcpServers": {
    "mapbox-docs": {
      "command": "docker",
      "args": ["run", "--rm", "-i", "mapbox/mcp-docs-server"]
    }
  }
}

Local (from source)

git clone https://github.com/mapbox/mcp-docs-server.git
cd mcp-docs-server
npm install
npm run build

Claude Desktop / Cursor / VS Code:

{
  "mcpServers": {
    "mapbox-docs": {
      "command": "node",
      "args": ["/absolute/path/to/mcp-docs-server/dist/esm/index.js"]
    }
  }
}

Related MCP server: Mapbox MCP Server

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 using Algolia full-text search and returns matching page URLs and excerpts. 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:

Resource URI

Contents

resource://mapbox-api-reference

REST API reference docs (endpoints, parameters, rate limits)

resource://mapbox-sdk-docs

SDK and client library docs (iOS, Android, Flutter, web)

resource://mapbox-guides

Tutorials, how-tos, and guides

resource://mapbox-examples

Code examples, API playgrounds, and interactive demos

resource://mapbox-reference

Tilesets, data products, accounts, and pricing reference

resource://mapbox-style-layers

Style layer reference (paint/layout properties for all layer types)

resource://mapbox-streets-v8-fields

Mapbox Streets v8 tileset field reference

resource://mapbox-token-scopes

All available Mapbox token scopes with descriptions

resource://mapbox-layer-type-mapping

Mapping of Mapbox layer types to their properties

Development

Prerequisites

  • Node.js >= 22

  • npm

Setup

git clone https://github.com/mapbox/mcp-docs-server.git
cd mcp-docs-server
npm install

Commands

npm run build          # Compile TypeScript (ESM + CJS)
npm test               # Run test suite (vitest)
npm run lint           # ESLint
npm run format         # Prettier check
npm run format:fix     # Prettier auto-fix
npm run inspect:build  # Launch MCP Inspector against built server
npm run inspect:dev    # Launch MCP Inspector against source (tsx)

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

  1. Create a directory src/tools/my-tool/

  2. Add MyTool.input.schema.ts (Zod schema), MyTool.output.schema.ts, and MyTool.ts (extends BaseTool)

  3. Register in src/tools/toolRegistry.ts

  4. 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

Available Tools

3 tools
batch_get_documents_toolBatch Get Mapbox Documents ToolA
Read-onlyIdempotent
Inspect

Fetch the full content of multiple Mapbox documentation pages in a single call (max 20). More efficient than calling get_document_tool multiple times. Returns an array of results — failed pages include an error message rather than failing the whole batch.

ParametersJSON Schema
NameRequiredDescriptionDefault
urlsYesArray of Mapbox documentation page URLs to fetch (max 20). All must be mapbox.com URLs.

TDQS

A5/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Beyond annotations (readOnlyHint, idempotentHint), the description reveals critical behavior: partial failures are handled gracefully—failed pages return error messages instead of failing the whole batch. This adds significant value for an agent deciding how to handle errors.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two terse sentences that pack maximum information: purpose, efficiency comparison, batch limit, and return behavior. No wasted words; each sentence earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema, the description adequately explains return format (array of results with error messages on failure). Combined with annotations and input schema, it covers all behavioral aspects needed for safe and effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Although schema coverage is 100%, the description adds the important constraint that all URLs must be mapbox.com URLs, which is not enforced by the schema's format: uri. This domain restriction is essential for correct usage and goes beyond what the schema provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states 'Fetch the full content of multiple Mapbox documentation pages' with a specific verb and resource. It distinguishes itself from sibling get_document_tool by noting efficiency and from search_mapbox_docs_tool by focusing on fetching full content rather than searching.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly states 'More efficient than calling get_document_tool multiple times,' directly guiding the agent to prefer this tool for batch requests. Also sets a clear limit (max 20) and mentions return behavior, leaving no ambiguity about appropriate use cases.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_document_toolGet Mapbox Document ToolA
Read-onlyIdempotent
Inspect

Fetch the full content of a specific Mapbox documentation page by URL. Use this after get_latest_mapbox_docs_tool to follow a link from the index and retrieve the complete page content. For fetching multiple pages at once, use batch_get_documents_tool instead.

ParametersJSON Schema
NameRequiredDescriptionDefault
urlYesURL of a Mapbox documentation page to fetch. Must be a mapbox.com URL (e.g. https://docs.mapbox.com/api/search/geocoding/).

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint, idempotentHint, etc., which the description does not contradict. The description adds that it fetches 'full content' but does not provide additional behavioral details like response format or potential limits. Given the strong annotations, this is adequate.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences, each serving a distinct purpose: stating the action, providing sequential usage, and noting an alternative. No filler, front-loaded with the primary function.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the simple single-parameter schema and comprehensive annotations, the description adequately explains the tool's role and relationship to siblings. Does not cover error handling or output details, but for a fetch tool this is acceptable.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with the 'url' parameter having a clear description. The tool description adds no new meaning beyond 'by URL'. Baseline score of 3 applies as the schema already documents the parameter well.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Fetch the full content of a specific Mapbox documentation page by URL', with a specific verb and resource. It distinguishes itself from the sibling 'batch_get_documents_tool' by noting its role for single-page retrieval and references the sequential tool 'get_latest_mapbox_docs_tool'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly advises use after 'get_latest_mapbox_docs_tool' and contrasts with 'batch_get_documents_tool' for multiple pages, providing clear context. Missing explicit mention of when not to use (e.g., when searching), but still strong guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_mapbox_docs_toolSearch Mapbox Docs ToolA
Read-onlyIdempotent
Inspect

Search Mapbox documentation by keyword or natural language query. Searches across API reference, GL JS, Help Center, Style Spec, Studio, Search JS, iOS/Android Maps and Navigation SDKs, and Tilesets. Returns ranked results with titles, URLs, and descriptions. Use get_document_tool to fetch the full content of a result page.

ParametersJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query for Mapbox documentation (e.g. "add a marker", "camera animation", "geocoding API").
limitNoMaximum number of results to return (1–20, default 5).

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare read-only and idempotent hints. The description adds that results are ranked with titles, URLs, and descriptions, filling the gap of no output schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences precisely define the tool's action, scope, output format, and related tool usage with no waste.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given full schema coverage, read-only annotations, and no output schema, the description provides sufficient context for a search tool, though could mention result ordering.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema covers both parameters fully with descriptions. The description mentions 'keyword or natural language query' but adds no new parameter semantics beyond schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool searches Mapbox documentation by keyword or natural language query, and lists specific documentation sources (API reference, GL JS, etc.), distinguishing it from sibling fetch tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It explicitly directs users to use get_document_tool for full content, but lacks broader when-to-use or when-not-to-use guidance beyond that single sibling.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 3 tool updatesv0.3.1
    • First observedbatch_get_documents_tool
    • First observedget_document_tool
    • First observedsearch_mapbox_docs_tool

TDQS

A4.4/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose: search_index returns pages, get_document fetches a single page, and batch_get_documents fetches multiple. There is no overlap or ambiguity.

Naming Consistency5/5

All tool names follow a consistent verb_noun_tool pattern (batch_get_documents_tool, get_document_tool, search_mapbox_docs_tool), making them predictable and easy to understand.

Tool Count5/5

With 3 tools, the server covers the essential operations for documentation retrieval (search, single fetch, batch fetch) without unnecessary bloat. The count is well-scoped for this purpose.

Completeness4/5

The tool set covers search, single fetch, and batch fetch effectively. However, there is no tool to list or navigate the documentation structure (e.g., get index/topics), requiring reliance on search alone. This is a minor gap.

Maintenance

ActivityMaintained
ResponsivenessUnresponsive

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mapbox/mcp-docs-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server