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.

referencestroubleshooting.md

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

Troubleshooting

DevKit not appearing in AI assistant

Check:

  1. MCP server running? Check logs
  2. Config file in correct location?
  3. Token environment variable set?
  4. Path to index.js correct?

Solution: Restart AI assistant after config changes.

Style creation fails

Check:

  1. Access token has styles:write scope
  2. Style name is unique
  3. JSON is valid Mapbox Style Spec

Solution: Use validate_style_tool tool first.

Token creation fails

Check:

  1. Access token has tokens:write scope
  2. Requested scopes are valid
  3. URL restrictions are well-formed

Solution: Check token scope documentation via DevKit.

Validation errors

Check:

  1. GeoJSON follows spec (RFC 7946)
  2. Coordinates are [longitude, latitude] order
  3. Properties match expected schema

Solution: Ask AI to explain validation errors.

Example Workflows

Build a Restaurant Finder

You: "I'm building a restaurant finder app. Create:
1. A light, neutral style emphasizing restaurants
2. A token for localhost with minimal scopes
3. Validate this GeoJSON with restaurant locations: [paste]"

AI: [Creates style, token, validates data]

You: "Add filters to show only 4+ star restaurants"

AI: [Updates style with expression]

You: "Generate a preview URL"

AI: [Returns preview]

Create Multi-Environment Setup

You: "Set up styles and tokens for dev, staging, prod:
- Dev: Full access, localhost
- Staging: Read-only, staging.example.com
- Prod: Minimal scopes, example.com

Each environment needs its own style variant."

AI: [Creates 3 styles and 3 tokens with specifications]

Validate Third-Party Data

You: "I received GeoJSON from a vendor. Validate it, check for:
- Correct coordinate order
- Valid geometry types
- Required properties: name, address, category"

AI: [Validates, reports issues]

You: "Fix the issues and save cleaned data to data/locations.json"

AI: [Fixes, saves file]

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.