mapbox-mcp-server
Mapbox MCP 服务器
Mapbox API 的 MCP 服务器。
特征
导航工具
mapbox_directions获取坐标之间的方向
输入:
coordinates({纬度:数字,经度:数字}[])profile(可选):“驾驶交通”,“驾驶”,“步行”,“骑自行车”
返回:路线详情,包括步数、距离、持续时间
mapbox_directions_by_places使用地点名称获取地点之间的路线
输入:
places(string[]):地名数组profile(可选):“驾驶交通”,“驾驶”,“步行”,“骑自行车”language(可选):两个字母的语言代码(例如“zh”、“en”)
返回:
每个地点的地理编码结果
路线详情,包括步数、距离、持续时间
处理过程中发生的任何错误
mapbox_matrix计算坐标之间的行程时间和距离矩阵
输入:
coordinates({纬度:数字,经度:数字}[])profile(可选):“驾驶”、“步行”、“骑自行车”annotations(可选):“持续时间”、“距离”、“持续时间,距离”sources(可选):源坐标的索引destinations(可选):目的地坐标的索引
返回:点之间的持续时间和/或距离的矩阵
mapbox_matrix_by_places使用地点名称计算地点之间的旅行时间和距离矩阵
输入:
places(string[]): 地名数组(2-25 个地点)profile(可选):“驾驶”、“步行”、“骑自行车”annotations(可选):“持续时间”、“距离”、“持续时间,距离”language(可选):两个字母的语言代码sources(可选):来源地索引destinations(可选):目的地索引
返回:
每个地点的地理编码结果
持续时间和/或距离矩阵
处理过程中发生的任何错误
搜索工具
mapbox_geocoding搜索地点并将地址转换为坐标
输入:
searchText(字符串):要搜索的地点或地址limit(可选):最大结果数(1-10)types(可选):按地点类型(国家、地区、地点等)进行过滤language(可选):两个字母的语言代码fuzzyMatch(可选):启用/禁用模糊匹配
返回:详细的位置信息,包括坐标和属性
Related MCP server: Overture Maps MCP
Claude 桌面集成
将此配置添加到您的 Claude Desktop 配置文件(通常位于~/Library/Application Support/Claude/claude_desktop_config.json ):
{
"mcpServers": {
"mapbox-mcp-server": {
"command": "node",
"args": ["/absolute/path/to/mapbox-mcp-server/build/index.js"],
"env": {
"MAPBOX_ACCESS_TOKEN": "your-api-key"
}
}
}
}设置
先决条件
Node.js 16 或更高版本
TypeScript 4.5 或更高版本
有效的 Mapbox API 密钥
API 密钥
按照此处的说明获取 Mapbox API 密钥。
将您的 API 密钥设置为环境变量:
export MAPBOX_ACCESS_TOKEN=your_api_key_here速率限制
路线 API:每分钟 300 个请求
矩阵 API:
每分钟 60 个驾驶/步行/骑行请求
每分钟 30 个驾驶交通请求
地理编码 API:每分钟 600 个请求
部署
结构
在 mapbox-mcp-server 中,我们使用以下结构来管理服务器的处理程序:
src/server/handlers/base.ts:所有处理程序的基类src/server/registry.ts:所有处理程序的注册表src/server/main.ts:服务器的主入口点
每个功能模块都遵循以下结构:
src/
├── types/ # Type definitions
├── schemas/ # Zod schemas for validation
├── tools/
│ ├── definitions/ # Tool definitions
│ └── handlers/ # Tool implementations
└── server/
└── handlers/ # Handler classes类图:
流程图:
错误处理
所有工具都实现了全面的错误处理:
输入验证错误
API 请求失败
速率限制错误
服务特定错误(例如,未找到路线、坐标无效)
执照
此 MCP 服务器采用 MIT 许可证。这意味着您可以自由使用、修改和分发该软件,但须遵守 MIT 许可证的条款和条件。更多详情,请参阅项目仓库中的 LICENSE 文件。
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- -license-qualityAmaintenanceMCP Server for the Google Maps API.11,86889,405MIT
- Flicense-qualityBmaintenancePython MCP server for querying Overture Maps building footprint data via address search, building lookups, and nearby building listings.
- Alicense-qualityDmaintenanceAn MCP server for forward geocoding via the Nominatim API (OpenStreetMap) with no API key required.12MIT
- Flicense-qualityAmaintenanceAn MCP server providing geocoding, routing, isochrones, and POI-by-proximity search through self-hosted OpenStreetMap backends.
Related MCP Connectors
MapTiler MCP.
MCP server for Mireye Earth — federal-source-cited geospatial data for any MCP-aware agent.
Geo-based flight search MCP server. Find more flights between any two places on earth
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/AidenYangX/mapbox-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server