geolibre-mcp

geolibre-mcp

Provides geospatial data intelligence tools for inspecting, querying, and converting geospatial data using DuckDB Spatial.

Category
访问服务器

README

geolibre-cli

Agent-native geospatial data intelligence from the command line.

geolibre-cli lets humans and AI agents inspect, query, convert, and lightly process geospatial data without a GUI or cloud subscription. It uses DuckDB Spatial under the hood and keeps outputs small enough for agents to read.

What GEO-001 Solves

Before geolibre-cli, a quick geospatial sanity check often meant opening a desktop GIS tool, writing one-off Python, or copying large geometry payloads into an agent chat. That slows down transport-control-tower work where the first question is usually simple: what is in this file, how large is it, and can I query it?

After GEO-001, the same handoff can happen from a terminal:

  • Inspect GeoJSON, Parquet, CSV, and remote URL inputs.
  • Query local or remote datasets with DuckDB SQL.
  • Convert supported vector inputs to Parquet or GeoJSON.
  • Return compact JSON or table output that is practical for agents, CI logs, and issue comments.

Quick Start

npm install
npm run build

Run against the included demo fixtures:

node dist/cli.js inspect test/fixtures/points.geojson
node dist/cli.js sql "SELECT * FROM test/fixtures/data.csv LIMIT 2" --format table
node dist/cli.js convert test/fixtures/points.geojson --to parquet --output /tmp/geolibre-points.parquet

For a global local command during development:

npm link
geolibre inspect test/fixtures/points.geojson

Demo Output

Screenshot-friendly terminal output is captured in docs/demo/terminal-transcript.md. The short version:

$ node dist/cli.js inspect test/fixtures/points.geojson --format table
geom_wkt	id	name
POINT (55.2708 25.2048)	1	Dubai
POINT (46.6753 24.7136)	2	Riyadh
POINT (51.531 25.2854)	3	Doha

Common Commands

Inspect a file or URL:

geolibre inspect https://data.source.coop/giswqs/opengeos/countries.parquet

Run SQL with auto-wrapped file paths and URLs:

geolibre sql "SELECT NAME, POP_EST FROM https://data.source.coop/giswqs/opengeos/countries.parquet WHERE POP_EST > 50000000"

Run SQL against a local fixture without opening a GIS app:

node dist/cli.js sql "SELECT name, shipments FROM test/fixtures/data.csv ORDER BY shipments DESC LIMIT 3" --format table

Convert formats:

geolibre convert test/fixtures/points.geojson --to parquet --output /tmp/points.parquet

Run a small compound process:

geolibre process https://data.source.coop/giswqs/opengeos/countries.parquet \
  --sql "SELECT * FROM input WHERE CONTINENT = 'Europe'" \
  --buffer 50km \
  --output /tmp/europe-buffered.geojson

Output Philosophy

Default JSON output is capped at 2048 bytes. Large rows, geometry blobs, wide schemas, and long strings are summarized so agents do not waste context on raw coordinates or massive schemas.

Common flags:

  • --max-bytes 2048
  • --sample-rows 3
  • --no-sample
  • --limit 10
  • --format json|table

MCP Server

Build and run:

npm run build
node dist/mcp/server.js

Tools exposed:

  • geolibre_inspect
  • geolibre_sql
  • geolibre_convert
  • geolibre_vector placeholder
  • geolibre_compound placeholder

Validation

npm run build
npm audit --audit-level=high
npm test
node scripts/attack.mjs
node scripts/mcp-smoke.mjs

GitHub CI runs the same audit, build, CLI smoke, attack harness, and MCP smoke checks.

Data Notes

The public countries.parquet example is an upstream dataset and may change over time. During GEO-001 validation on 2026-06-14 it returned 176 observed features. Tests assert successful structured output and byte limits rather than a fixed feature count.

Security Notes

npm audit is clean at the high-severity gate. The project currently uses an npm override to force tar@7.5.16 because the current duckdb install-time dependency chain still pulls an older vulnerable tar through node-gyp. See docs/security-audit.md.

Limitations

  • v0.1 is not a full GIS engine.
  • CRS detection is best-effort and often reports unknown.
  • Shapefile support depends on DuckDB Spatial/GDAL behavior and is not yet first-class.
  • Raster operations are deferred.
  • Vector operations beyond the buffer demo are deferred.
  • SQL support is scoped to SELECT and WITH read queries.
  • Remote demo datasets can change or disappear; the local fixtures are the stable demo path.
  • Output caps intentionally summarize large values, so use a higher --max-bytes when you need more raw detail.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选