# GeoLens

Hooks your coding agent up to a GeoLens instance so it can list datasets, read schemas, features and maps, and run read-only SQL during a dev session.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed · ★ 281
- Author: geolens-io
- License: Apache-2.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/geolens-io/geolens/tree/HEAD/mcp
- Updated: 2026-10-24
- HTML: https://affpapa.org/en/nevibecode/mcp/geolens

## What it does

This is a Model Context Protocol server that points an agent at your own GeoLens deployment. From inside the session the agent can browse datasets, inspect their schemas, pull features and maps, and send read-only queries. There are no tools for writing, ingesting or admin work, and every call is limited to the caller's access.

Install it from PyPI with `pip install geolens-mcp`, or run it through `uvx geolens-mcp`. Configuration comes from the environment: `GEOLENS_INSTANCE`, plus `GEOLENS_API_KEY` when the data is not public. No instance variable means the server will not start, so set it in your client config first.

The tool list and credential rules live in the GeoLens MCP guide. To work on the server itself, run `uv run --extra dev python -m pytest -v` from the `mcp` directory.

## Requirements
- Needs: Python and uv (commands run via uvx)
- Environment variables: `GEOLENS_INSTANCE`, `GEOLENS_API_KEY`, `GEOLENS_TOKEN` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add geolens -e GEOLENS_INSTANCE=<GEOLENS_INSTANCE> -e GEOLENS_API_KEY=<GEOLENS_API_KEY> -e GEOLENS_TOKEN=<GEOLENS_TOKEN> -- uvx geolens-mcp
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from geolens-mcp <command>

### Codex

**Platform CLI**
```bash
codex mcp add mcp --env GEOLENS_INSTANCE=<GEOLENS_INSTANCE> --env GEOLENS_API_KEY=<GEOLENS_API_KEY> --env GEOLENS_TOKEN=<GEOLENS_TOKEN> -- uvx geolens-mcp
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from geolens-mcp <command>

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "mcp": {
            "command": "uvx",
            "args": [
                "geolens-mcp"
            ],
            "env": {
                "GEOLENS_INSTANCE": "<GEOLENS_INSTANCE>",
                "GEOLENS_API_KEY": "<GEOLENS_API_KEY>",
                "GEOLENS_TOKEN": "<GEOLENS_TOKEN>"
            }
        }
    }
}
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from geolens-mcp <command>

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "mcp": {
            "type": "stdio",
            "command": "uvx",
            "args": [
                "geolens-mcp"
            ],
            "env": {
                "GEOLENS_INSTANCE": "<GEOLENS_INSTANCE>",
                "GEOLENS_API_KEY": "<GEOLENS_API_KEY>",
                "GEOLENS_TOKEN": "<GEOLENS_TOKEN>"
            }
        }
    }
}
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from geolens-mcp <command>

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e GEOLENS_INSTANCE=<GEOLENS_INSTANCE> -e GEOLENS_API_KEY=<GEOLENS_API_KEY> -e GEOLENS_TOKEN=<GEOLENS_TOKEN> mcp uvx geolens-mcp
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from geolens-mcp <command>

## When to use it
- find the right dataset in a GeoLens catalog without leaving the editor
- check a layer schema before writing a query against it
- pull features and maps into the current dev session
- run read-only SQL over spatial data
- confirm the agent holds no write permissions

## Example prompts
- List every dataset in GeoLens with its schema
- Run a read-only query: how many features are in the `roads` layer
- Fetch the `city_center` map and list its layers

## Similar
- [World Monitor](https://affpapa.org/en/nevibecode/mcp/world-monitor.md) — MCP server · ★ 89408
- [Scrapling MCP Server](https://affpapa.org/en/nevibecode/mcp/scrapling-mcp-server.md) — MCP server · ★ 89433
- [MCP Toolbox for Databases](https://affpapa.org/en/nevibecode/mcp/googleapis-mcp-toolbox-for-databases.md) — MCP server · ★ 16717
- [PostHog MCP Server](https://affpapa.org/en/nevibecode/mcp/posthog-mcp-server.md) — MCP server · ★ 40409
- [dbx](https://affpapa.org/en/nevibecode/mcp/dbx.md) — MCP server · ★ 27669
- [Metabase](https://affpapa.org/en/nevibecode/mcp/metabase.md) — MCP server · ★ 49845

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
