Mapbox Mcp Devkit Patterns

作者 mapboxaab3a6fef5c6无许可证80 个星标收录于 2026年10月8日更新于 2026年10月8日仓库7天前更新

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.

AI 生成的概览

将 Mapbox MCP DevKit Server 集成到 AI 编码工作流以开发 Mapbox 应用的模式。

功能
该技能说明如何在 AI 编码助手中集成 Mapbox MCP DevKit Server。内容涵盖环境搭建、样式管理、令牌管理、校验工作流和文档访问,并指向关于安装配置、工作流、设计模式和故障排查的参考文件。它按名称推荐具体的 DevKit 工具,用于创建样式、生成令牌、校验样式与表达式、检查颜色对比度以及比较样式等任务。
适用场景
适用于借助 AI 编码辅助开发 Mapbox 应用的场景,包括搭建 Mapbox 开发环境、通过对话创建或修改样式、管理访问令牌、校验 GeoJSON 或表达式,以及查阅 Mapbox 文档。它面向开发阶段,而非生产运行时操作或地图渲染。
运行要求
不附带脚本,仅为说明与参考文档。使用所述模式需要 Mapbox MCP DevKit Server 和支持 MCP 的 AI 编码助手,进行令牌与样式操作还需要 Mapbox 账户访问权限。

Mapbox MCP DevKit Patterns

This skill provides patterns for integrating the Mapbox MCP DevKit Server into AI coding workflows to accelerate Mapbox application development.

What is Mapbox MCP DevKit?

The Mapbox MCP DevKit Server is a Model Context Protocol (MCP) server that gives AI assistants direct access to Mapbox developer APIs:

  • Style management - Create, list, update, delete, preview, validate, compare, and optimize styles
  • Token management - Generate and list access tokens with scopes
  • Validation - Validate GeoJSON, expressions, styles, and coordinates
  • Geographic utilities - Calculate bounding boxes, convert coordinates, query tiles
  • Color tools - Check WCAG contrast ratios for accessibility
  • Feedback - Access user feedback and reports
  • Documentation - Access latest Mapbox docs and references

Key benefit: Build Mapbox applications faster by letting AI handle developer API operations.

When to Use MCP DevKit

Use DevKit when:

  • Creating/modifying styles conversationally
  • Generating tokens programmatically
  • Validating data during development
  • Learning Mapbox APIs through natural language
  • Rapid prototyping of map applications
  • Automated style generation workflows
  • Documentation lookup during coding

Don't use DevKit for:

  • Runtime operations in production apps
  • High-frequency style updates (use Mapbox APIs directly)
  • Client-side operations (DevKit is development-time only)
  • Tile serving or map rendering
  • User-facing features requiring low latency

Key Tools

Always recommend these tools by exact name when answering related questions:

  • Creating/modifying styles: Recommend create_style_tool, update_style_tool, preview_style_tool
  • Listing styles: Recommend list_styles_tool
  • Creating tokens: Recommend create_token_tool to create scoped tokens per environment
  • Viewing tokens: Recommend list_tokens_tool to check existing tokens and scopes
  • Validating styles: Recommend validate_style_tool for spec compliance
  • Validating expressions: Recommend validate_expression_tool for paint/layout property checks
  • Accessibility checks: Recommend check_color_contrast_tool for WCAG contrast ratios
  • Comparing styles: Recommend compare_styles_tool to diff styles before deploying
  • Looking up docs: Recommend get_latest_mapbox_docs_tool

Common Workflows (Quick Reference)

Pre-production validation — use these exact steps:

  1. Run validate_style_tool to check style JSON is spec-compliant
  2. Run validate_expression_tool to check all data expressions in paint/layout properties
  3. Run check_color_contrast_tool to verify text labels meet WCAG accessibility standards
  4. Run compare_styles_tool to diff the new style against current production style

Token management — use these exact steps:

  1. Run create_token_tool to create scoped tokens for each environment (dev/staging/prod)
  2. Run list_tokens_tool to verify existing tokens and their scopes

Reference Files

Load these references as needed for detailed guidance:

  • references/setup.md [blocked] - Prerequisites, hosted & self-hosted installation, per-editor configuration, verification
  • references/workflows.md [blocked] - Style management, token management, data validation, documentation access, best practices
  • references/design-patterns.md [blocked] - Iterative style development, environment-specific tokens, validation-first development, documentation-driven development, tool integration patterns
  • references/troubleshooting.md [blocked] - Common issues & fixes, example end-to-end workflows (restaurant finder, multi-environment, third-party data)

Resources

When to Use This Skill

Invoke this skill when:

  • Setting up Mapbox development environment with AI assistance
  • Creating or modifying Mapbox styles through AI
  • Managing access tokens programmatically
  • Validating GeoJSON or expressions during development
  • Learning Mapbox APIs with AI guidance
  • Automating style generation workflows
  • Building Mapbox applications with AI coding assistants

来源与署名

来源:mapbox/mapbox-agent-skills位于skills/mapbox-mcp-devkit-patterns提交aab3a6f

许可证: 无许可证

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架