GeoLens MCP
A read-only MCP for the GeoLens geospatial data catalog: datasets, schemas, features, maps, stories and a safe SELECT.
- 297 ★ on the repository
- Last commit
- Apache-2.0
Minimal access
Why this level
- The server only reads, but catalog data and query results go into the model context.
Install
- Works in
Manual install
pip install geolens-mcpThe PyPI package, run with `uvx geolens-mcp`. The instance address is set in `GEOLENS_INSTANCE`.
Access and checks
How we reviewMinimal accessThe tool runs nothing and makes no network calls.
- The server only reads, but catalog data and query results go into the model context.
This is third-party code. Review the repository files before installing.
What it does
GeoLens is a self-hosted geospatial data catalog with semantic search on pgvector and OGC and STAC APIs. Its `geolens-mcp` server opens the catalog to agents such as Claude Code, Cursor and Codex strictly read-only: no write, ingest or admin tools. Every call is scoped to the caller access. Tools: `search_datasets`, `get_dataset_schema` and `get_features` find datasets, show columns and page through features. `list_maps` and `get_map` return saved maps with layers, and `list_stories` and `get_story` published stories with chapters. `aggregate` computes exact counts, statistics, histograms and group-bys over one dataset. `query` runs one sandboxed SELECT. `GEOLENS_INSTANCE` sets the instance address and `GEOLENS_API_KEY` is needed for non-public data.
Who it is for. Geospatial developers and analysts with a GeoLens deployment who want to read the catalog from a Claude Code, Cursor or Codex session.
Good fit when
- An agent searches datasets by topic and shows columns before writing code.
- Feature counts by borough are computed with an `aggregate` group-by.
- Published stories and their chapters are read for a material summary.
- One safe SELECT is run when aggregates are not enough.
Not a fit when
- Uploading or editing data is needed: the server has no write tools.
- There is no deployed GeoLens: the server reads a specific catalog instance.
- Access to story drafts is needed: drafts are never read.
Example request
Find datasets about buildings, show the schema of the best one and count features by borough.MCP
- Transport
- stdio
- Authentication
- key is optional
Environment variables
GEOLENS_INSTANCErequired- Address of your GeoLens instance
GEOLENS_API_KEYsecret- API key for non-public data
Limitations
The server works with one GeoLens instance whose address is set in `GEOLENS_INSTANCE`, and non-public data needs `GEOLENS_API_KEY`. All tools are read-only and scoped to the caller access, and story drafts are never read. Aggregates keep the route limits: a `too_wide` refusal means the selected area holds over 500,000 rows and must be narrowed, and `query_busy` says two aggregates are already running and the request is retried after a pause. `query` allows one sandboxed SELECT and `aggregate` is meant for counts.
How to disable. Remove the `geolens` entry from the client and revoke the `GEOLENS_API_KEY` key in your GeoLens instance. Catalog data stays untouched.
FAQ
How do I install it?
`pip install geolens-mcp` or run `uvx geolens-mcp`. The instance address is set in `GEOLENS_INSTANCE`.
Is a key needed?
Only for non-public data: `GEOLENS_API_KEY`. A public catalog is read without it.
What if `too_wide` is returned?
Narrow the `bbox`: it holds over 500,000 rows. For `query_busy` wait and retry.
Are there write tools?
No. The server is read-only, with no ingest, admin or write, and every call is scoped to the caller access.
Where is the full guide?
At `docs.getgeolens.com/guides/sdk/mcp/`: client setup, the tool list and credential rules.
Discussion
No questions or reviews yet.
Related
MCP servers2GIS MCP
2GIS MCP (mapgl-mcp-server)
2GIS's official MCP server: place search, geocoding, routes, isochrones and static maps via the 2GIS APIs, needs a key from the Platform Manager
Control a CesiumJS 3D globe from AI: 62 commands for camera, layers, models and animation over MCP, WebMCP or function calling
An MCP server for PostgreSQL with several databases at once, table descriptions from the catalog, PostGIS and pgvector hints and query plans
An MCP server for pre-project land analysis: Rosreestr boundaries, Yandex geocoding and maps, infrastructure and geometry
An MCP server with a toolbox for global briefs: markets, SEC filings, conflict, climate and news from open sources
Mapbox's official MCP server: geocoding, place search, routing, isochrones, in-chat maps and offline geo calculations
README in short
The `geolens-mcp` package README lists the nine tools, environment variables, aggregate limits and how to run tests. The general GeoLens README covers the catalog and APIs.