Isthmus

Created By
guillermoBallester3 months ago
A single binary MCP server that gives Claude, Cursor, and any MCP client safe, read-only access to your PostgreSQL database. Runs locally over stdio or HTTP — your credentials never leave your machine.
Overview

Isthmus

The MCP server for your database

CI Go Report Card Latest Release GitHub Stars Go Docker

Docs · Quickstart · Install · Issues


Isthmus is a local MCP server that gives AI models safe, read-only access to your PostgreSQL database. One binary, runs on your machine, credentials never leave.

Isthmus demo

Quick start

# 1. Install (pick one)
curl -fsSL https://isthmus.dev/install.sh | sh   # install script
docker pull guillermosasso/isthmus                # or Docker Hub

# 2. Add to your MCP client config (Claude Desktop example)
{
  "mcpServers": {
    "isthmus": {
      "command": "isthmus",
      "env": {
        "DATABASE_URL": "postgres://user:pass@localhost:5432/mydb"
      }
    }
  }
}
# 3. Ask your AI: "What tables are in my database?"

See the quickstart guide for step-by-step setup with Claude Desktop, Cursor, Windsurf, and more.

Docker

Images are published to Docker Hub on every release (linux/amd64 and linux/arm64).

docker run --rm \
  -e DATABASE_URL="postgres://user:pass@host.docker.internal:5432/mydb" \
  guillermosasso/isthmus

Or pin a specific version:

docker pull guillermosasso/isthmus:0.1.1

To use with Claude Desktop, point the MCP config at the container:

{
  "mcpServers": {
    "isthmus": {
      "command": "docker",
      "args": ["run", "--rm", "-i",
        "-e", "DATABASE_URL=postgres://user:pass@host.docker.internal:5432/mydb",
        "guillermosasso/isthmus"
      ]
    }
  }
}

Features

  • Schema discovery — explore schemas, tables, columns, foreign keys, and indexes (docs)
  • Read-only queries — execute SQL with server-side row limits and query timeouts (docs)
  • Column masking — protect PII with per-column redact, hash, partial, or null masks — enforced server-side (docs)
  • Policy engine — enrich your schema with business context so the AI writes better SQL (docs)
  • SQL validation — AST-level whitelist via pg_query parser — only SELECT and EXPLAIN allowed (docs)
  • HTTP transport — serve MCP over HTTP for web-based clients, ChatGPT Desktop, and remote access (docs)
  • OpenTelemetry — distributed tracing and metrics for query performance and error monitoring (docs)
  • Works with any MCP client — Claude Desktop, Cursor, Windsurf, Gemini CLI, VS Code, ChatGPT Desktop (client setup)

How it works

flowchart TB
    Claude["Claude Desktop"] & Cursor["Cursor / VS Code"] -->|stdio| STDIO
    ChatGPT["ChatGPT / Web"] -->|HTTP| HTTP

    subgraph Transport["Transport"]
        STDIO["stdio"]
        HTTP["HTTP + Auth"]
    end

    STDIO & HTTP --> Router

    subgraph Tools["MCP Tools"]
        Router{{"router"}}
        Router --> Discover["discover"]
        Router --> Describe["describe_table"]
        Router --> Query["query"]
    end

    Discover & Describe --> Explorer

    subgraph Schema["Schema Explorer"]
        Explorer["Catalog Introspection"]
        Explorer --> Policy["Policy Engine"]
    end

    Query --> Validate

    subgraph Security["Security Pipeline"]
        direction TB
        Validate["AST Validation"] --> ReadOnly["Read-Only Tx"]
        ReadOnly --> RowLimit["Row Limit"]
        RowLimit --> Timeout["Timeout"]
    end

    Security --> PG[("PostgreSQL")]
    Schema --> PG

    PG --> Mask

    subgraph Post["Post-Processing"]
        direction TB
        Mask["PII Masking"] --> Sanitize["Error Sanitization"]
    end

    Post -.-> Audit["Audit Log"]
    Post -.-> OTel["OpenTelemetry"]
    Post --> Response["Safe Response"]
    Response --> Claude & Cursor & ChatGPT

    classDef client fill:#e8f4f8,stroke:#2196F3,color:#1565C0
    classDef transport fill:#fff3e0,stroke:#FF9800,color:#E65100
    classDef tools fill:#e8eaf6,stroke:#3F51B5,color:#283593
    classDef security fill:#fce4ec,stroke:#E53935,color:#b71c1c
    classDef explorer fill:#e8f5e9,stroke:#4CAF50,color:#1B5E20
    classDef postproc fill:#f3e5f5,stroke:#9C27B0,color:#4A148C
    classDef db fill:#fff8e1,stroke:#FFC107,color:#F57F17
    classDef obs fill:#eceff1,stroke:#607D8B,color:#37474F
    classDef response fill:#e0f2f1,stroke:#009688,color:#004D40

    class Claude,Cursor,ChatGPT client
    class STDIO,HTTP transport
    class Router,Discover,Describe,Query tools
    class Validate,ReadOnly,RowLimit,Timeout security
    class Explorer,Policy explorer
    class Mask,Sanitize postproc
    class PG db
    class Audit,OTel obs
    class Response response

