Postgres (read-only) MCP Server

The analytics MCP server for Postgres. Read-only by construction, with a context file you and the agent both write to, so the model answers the way your team would. Its 4 documented tools cover table, context. It runs locally over stdio via the published package.

People who work with table and context and want it reachable from Claude, Cursor, VS Code, or another MCP client. The project is written in TypeScript.

VERIFIED ACTIVE

LAST COMMIT 2026-09-28 · ★ 4 · #57 OF 174 MAINTAINED DATABASE · VERIFIED 2026-09-30

MIT · TypeScript servers · how we verify → /methodology

01 · Install Postgres (read-only)

before you install - you'll need

Set DATABASE_URL, TEST_DATABASE_URL before connecting.

Claude Code

claude mcp add contextflo-postgres-mcp -- npx -y @contextflo/postgres-mcp

Claude Desktop / Cursor / VS Code - add to config

{
  "mcpServers": {
    "contextflo-postgres-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@contextflo/postgres-mcp"
      ]
    }
  }
}

Same JSON for Cursor. For VS Code, rename the top-level key from `mcpServers` to `servers`.

Using another client? Same JSON, different key

Claude Desktop · mcpServers

Cursor · mcpServers

VS Code · servers

Windsurf · mcpServers

Zed · context_servers

Cline · mcpServers

Roo Code · mcpServers

Continue · mcpServers

LibreChat · mcpServers

Gemini CLI · mcpServers

Codex CLI · mcp_servers

Full setup guides: every client.

02 · Evidence

Security posture

What to check before giving this server access to your agent - from the registry, GitHub, and our own probes. We don't score safety; we show what's verifiable.

runs as local process (stdio) - runs on your machine with your user's permissions

repo age created 2026-09-26 - young repo, little track record yet

license MIT - declared in the repository

npm package @contextflo/postgres-mcp - published under the repo owner's npm scope (@contextflo)

registry namespace io.github.contextflo is GitHub-verified and matches the repo owner

03 · What Postgres (read-only) can do

Prose above is summarized from the project's README and registry record - no invented capabilities.

What you can build

With this server connected, an agent can run one read-only statement: SELECT, WITH ... SELECT, EXPLAIN, or SHOW, list readable tables with descriptions. pattern matches anywhere in the name or description, and describe tables: columns, types, keys, foreign key targets, enum values, curated descriptions.

Capability map

Tools grouped from the project's README - what Postgres (read-only) lets an agent do.

read & search

3 tools - e.g. Runs one read-only statement: SELECT, WITH ... SELECT, EXPLAIN, or SHOW.; Lists readable tables with descriptions. pattern matches anywhere in the name or description.; Describes tables: columns, types…

query · list_tables · get_table_context

create & write

1 tool - e.g. Lets the agent write down a gotcha it found (amount is in cents, status has an undocumented value) in the context file.

add_table_context

04 · Who maintains Postgres (read-only)

Postgres (read-only) is maintained by contextflo. It's the only MCP server we track from this author; the repo dates to Sep 2026.

05 · Facts

category
database - ranked #57 of 174 actively-maintained database servers as of 2026-09-30.
registry
io.github.contextflo/postgres-mcp (active, first published 2026-09-28 · 3 versions)
packages
npm:@contextflo/postgres-mcp

06 · Postgres (read-only) FAQ

Is Postgres (read-only) still maintained?

Yes - as of 2026-09-30, its last commit was 2026-09-28. We re-verify nightly.

What can Postgres (read-only) do?

With this server connected, an agent can run one read-only statement: SELECT, WITH ... SELECT, EXPLAIN, or SHOW, list readable tables with descriptions. pattern matches anywhere in the name or description, and describe tables: columns, types, keys, foreign key targets, enum values, curated descriptions.

How do I install Postgres (read-only)?

Run `npx -y @contextflo/postgres-mcp`. The README documents 2 environment variables (DATABASE_URL, TEST_DATABASE_URL) to set first. Set DATABASE_URL, TEST_DATABASE_URL before connecting. You can also paste the ready-made client config above.

Does Postgres (read-only) run locally?

Yes - it's a stdio server: it runs on your machine (via npx) with your user's permissions. Your data stays local unless the server itself calls external APIs.

07 · Alternatives to Postgres (read-only)