bbox-mcp-server
The geospatial toolkit for AI agents. 6 tools, zero config — give any LLM the ability to parse, convert, query, and aggregate spatial data out of the box. Or just make a bounding box :) Every response includes a verification link to vibhorsingh.com/boundingbox so you can visually confirm results on an interactive map.
README
🌍 bbox-mcp-server
The geospatial toolkit for AI agents. 6 tools, zero config — give any LLM the ability to parse, convert, query, and aggregate spatial data out of the box.
Every response includes a verification link to vibhorsingh.com/boundingbox so you can visually confirm results on an interactive map.
Why This Exists
| The problem | How bbox-mcp solves it |
|---|---|
| "I have WKT but the API needs a GeoJSON bbox in EPSG:3857." | Parses 6 input formats, projects to 3,900+ EPSG codes, outputs in 9 formats — in one call. |
| "I keep getting the wrong OSM tags for Overpass queries." | list_osm_tags returns curated tag combos. No more hallucinated amenity=grocery. |
| "How many hospitals are in this district?" | aggregate_overpass_h3 queries Overpass and bins results into H3 hexagons server-side. |
| "Is this bounding box actually correct?" | Every response includes a clickable map link for visual verification. |
Tools at a Glance
| Tool | What it does | Key params |
|---|---|---|
get_bounds |
Convert and project a bbox across formats and coordinate systems | bbox, epsg, format, coord_order, zoom |
get_h3_indices |
Generate H3 hex cell indices covering a bbox | bbox, resolution, compact |
generate_share_url |
Create a shareable map link for a bbox | bbox |
search_overpass |
Query OpenStreetMap via Overpass QL | bbox, query, limit |
list_osm_tags |
Look up correct OSM tags for a category | category |
aggregate_overpass_h3 |
Run an Overpass query and bin results into H3 hexagons | bbox, query, resolution |
All tools accept location (natural language, requires Mapbox token) or bbox (coordinates, WKT, GeoJSON, etc).
Quick Start
Add to your MCP client config:
<details> <summary><b>Claude Desktop</b> <i>(Click to expand)</i></summary>
Add to claude_desktop_config.json:
{
"mcpServers": {
"bbox": {
"command": "npx",
"args": ["-y", "bbox-mcp-server"]
}
}
}
</details>
<details> <summary><b>Cursor</b> <i>(Click to expand)</i></summary>
Add to .cursor/mcp.json:
{
"mcpServers": {
"bbox": {
"command": "npx",
"args": ["-y", "bbox-mcp-server"]
}
}
}
</details>
<details> <summary><b>Windsurf</b> <i>(Click to expand)</i></summary>
Add to ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"bbox": {
"command": "npx",
"args": ["-y", "bbox-mcp-server"]
}
}
}
</details>
<details> <summary><b>VS Code (GitHub Copilot) or Google Antigravity</b> <i>(Click to expand)</i></summary>
Add to .vscode/mcp.json in your workspace:
{
"servers": {
"bbox": {
"command": "npx",
"args": ["-y", "bbox-mcp-server"]
}
}
}
</details>
<br/>
Try: "Get the bounding box for Central Park in WKT format"
Optional Configuration
{
"mcpServers": {
"bbox": {
"command": "npx",
"args": ["-y", "bbox-mcp-server"],
"env": {
"MAPBOX_ACCESS_TOKEN": "pk.your-token-here",
"OVERPASS_API_URL": "https://your.custom.overpass.instance/api/interpreter"
}
}
}
}
| Variable | Default | Description |
|---|---|---|
MAPBOX_ACCESS_TOKEN |
— | Enables natural language location search (e.g. "San Francisco") |
OVERPASS_API_URL |
auto | Custom Overpass endpoint. By default, rotates between overpass-api.de and kumi.systems. |
MAX_H3_CELLS |
50000 |
Safety cap for H3 grid generation |
Or install globally: npm install -g bbox-mcp-server
Tool Reference
get_bounds
Convert and project a bounding box across 6 input formats, 9 output formats, and 3,900+ coordinate systems. Returns the center point and tile coordinates for the centroid.
| Param | Type | Default | Description |
|---|---|---|---|
bbox |
string | — | Input geometry (coordinates, WKT, GeoJSON, ogrinfo extent) |
epsg |
string | "4326" |
Target projection. Unknown codes auto-fetched from epsg.io. |
format |
string | "csv" |
Output: csv, wkt, geojson-bbox, geojson-polygon, leaflet, overpass, ogc-bbox, kml, stac-bbox |
coord_order |
string | "lng,lat" |
Swap to "lat,lng" for APIs that expect latitude first |
zoom |
number | 15 |
Zoom level for tile coordinate calculation |
precision |
number | 6 |
Decimal places in formatted output |
💡 Prompt: "Get the bounding box for Central Park in WKT format projected to EPSG:32618"
get_h3_indices
Generate Uber H3 hexagonal cell indices covering a bounding box.
| Param | Type | Default | Description |
|---|---|---|---|
bbox |
string | — | Input geometry |
resolution |
number | — | H3 resolution (0–15) |
compact |
boolean | false |
Merge cells into coarser parents where possible |
return_geometry |
boolean | false |
Include GeoJSON hex boundaries |
💡 Prompt: "Give me H3 cells at resolution 7 for downtown Chicago, include the hex geometries"
search_overpass
Execute an Overpass QL query within a bounding box. Returns structured results with names, coordinates, and tags.
| Param | Type | Default | Description |
|---|---|---|---|
bbox |
string | — | Input geometry |
query |
string | — | Overpass QL (e.g. nwr["amenity"="cafe"]). The server wraps it in a bbox filter automatically. |
limit |
number | 100 |
Max elements returned |
💡 Prompt: "Search for nwr["amenity"="bench"] in Central Park, limit 50"
list_osm_tags
Look up the correct OpenStreetMap tags for a category before writing an Overpass query.
| Param | Type | Description |
|---|---|---|
category |
string | Broad category (e.g. "food", "health", "transport") |
💡 Prompt: "What are the correct OSM tags for supermarkets?"
aggregate_overpass_h3
Run an Overpass query and bin results into H3 hexagons for spatial density analysis. Returns counts per cell and GeoJSON hex boundaries.
| Param | Type | Default | Description |
|---|---|---|---|
bbox |
string | — | Input geometry |
query |
string | — | Overpass QL core query |
resolution |
number | 8 |
H3 resolution for binning |
💡 Prompt: "Aggregate all hospitals in Seattle into H3 bins at resolution 7"
generate_share_url
Generate a shareable link to visualize a bounding box on the interactive map at vibhorsingh.com/boundingbox.
| Param | Type | Description |
|---|---|---|
bbox |
string | Input geometry |
💡 Prompt: "Generate a share link for bbox 40.7128,-74.0060,40.7580,-73.9855"
Supported Input Formats
All tools auto-detect the input format. No need to specify which one you're using.
| Format | Example |
|---|---|
| Raw coordinates | 40.7128,-74.0060,40.7580,-73.9855 |
| WKT | POLYGON((-74.006 40.712, -73.985 40.712, ...)) |
| GeoJSON | {"type":"Feature","geometry":{...}} |
| GeoJSON bbox | {"bbox":[-74.006,40.712,-73.985,40.758]} |
| ogrinfo extent | Extent: (-74.006, 40.712) - (-73.985, 40.758) |
| Space-separated | 40.7128 -74.0060 40.7580 -73.9855 |
🤖 For AI Agent Developers
Response structure
Every tool returns two content blocks:
- Human-readable text — formatted output with the map verification link
- Structured JSON — all computed data, machine-parseable
Example get_bounds JSON response:
{
"original_wgs84": { "lat1": 40.7128, "lng1": -74.006, "lat2": 40.758, "lng2": -73.9855 },
"projected": { "xmin": -8238310.23, "ymin": 4970241.32, "xmax": -8235527.11, "ymax": 4976491.56 },
"center": { "lat": 40.7354, "lng": -73.99575 },
"tile_indices": { "z": 15, "x": 9660, "y": 12284 },
"epsg": "3857",
"coord_order": "lng,lat",
"area_km2": 8.681,
"dimensions": { "width_km": 1.714, "height_km": 5.066 },
"share_url": "https://vibhorsingh.com/boundingbox/#40.712800,-74.006000,40.758000,-73.985500"
}
Error handling
All errors return isError: true with a descriptive message. Invalid coordinates, unknown EPSG codes, and oversized H3 requests all return clean errors — the server never crashes on bad input.
Logging
Structured JSON logs go to stderr (stdout is reserved for MCP protocol). Each entry includes timestamp, level, and context.
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。