Isthmus sits between your AI client and your database. Every request flows through a security pipeline — SQL is validated at the AST level using PostgreSQL's own parser, queries run in read-only transactions with server-side row limits and timeouts, and PII columns are masked before results reach the AI. The policy engine enriches schema metadata with business context so the AI writes better SQL. All activity is recorded in an append-only audit log with optional OpenTelemetry tracing.

MCP tools

ToolWhat it does
list_schemasDiscover available database schemas
list_tablesTables with row counts, sizes, and descriptions
describe_tableColumns, types, keys, indexes, and statistics
profile_tableDeep analysis: sample rows, disk usage, inferred relationships
queryExecute read-only SQL, results as JSON
explain_queryPostgreSQL execution plans with optional ANALYZE

Full reference: isthmus.dev/tools/overview

Documentation

Visit isthmus.dev for the full documentation:

Contributing

See CONTRIBUTING.md. You'll need Go 1.25+ and Docker for integration tests.

make build        # Build binary
make test         # All tests (needs Docker)
make test-short   # Unit tests only
make lint         # Lint

License

Apache 2.0

Server Config

{
  "mcpServers": {
    "isthmus": {
      "command": "isthmus",
      "env": {
        "DATABASE_URL": "postgres://user:pass@localhost:5432/mydb"
      }
    }
  }
}
Project Info
Created At
3 months ago
Updated At
3 months ago
Author Name
guillermoBallester
Star
-
Language
-
License
-
Category

Recommend Servers

View All
Demand Chain - AI Agent native demand matching platform
@文明天梯

让你的Agent来跟全世界对接需求,你的AI助理帮你把需求传达出去,又帮你接受别人给你的需求。 需求链平台是将整个人类联结在一起的一个工具,组成一个网络。 告诉你的AI助理,你的需求,Agent会在需求链平台上寻找到能解决你需求的人。 别人也会将他的需求传达给你,你接受你能处理的需求,你也可以将这个需求拆分,变成数个小的需求,继续放在需求链上传递下去。 比如说你想要一种技术的创新,一个人工智能的新算法,或者是需要一种新材料,想要一种新的解决方案,去解决工作生活中的真实痛点。 你或许有一个天才的想法,需要有人与你一起去验证是否可行。 或者你已经有一套成功的技术,需要让全世界都知道你的方案。 总之每个人都有各种需求需要解决,而需求链平台,就是帮你解决各种需求而存在的机制。 赶快打开你的Agent,告诉他,你的需求吧。 此需求链平台是地球人类共有的基础设施,永久开源,中立,免费。 Let your Agent connect with demands from across the globe. Your AI assistant will forward your requests and receive demands from others for you. The Demand Chain Platform is a tool that unites all humanity into a connected network. Simply tell your AI assistant what you need, and your Agent will find people on the platform who can address your requirements. Others will also send their demands to you. You may take on tasks you are capable of handling, or split a single demand into several smaller ones to keep them circulating on the Demand Chain. For instance, you may seek technological innovation, a new AI algorithm, advanced new materials, or practical solutions to real problems in work and daily life. You might have a brilliant idea and need partners to verify its feasibility. Or you possess proven technologies and wish to share your solutions with the whole world. Everyone has various needs to fulfill, and the Demand Chain Platform is built precisely for this purpose. Launch your Agent and submit your demands right away. As a shared infrastructure for all people on Earth, this Demand Chain Platform is permanently open-source, neutral and free of charge.

a day ago
Sellerguide

11 hours ago
Sellerguide

11 hours ago