# geolens-io/geolens [Health: Active]

**Category:** 🗺️ Location Services  
**Repository:** https://github.com/geolens-io/geolens/tree/main/mcp  
**GitHub Stars:** 282  
**Views:** 7  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/geolens-io-geolens

## Description
Read-only access to a self-hosted GeoLens geospatial catalog: dataset search, schemas, GeoJSON features, saved maps, and sandboxed read-only SQL over PostGIS.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `uvx` (confidence: high):

```json
"mcpServers": {
  "geolens": {
    "command": "uvx",
    "args": ["geolens-mcp"],
    "env": {
      "GEOLENS_INSTANCE": "",
      "GEOLENS_API_KEY": ""
    }
  }
}
```

**Requires environment variables:** `GEOLENS_INSTANCE`, `GEOLENS_API_KEY` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What geolens-io/geolens does

geolens-io/geolens exposes a self-hosted GeoLens geospatial catalog through the Model Context Protocol. An MCP-compatible coding agent can search the catalog, examine dataset schemas, retrieve GeoJSON features, inspect saved maps, and query the underlying PostGIS data with read-only SQL.

The server is intended for investigation and development workflows rather than catalog management. It provides no write, ingestion, or administrative operations. Calls are limited by the requesting user’s access, so an agent cannot use the connection to bypass the permissions applied by the GeoLens instance.

## How it works

The MCP client starts or connects to the server and directs requests to the configured GeoLens instance. The server reads the instance address from `GEOLENS_INSTANCE`. When the requested resources are private, it also uses `GEOLENS_API_KEY` for authentication.

Each operation remains read-only. SQL access is sandboxed and targets PostGIS data, making it suitable for examining spatial records, checking available fields, or producing query results during a development session. The same connection can also be used to locate datasets and move from catalog metadata to feature or map content.

Because access follows the caller’s permissions, the useful scope of a session depends on the identity and credentials supplied to GeoLens. A public instance or public datasets can be accessed without the private-data credential described by the project.

## Setup and configuration

Install the package from PyPI with:

```bash
pip install geolens-mcp
```

Alternatively, run it through `uvx` without installing it into the active environment:

```bash
uvx geolens-mcp
```

Set `GEOLENS_INSTANCE` to identify the GeoLens deployment the agent should use. Set `GEOLENS_API_KEY` when the agent must access non-public data. Client-specific connection instructions and credential rules are maintained in the GeoLens MCP guide, so the client configuration should be matched to the MCP client being used.

The repository also includes a development test command using `uv`:

```bash
cd mcp
uv run --extra dev python -m pytest -v
```

## Tools and capabilities

- Search and discover datasets in a GeoLens catalog.
- Inspect the schemas associated with available datasets.
- Read GeoJSON features from accessible geospatial data.
- Retrieve saved maps.
- Run sandboxed, read-only SQL over PostGIS.
- Enforce the caller’s existing GeoLens access scope.

The capability set is deliberately read-only. It is a fit for agents that need to answer questions about spatial data or inspect a catalog from a coding workflow, but not for automating edits, ingestion pipelines, or administration.

_Full upstream README: https://allmcps.com/mcp/geolens-io-geolens/readme_

