mapbox-mcp-runtime-patterns
This skill provides integration patterns for connecting the Mapbox MCP Server into AI applications and agent frameworks like pydantic-ai, Mastra, LangChain…
Identity proven by GitHub's verified organisation badge (mapbox)
- Agents
- Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode
- License
- MIT (permissive)
- Pin
- f71cd72pinned Oct 9, 2026
- Context cost
- about 1,400 tokenswhen the skill loads
- GitHub stars
- 80on mapbox/mapbox-agent-skills
- Scripts
- 5 scripts
What it does
“Integration patterns for Mapbox MCP Server in AI applications and agent frameworks. Covers runtime integration with pydantic-ai, mastra, LangChain, and custom agents. Use when building AI-powered applications that need geospatial capabilities.”
Generated summary from the skill's own text
This skill provides integration patterns for connecting the Mapbox MCP Server into AI applications and agent frameworks like pydantic-ai, Mastra, LangChain, and CrewAI. It covers both offline geospatial tools and Mapbox API capabilities for routing, geocoding, search, and travel time analysis in production use.
When to use it
- Building AI agents that need routing, geocoding, or proximity analysis
- Architecting location-based apps like real estate or food delivery with AI
- Choosing between Mapbox MCP, direct APIs, or SDKs for geospatial features
- Implementing geospatial AI features with production error handling and caching
When not to
- Simple web mapping without agent decision-making
- Projects that cannot use Mapbox APIs or tokens
Install
These commands install from the publisher's repository and need no account.
skills CLI
npx skills add mapbox/mapbox-agent-skills --skill mapbox-mcp-runtime-patternsInstalls from the repository's default branch, which may have changed since the commit we checked.
GitHub CLI 2.90 or later
gh skill install mapbox/mapbox-agent-skills mapbox-mcp-runtime-patterns@f71cd72b8d8937b06db440538bd65559eb792c49Installs the commit we checked (f71cd72).
Copy by hand
Download the folder at f71cd72 and put it in .claude/skills/mapbox-mcp-runtime-patterns for Claude Code and in .agents/skills/mapbox-mcp-runtime-patterns for Codex, Cursor, Gemini CLI, GitHub Copilot and OpenCode.
Claude Code plugin
/plugin install mapbox@claude-plugins-officialThe publisher's plugin in Claude's official marketplace. It may hold more than this skill, and we have not pinned it.
Copy for your agent
A prompt for any coding agent. It installs this skill from GitHub at the pinned commit, copies the files as they are, and runs nothing unless you ask.
Prompt
Install the agent skill "mapbox-mcp-runtime-patterns" by Mapbox. Source, pinned to commit f71cd72b8d8937b06db440538bd65559eb792c49: https://github.com/mapbox/mapbox-agent-skills/tree/f71cd72b8d8937b06db440538bd65559eb792c49/skills/mapbox-mcp-runtime-patterns 1. Download that folder at exactly this commit. Do not use the default branch. 2. Copy every file unchanged, keeping the folder structure, into .claude/skills/mapbox-mcp-runtime-patterns/ for Claude Code and .agents/skills/mapbox-mcp-runtime-patterns/ for Codex, Cursor, Gemini CLI, GitHub Copilot and OpenCode. Create the folders if they do not exist. 3. Do not edit the files, and do not run any script in the folder unless I ask you to. 4. When you are done, list the files you copied and where you put them. Listing and checks: https://www.agentnative.dev/skills/mapbox/mapbox-mcp-runtime-patterns
SKILL.md at the pin
--- name: mapbox-mcp-runtime-patterns description: Integration patterns for Mapbox MCP Server in AI applications and agent frameworks. Covers runtime integration with pydantic-ai, mastra, LangChain, and custom agents. Use when building AI-powered applications that need geospatial capabilities. --- # Mapbox MCP Runtime Patterns This skill provides patterns for integrating the Mapbox MCP Server into AI applications for production use with geospatial capabilities. ## What is Mapbox MCP Server? The [Mapbox MCP Server](https://github.com/mapbox/mcp-server) is a Model Context Protocol (MCP) server that provides AI agents with geospatial tools: **Offline Tools (Turf.js):** - Distance, bearing, midpoint calculations - Point-in-polygon tests - Area, buffer, centroid operations - Bounding box, geometry simplification - No API calls, instant results **Mapbox API Tools:** - Directions and routing - Reverse geocoding - POI category search - Isochrones (reachability) - Travel time matrices - Static map images - GPS trace map matching - Multi-stop route optimization **Utility Tools:** - Server version info - POI category list **Key benefit:** Give your AI application geospatial superpowers without manually integrating multiple APIs. ## Understanding Tool Categories Before integrating, understand the key distinctions between tools to help your LLM choose correctly: ### Distance: "As the Crow Flies" vs "Along Roads" **Straight-line distance** (offline, instant): - Tools: `distance_tool`, `bearing_tool`, `midpoint_tool` - Use for: Proximity checks, "how far away is X?", comparing distances - Example: "Is this restaurant within 2 miles?" → `distance_tool` **Route distance** (API, traffic-aware): - Tools: `directions_tool`, `matrix_tool` - Use for: Navigation, drive time, "how long to drive?" - Example: "How long to drive there?" → `directions_tool` ### Search: Type vs Specific Place **Category/type search**: - Tool: `category_search_tool` - Use for: "Find coffee shops", "restaurants nearby", browsing by type - Example: "What hotels are near me?" → `category_search_tool` **Specific place/address**: - Tool: `search_and_geocode_tool`, `reverse_geocode_tool` - Use for: Named places, street addresses, landmarks - Example: "Find 123 Main Street" → `search_and_geocode_tool` ### Travel Time: Area vs Route **Reachable area** (what's within reach): - Tool: `isochrone_tool` - Returns: GeoJSON polygon of everywhere reachable - Example: "What can I reach in 15 minutes?" → `isochrone_tool` **Specific route** (how to get there): - Tool: `directions_tool` - Returns: Turn-by-turn directions to one destination - Example: "How do I get to the airport?" → `directions_tool` ### Cost & Performance **Offline tools** (free, instant): - No API calls, no token usage - Use whenever real-time data not needed - Examples: `distance_tool`, `point_in_polygon_tool`, `area_tool` **API tools** (requires token, counts against usage): - Real-time traffic, live POI data, current conditions - Use when accuracy and freshness matter - Examples: `directions_tool`, `category_search_tool`, `isochrone_tool` **Best practice:** Prefer offline tools when possible, use API tools when you need real-time data or routing. ## Installation & Setup ### Option 1: Hosted Server (Recommended) **Easiest integration** - Use Mapbox's hosted MCP server at: ``` https://mcp.mapbox.com/mcp ``` No installation required. Simply pass your Mapbox access token in the `Authorization` header. **Benefits:** - No server management - Always up-to-date - Production-ready - Lower latency (Mapbox infrastructure) **Authentication:** Use token-based authentication (standard for programmatic access): ``` Authorization: Bearer your_mapbox_token ``` **Note:** The hosted server also supports OAuth, but that's primarily for interactive flows (coding assistants, not production apps). ### Option 2: Self-Hosted For custom deployments or development: ```bash npm install @mapbox/mcp-server ``` Or use directly via npx: ```bash npx @mapbox/mcp-server ``` **Environment setup:** ```bash export MAPBOX_ACCESS_TOKEN="your_token_here" ``` ## Reference Files Detailed integration patterns and production guidance are organized into reference files. Load the ones relevant to your task. - **Pydantic AI** -- Type-safe Python agents Load: `references/pydantic-ai.md` - **CrewAI** -- Multi-agent orchestration Load: `references/crewai.md` - **Smolagents** -- Lightweight HuggingFace agents Load: `references/smolagents.md` - **Mastra** -- Multi-agent TypeScript systems Load: `references/mastra.md` - **LangChain** -- Conversational AI with tool chaining Load: `references/langchain.md` - **Custom Agent** -- Zillow/TripAdvisor/DoorDash-style patterns, architecture diagrams, hybrid approach Load: `references/custom-agent.md` - **Use Cases** -- Real Estate, Food Delivery, Travel Planning examples Load: `references/use-cases.md` - **Production Patterns** -- Caching, batch operations, tool descriptions, error handling, security, rate limiting, testing Load: `references/production.md` ## Resources - [Mapbox MCP Server](https://github.com/mapbox/mcp-server) - [Model Context Protocol](https://modelcontextprotocol.io) - [Pydantic AI](https://ai.pydantic.dev/) - [Mastra](https://mastra.ai/) - [LangChain](https://docs.langchain.com/oss/javascript/langchain/overview/) - [Mapbox API Documentation](https://docs.mapbox.com/api/) ## When to Use This Skill Invoke this skill when: - Integrating Mapbox MCP Server into AI applications - Building AI agents with geospatial capabilities - Architecting Zillow/TripAdvisor/DoorDash-style apps with AI - Choosing between MCP, direct APIs, or SDKs - Optimizing geospatial operations in production - Implementing error handling for geospatial AI features - Testing AI applications with geospatial tools
From mapbox/mapbox-agent-skills at f71cd72, shown as plain text under its license: MIT (permissive). The license text is in LICENSE.md.
View SKILL.md on GitHub at f71cd72Files
- SKILL.md5.9 KB · fd2eb2e33ebf
- AGENTS.md13 KB · 81b301aa7a81
- evals/
- evals.json4.0 KB · 53294460d48e
- examples/
- README.md7.4 KB · d1e809e72dd6
- python/
- crewai_example.py9.3 KB · d79ea8ac7937
- pydantic_ai_example.py5.7 KB · 132694817341
- requirements.txt220 B · 2e45a70e1647
- smolagents_example.py9.4 KB · 030fa7d2942f
- typescript/
- langchain-example.ts7.9 KB · ca03637842b1
- mastra-example.ts8.1 KB · 05ba9b1ce857
- package-lock.json119 KB · dabfc851f48e
- package.json654 B · cb4032da106e
- tsconfig.json393 B · d74efcd5e89f
- references/
- crewai.md7.1 KB · b08b466ec6cb
- custom-agent.md7.6 KB · a09aee635a3b
- langchain.md5.9 KB · 0b75b0c9715c
- mastra.md2.7 KB · f30913f0607e
- production.md9.8 KB · af0e1384a769
- pydantic-ai.md2.9 KB · 0d27dc81edf7
- smolagents.md6.2 KB · 112352be96c6
- use-cases.md3.0 KB · eb3926a346f6
21 files, 236 KB in total. Each file has a sha256 in the pin's manifest; the first 12 characters are shown.
Skill folder on GitHub at f71cd72More from Mapbox
mapbox-android-patterns
This skill provides official patterns for integrating Mapbox Maps SDK v11 on Android, covering setup, map initialization, markers, user location display…
Claude Code, Codex, Cursor +4 · about 2.5K tokens · pinned 7 days ago
mapbox-cartography
This skill provides cartographic expertise for designing effective maps with Mapbox, covering visual hierarchy, color theory, typography, and zoom strategies.
Claude Code, Codex, Cursor +4 · about 1.7K tokens · pinned 7 days ago
mapbox-data-visualization-patterns
This skill teaches the agent to implement data visualization patterns on Mapbox maps, including choropleth maps, heat maps, 3D extrusions, and animated data…
Claude Code, Codex, Cursor +4 · about 2.1K tokens · pinned 7 days ago
mapbox-flutter-patterns
This skill teaches agents the standard patterns for integrating the Mapbox Maps Flutter SDK into iOS and Android apps written in Dart.
Claude Code, Codex, Cursor +4 · about 2.3K tokens · pinned 7 days ago
mapbox-geospatial-operations
This skill guides agents on selecting appropriate geospatial tools from the Mapbox MCP Server based on problem requirements.
Claude Code, Codex, Cursor +4 · about 4.8K tokens · pinned 7 days ago
mapbox-google-maps-migration
This skill guides developers migrating from Google Maps Platform to Mapbox GL JS by comparing APIs, translating patterns, and highlighting architectural…
Claude Code, Codex, Cursor +4 · about 2.9K tokens · pinned 7 days ago
Related in AI and agents
you-discover
This skill helps agents plan how to integrate You.com's web search, content extraction, and research APIs by discovering the right integration path for their…
by You.comOfficial publisher
Claude Code, Codex, Cursor +4 · about 1.2K tokens · pinned 7 days ago
neo4j-agent-memory-skill
Provides authoritative reference for neo4j-agent-memory, a Python package that adds graph-native memory to AI agents through three distinct layers (short-term…
by neo4j-contribCommunity
Claude Code, Codex, Cursor +3 · about 5.5K tokens · pinned 7 days ago
-21risk-automation
This skill automates 21risk operations by connecting to the 21risk toolkit through Composio's Rube MCP server.
by ComposioOfficial publisher
Claude Code, Codex, Cursor +3 · about 690 tokens · pinned 7 days ago
-2chat-automation
This skill automates 2chat tasks by integrating with Composio's 2chat toolkit through Rube MCP.
by ComposioOfficial publisher
Agents not labelled yet · about 680 tokens · pinned 7 days ago
ably-automation
This skill automates Ably messaging platform tasks by connecting to Composio's Ably toolkit through Rube MCP.
by ComposioOfficial publisher
Agents not labelled yet · about 680 tokens · pinned 7 days ago
abstract-automation
This skill enables agents to automate Abstract design platform operations through Composio's Abstract toolkit via Rube MCP.
by ComposioOfficial publisher
Claude Code, Codex, Cursor +3 · about 690 tokens · pinned 7 days ago