AM

aidenyangx/mapbox-mcp-server

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

12 stars 12 forks 质量 58 趋势 19MIT

MCP Server for the Mapbox API.

概览

- Get directions between coordinates - Inputs: - coordinates ({latitude: number, longitude: number}[]) - profile (optional): "driving-traffic", "driving", "walking", "cycling" - Returns: route details with steps, distance, duration - Get directions between places using their names - Inputs: - places (string[]): Array of place names - profile (optional): "driving-traffic", "driving", "walking", "cycling" - language (optional): Two-letter language code (e.g., "zh", "en") - Returns: - Geocoding results for each place - Route details with steps, distance, duration - Any errors that occurred during processing - Calculate travel time and distance matrices between coordinates - Inputs: - coordinates ({latitude: number, longitude: number}[]) - profile (optional): "driving", "walking", "cycling" - annotations (optional): "duration", "distance", "duration,distance" - sources (optional): Indices of source coordinates - destinations (optional): Indices of destination coordinates - Returns:...

README

以下为原文 README 节选,完整内容请查看原文。

Mapbox MCP Server

MCP Server for the Mapbox API.

Features

  1. mapbox_directions

    • Get directions between coordinates
    • Inputs:
      • coordinates ({latitude: number, longitude: number}[])
      • profile (optional): “driving-traffic”, “driving”, “walking”, “cycling”
    • Returns: route details with steps, distance, duration
  2. mapbox_directions_by_places

    • Get directions between places using their names
    • Inputs:
      • places (string[]): Array of place names
      • profile (optional): “driving-traffic”, “driving”, “walking”, “cycling”
      • language (optional): Two-letter language code (e.g., “zh”, “en”)
    • Returns:
      • Geocoding results for each place
      • Route details with steps, distance, duration
      • Any errors that occurred during processing
  3. mapbox_matrix

    • Calculate travel time and distance matrices between coordinates
    • Inputs:
      • coordinates ({latitude: number, longitude: number}[])
      • profile (optional): “driving”, “walking”, “cycling”
      • annotations (optional): “duration”, “distance”, “duration,distance”
      • sources (optional): Indices of source coordinates
      • destinations (optional): Indices of destination coordinates
    • Returns: Matrix of durations and/or distances between points
  4. mapbox_matrix_by_places

    • Calculate travel time and distance matrices between places using their names
    • Inputs:
      • places (string[]): Array of place names (2-25 places)
      • profile (optional): “driving”, “walking”, “cycling”
      • annotations (optional): “duration”, “distance”, “duration,distance”
      • language (optional): Two-letter language code
      • sources (optional): Indices of source places
      • destinations (optional): Indices of destination places
    • Returns:
      • Geocoding results for each place
      • Matrix of durations and/or distances
      • Any errors that occurred during processing

Search Tools

  1. mapbox_geocoding
    • Search for places and convert addresses into coordinates
    • Inputs:
      • searchText (string): The place or address to search for
      • limit (optional): Maximum number of results (1-10)
      • types (optional): Filter by place types (country, region, place, etc.)
      • language (optional): Two-letter language code
      • fuzzyMatch (optional): Enable/disable fuzzy matching
    • Returns: Detailed location information including coordinates and properties

Claude Desktop Integration

Add this configuration to your Claude Desktop config file (typically located at ~/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": {
在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "mapbox-mcp-server": { "command": "node", "args": ["/absolute/path/to/mapbox-mcp-server/build/index.js"], "env": { "MAPBOX_ACCESS_TOKEN": "your-api-key" } } } }