Setting the file. One moment.
Chapter 10 · Mapbox MCP Devkit Patterns
Subchapter 10.3
references/troubleshooting.mdMarkdown2 KBView on GitHub
Check:
index.js correct?Solution: Restart AI assistant after config changes.
Check:
styles:write scopeSolution: Use validate_style_tool tool first.
Check:
tokens:write scopeSolution: Check token scope documentation via DevKit.
Check:
Solution: Ask AI to explain validation errors.
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]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]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]