PostgreSQL MCP Server (yawlabs)
One click adds this to your local Yaw MCP config so it's available in every Yaw Terminal session. Or install manually below. Its 23 documented tools cover table, tables, advisor.
People who work with table, tables and advisor 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-30 · ★ 6 · #12 OF 174 MAINTAINED DATABASE · VERIFIED 2026-09-30
MIT · TypeScript servers · how we verify → /methodology
01 · Install PostgreSQL MCP Server (yawlabs)
before you install - you'll need
Set DATABASE_URL, ALLOW_WRITES, POSTGRES_MCP_RUNTIME, POSTGRES_SSL_REJECT_UNAUTHORIZED, POSTGRES_AUDIT_LOG_FILE before connecting.
Claude Code
claude mcp add yawlabs-postgres-mcp -- npx -y @yawlabs/postgres-mcp Claude Desktop / Cursor / VS Code - add to config
{
"mcpServers": {
"yawlabs-postgres-mcp": {
"command": "npx",
"args": [
"-y",
"@yawlabs/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
license MIT - declared in the repository
npm package @yawlabs/postgres-mcp - published under the repo owner's npm scope (@yawlabs)
registry namespace io.github.YawLabs is GitHub-verified and matches the repo owner
03 · What PostgreSQL MCP Server (yawlabs) 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 list non-system schemas, list tables (and optionally views) in a schema with estimated row counts. Paginated via limit/offset, list views and materialized views in a schema, including their SQL definitions, and list functions, procedures, and aggregates in a schema with signatures and return types.
Capability map
Tools grouped from the project's README - what PostgreSQL MCP Server (yawlabs) lets an agent do.
Table
3 tools - e.g. Kind, columns, PK, outgoing FKs, incoming FKs (referenced_by), CHECK / UNIQUE / EXCLUDE constraints, indexes, and partition parent/children for a relation. Gene; Who has SELECT/INSERT/UPDATE/DELETE/etc.…
pg_describe_table · pg_table_privileges · pg_table_bloat
Readonly
1 tool - e.g. Run a SQL statement with no persistent data changes - always inside BEGIN READ ONLY, regardless of ALLOW_WRITES. The recommended tool for read access, and the o
pg_readonly
other
1 tool - e.g. Run a SQL query. Writes gated by the role in DATABASE_URL first, ALLOW_WRITES second. Supports parameterized queries via params. Result fields include dataTypeN
pg_query
Schemas
1 tool - e.g. List non-system schemas.
pg_list_schemas
Tables
1 tool - e.g. List tables (and optionally views) in a schema with estimated row counts. Paginated via limit/offset.
pg_list_tables
Views
1 tool - e.g. List views and materialized views in a schema, including their SQL definitions.
pg_list_views
Functions
1 tool - e.g. List functions, procedures, and aggregates in a schema with signatures and return types.
pg_list_functions
Extensions
1 tool - e.g. List installed extensions (pgvector, postgis, pg_stat_statements, etc.) with versions.
pg_list_extensions
Latest releases
v0.13.7 · 2026-09-29
Fixed · release.sh reads npm's per-version document and retries the MCP Registry · publish. Every "is x.y.z on npm?" check -- the step-5 skip, the CI hand-off · poll, the npm propagation wait and the step-8 verify…
v0.13.6 · 2026-09-23
Changed · reject directory paths at startup on Windows (#61)
v0.13.5 · 2026-09-23
Fixed · Agent SQL that never ran now leaves an audit line (#42). Whether a call · that failed before its statement was sent wrote a line depended on which · helper it went through. runInternal connects inside its…
04 · Who maintains PostgreSQL MCP Server (yawlabs)
PostgreSQL MCP Server is maintained by yawlabs. We track 12 MCP servers from yawlabs - 12 actively maintained, 80 combined GitHub stars, oldest repo from Apr 2026. Full record: all servers from yawlabs.
- ctxlint Lint AI agent context files (CLAUDE.md, AGENTS.md, etc.) against your actual codebase ★ 9
- Tailscale MCP Server Tailscale MCP server for managing your tailnet from AI assistants ★ 30
- Caddy MCP Server MCP server for managing Caddy web servers via the admin API ★ 11
- Yaw Labs AWS MCP AWS MCP server - call any AWS API from AI assistants, with first-class SSO re-login ★ 5
- MCP Compliance CLI tool and MCP server that tests MCP servers for spec compliance ★ 2
- Fetch MCP Server HTTP fetch MCP server: SSRF protection, HTML-to-markdown, reader mode, metadata extraction ★ 2
05 · Facts
- repository
- github.com/yawlabs/postgres-mcp
- category
- database - ranked #12 of 174 actively-maintained database servers as of 2026-09-30.
- release cadence
- 10+ releases in the last 90 days (latest 2026-09-29)
- registry
- io.github.YawLabs/postgres-mcp (active, first published 2026-05-15 · 35 versions)
- packages
- npm:@yawlabs/postgres-mcp
06 · PostgreSQL MCP Server (yawlabs) FAQ
Is PostgreSQL MCP Server (yawlabs) still maintained?
Yes - as of 2026-09-30, its last commit was 2026-09-30 and it shipped 10+ releases in the last 90 days. We re-verify nightly.
What can PostgreSQL MCP Server (yawlabs) do?
With this server connected, an agent can list non-system schemas, list tables (and optionally views) in a schema with estimated row counts. Paginated via limit/offset, list views and materialized views in a schema, including their SQL definitions, and list functions, procedures, and aggregates in a schema with signatures and return types.
How do I install PostgreSQL MCP Server (yawlabs)?
Run `npx -y @yawlabs/postgres-mcp`. The README documents 5 environment variables (DATABASE_URL, ALLOW_WRITES, POSTGRES_MCP_RUNTIME…) to set first. Set DATABASE_URL, ALLOW_WRITES, POSTGRES_MCP_RUNTIME, POSTGRES_SSL_REJECT_UNAUTHORIZED, POSTGRES_AUDIT_LOG_FILE before connecting. You can also paste the ready-made client config above.
Does PostgreSQL MCP Server (yawlabs) 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 PostgreSQL MCP Server (yawlabs)
Alternatives to PostgreSQL MCP Server (yawlabs)
Maintained database servers if PostgreSQL MCP Server (yawlabs) 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 PostgreSQL MCP Server (yawlabs) 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 · Redis MCP Server · DB Connect MCP · Tgms · Open MCP Apps · A2db
More TypeScript MCP servers · SSH MCP Server (yawlabs) · Tailscale MCP Server · Thebrain · 1c Platform Tools · see all