All skills
mapbox avatar

/mapbox-mcp-devkit-patterns

@65bab68 official
by mapboxmapbox/mapbox-agent-skills80 stars
17

Integration patterns for Mapbox MCP DevKit Server in AI coding assistants. Covers setup, style management, token management, validation workflows, and documentation access through MCP. Use when building Mapbox applications with AI coding assistance.

Use this Skill: https://skilld.dev/gh/mapbox/mapbox-agent-skills/mapbox-mcp-devkit-patterns

This session only. Nothing lands on disk.

referencessetup.md

≈849 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Setup & Installation

Prerequisites

  • Mapbox account with access token
  • AI coding assistant that supports MCP (Claude Code, Cursor, Windsurf, Cline, etc.)

Option 1: Hosted Server (Recommended)

Easiest setup - Use Mapbox's hosted DevKit MCP server at:

https://mcp-devkit.mapbox.com/mcp

No installation required, just configure your AI assistant.

Authentication: The hosted server supports OAuth, so no token configuration needed! Simply add the server URL:

For Claude Desktop

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

{
  "mcpServers": {
    "mapbox-devkit-mcp": {
      "command": "npx",
      "args": ["mcp-remote", "https://mcp-devkit.mapbox.com/mcp"]
    }
  }
}

You'll be prompted to authenticate via OAuth on first use.

For Claude Code

Claude Code supports both user-level and project-level MCP configuration:

User-level (applies to all projects) - ~/.claude.json:

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

Project-level (specific project, can commit to git) - .mcp.json in repository root:

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

See Claude Code settings documentation for more details on configuration scopes.

For Cursor

Create or edit .cursor/mcp.json (project-local) or ~/.cursor/mcp.json (global):

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

After saving, restart Cursor. Click "Needs authentication" when prompted and follow the OAuth flow.

For VS Code with Copilot

Create or edit mcp.json:

{
  "servers": {
    "mapbox-devkit": {
      "type": "http",
      "url": "https://mcp-devkit.mapbox.com/mcp"
    }
  }
}

After saving, refresh the MCP service in VS Code. Requires GitHub Copilot with MCP support enabled.

For Windsurf/Cline

Similar configuration using the hosted URL with OAuth support.

Option 2: Self-Hosted (Advanced)

For development, debugging, or customization:

# Clone the DevKit server
git clone https://github.com/mapbox/mcp-devkit-server.git
cd mcp-devkit-server

# Install dependencies
npm install

# Build the server
npm run build

Configuration for self-hosted (Claude Desktop):

{
  "mcpServers": {
    "MapboxDevKitServer": {
      "command": "node",
      "args": ["/Users/username/github-projects/mcp-devkit-server/dist/esm/index.js"],
      "env": {
        "MAPBOX_ACCESS_TOKEN": "some token"
      }
    }
  }
}

Replace /Users/username/github-projects/ with your actual path.

Verify Installation

Ask your AI assistant:

"List the available Mapbox DevKit tools"

You should see 30+ tools including:

  • Style tools: create_style_tool, list_styles_tool, update_style_tool, delete_style_tool, preview_style_tool, etc.
  • Token tools: create_token_tool, list_tokens_tool
  • Validation tools: validate_geojson_tool, validate_style_tool, validate_expression_tool
  • Geographic tools: bounding_box_tool, coordinate_conversion_tool, tilequery_tool
  • Documentation: get_latest_mapbox_docs_tool

Source: SKILL.md on GitHub

1 warning17d5 checks · Risk SAFE
  • Gen Agent Trust Hub17d

    The skill provides patterns and documentation for the Mapbox MCP DevKit, a toolset for Mapbox development. It follows security best practices for API token management and uses official Mapbox resources. The skill is assessed as low risk because it processes external data such as GeoJSON and style JSON, which represents a standard surface for indirect prompt injection attacks.

  • Socket17d

    No alerts

  • Snyk17d

    Risk: LOW · No issues

  • Runlayer6mo

    2/2 files flagged

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at 65bab68. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 9 hours ago.

Activeupdated 6 months ago
  • MCP
  • mapbox
  • style-management
  • token-management
  • validation
  • geojson
  • geojs
  • ai-coding

README badge

README badge for mapbox/mapbox-agent-skills/mapbox-mcp-devkit-patterns

Provides integration patterns for the Mapbox MCP DevKit Server, enabling AI assistants to manage styles, tokens, and validate data through Model Context Protocol. Use this skill when building Mapbox applications with AI assistance to handle style creation, token generation, GeoJSON validation, and documentation lookup.

Generated from the current SKILL.md.

What is the Mapbox MCP DevKit Server?
It's a Model Context Protocol (MCP) server that gives AI assistants direct access to Mapbox developer APIs for style management, token generation, validation, geographic utilities, and documentation lookup during development.
Can I use this skill for runtime operations in production applications?
No. The DevKit is development-time only and should not be used for runtime operations, high-frequency updates, client-side operations, or user-facing features requiring low latency.
What validation tools does this skill provide?
The skill includes `validate_style_tool` for style JSON spec compliance, `validate_expression_tool` for paint/layout property checks, and `check_color_contrast_tool` for WCAG accessibility verification.
How do I manage access tokens with this skill?
Use `create_token_tool` to generate scoped tokens per environment (dev/staging/prod) and `list_tokens_tool` to view existing tokens and their scopes.

Generated from the current SKILL.md. These answers refresh after source changes.