Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
126 changes: 126 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ The Mapbox MCP Server transforms any AI agent or application into a geospatially
- **Travel time matrices** to analyze accessibility and optimize logistics
- **Isochrone generation** to visualize areas reachable within specific time or distance constraints
- **Static map images** to create visual representations of locations, routes, and geographic data
- **Offline geospatial calculations** for distance, area, bearing, buffers, and spatial analysis without requiring API calls

Whether you're building an AI travel assistant, logistics optimizer, location-based recommender, or any application that needs to understand "where", the Mapbox MCP Server provides the spatial intelligence to make it possible. You can also enable it on popular clients like Claude Desktop and VS Code. See below for details

Expand Down Expand Up @@ -77,6 +78,18 @@ Try these prompts with Claude Desktop or other MCP clients after setup:
- "Calculate a travel time matrix between these 3 hotel locations (Marriott, Sheraton and Hilton) and the convention center in Denver"
- "Find the optimal route visiting these 3 tourist attractions (Golden Gate, Musical Stairs and Fisherman's Wharf) in San Francisco"

### Offline Geospatial Calculations

- "What's the distance in miles between these two coordinates?"
- "Calculate the area of this polygon in square kilometers"
- "Is the point at 37.7749°N, 122.4194°W inside this service area polygon?"
- "What's the bearing from San Francisco to New York?"
- "Find the midpoint between London and Paris"
- "Create a 5-mile buffer zone around this location"
- "Calculate the centroid of this neighborhood boundary"
- "What's the bounding box for these route coordinates?"
- "Simplify this complex polygon to reduce the number of points"

### Tips for Better Results

- Be specific about locations (use full addresses or landmark names)
Expand Down Expand Up @@ -178,6 +191,119 @@ Provides access to MCP resources for clients that don't support the native MCP r

**Note**: If your MCP client supports native resources, prefer using the resource API directly for better performance.

### Offline Geospatial Tools

These tools perform geospatial calculations completely offline without requiring Mapbox API calls. They use [Turf.js](https://turfjs.org/) for accurate geographic computations and work anywhere, even without internet connectivity.

#### Distance Tool

Calculate the distance between two geographic coordinates using the Haversine formula.

**Features**:

- Supports multiple units: kilometers, miles, meters, feet, nautical miles
- Accurate great-circle distance calculation
- No API calls required

**Example Usage**: "What's the distance between San Francisco (37.7749°N, 122.4194°W) and New York (40.7128°N, 74.0060°W)?"

#### Point in Polygon Tool

Test whether a point is inside a polygon or multipolygon.

**Features**:

- Works with complex polygons including holes
- Supports multipolygons
- Useful for geofencing and service area checks

**Example Usage**: "Is this delivery address inside our service area?"

#### Bearing Tool

Calculate the compass direction (bearing) from one coordinate to another.

**Features**:

- Returns bearing in degrees (0-360°)
- Provides cardinal direction (N, NE, E, SE, S, SW, W, NW)
- Useful for navigation and directional queries

**Example Usage**: "What direction should I head to go from here to the airport?"

#### Midpoint Tool

Find the geographic midpoint between two coordinates along the great circle path.

**Features**:

- Calculates true midpoint on Earth's curved surface
- Useful for meeting point suggestions
- Handles long-distance calculations correctly

**Example Usage**: "What's halfway between San Francisco and New York?"

#### Centroid Tool

Calculate the geometric center (centroid) of a polygon or multipolygon.

**Features**:

- Works with complex shapes
- Returns arithmetic mean of all points
- Useful for placing labels or markers

**Example Usage**: "Where should I place a marker for this neighborhood boundary?"

#### Area Tool

Calculate the area of a polygon.

**Features**:

- Supports multiple units: square meters, square kilometers, acres, hectares, square miles, square feet
- Accurate area calculation on Earth's surface
- Works with polygons of any size

**Example Usage**: "What's the area of this park in acres?"

#### Bounding Box Tool

Calculate the minimum bounding box (bbox) that contains a geometry.

**Features**:

- Works with points, lines, polygons, and multipolygons
- Returns [minLongitude, minLatitude, maxLongitude, maxLatitude]
- Useful for viewport calculations and spatial indexing

**Example Usage**: "What's the bounding box for this route?"

#### Buffer Tool

Create a buffer zone (polygon) around a point, line, or polygon.

**Features**:

- Supports multiple distance units
- Creates circular buffers around points
- Useful for proximity analysis and creating zones of influence

**Example Usage**: "Show me a 5km buffer zone around this location"

#### Simplify Tool

Reduce the number of vertices in a line or polygon using the Douglas-Peucker algorithm.

**Features**:

- Configurable tolerance for detail level
- Preserves overall shape while reducing complexity
- Useful for reducing file sizes and improving rendering performance
- Option to maintain topology (prevent self-intersections)

**Example Usage**: "Simplify this complex boundary to reduce the number of points"

### Mapbox API Tools

#### Category List Tool (Deprecated)
Expand Down
Loading