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
- repository
- github.com/contextflo/postgres-mcp
- 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)
Alternatives to Postgres (read-only)
Maintained database servers if Postgres (read-only) isn't the fit.
- Dbx Query databases from AI agents using connections configured in DBX. ★ 22,689 · 2026-09-30
- Toolbox for Databases MCP Toolbox for Databases enables your agent to connect to your database. ★ 16,541 · 2026-09-30
- Butterbase Ai MCP Server Butterbase MCP server - manage your backend: schemas, auth, functions, storage, RAG, deploys. ★ 3,683 · 2026-09-29
- Dbhub Token-efficient database MCP server for PostgreSQL, MySQL, MariaDB, SQL Server, Oracle, SQLite ★ 3,587 · 2026-09-28
- LINQ to DB Inspect database schemas and execute SQL queries across multiple database providers with LINQ to DB. ★ 3,331 · 2026-09-30
- Supabase MCP server for interacting with the Supabase platform ★ 2,926 · 2026-09-28
Pairs well with
Servers that cover what Postgres (read-only) doesn't - only shown when the pairing reason fits the companion.
- Server Chart → data & analytics companion data & analytics · ★ 4,388
- Keboola MCP Server → data & analytics companion data & analytics · ★ 86
- Server Filesystem → filesystem companion filesystem · ★ 39,168
- Pdf MCP → filesystem companion filesystem · ★ 145
- Telnyx → API integration companion API integration · ★ 197
- Microsoft 365 MCP Server → API integration companion API integration · ★ 1,002
More database MCP servers · Server Couchbase · SQL Server MCP · Ensembl MCP Server · Faa Aircraft Registry MCP Server · Faostat MCP Server
More TypeScript MCP servers · Orcareplay · Orca Router · basebalance.cloud - x402 RPC & MCP gateway · Calc MCP · Cookie MCP · see all