Mcpg
A production-grade Model Context Protocol server for PostgreSQL. It lets AI agents safely inspect, query, operate, and tune a Postgres database - 254 tools spanning catalog introspection, query intelligence, natural-language SQL, structural diffs, hybrid search, graph queries, data movement, live ops, and more. It runs locally over stdio via the published package.
People who work with database, pgvector and postgres and want it reachable from Claude, Cursor, VS Code, or another MCP client. The project is written in Python.
VERIFIED ACTIVE
LAST COMMIT 2026-09-14 · ★ 10 · #42 OF 168 MAINTAINED DATABASE · VERIFIED 2026-09-18
MIT · Python servers · how we verify → /methodology
01 · Install Mcpg
before you install - you'll need
Set MCPG_HTTP_PORT, MCPG_ACCESS_MODE before connecting. MCPG_DATABASE_URL, MCPG_TRANSPORT are optional or environment-specific per the README.
Claude Code
claude mcp add devopam-mcpg -- uvx mcpg Claude Desktop / Cursor / VS Code - add to config
{
"mcpServers": {
"devopam-mcpg": {
"command": "uvx",
"args": [
"mcpg"
]
}
}
} 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
pypi package mcpg - check the name against the project README before installing (PyPI has no namespace ownership)
registry namespace io.github.devopam is GitHub-verified and matches the repo owner
03 · What Mcpg can do
Prose above is summarized from the project's README and registry record - no invented capabilities.
Latest releases
v0.8.2 · 2026-09-04
Added · mcpg.identifiers - one escape-based SQL identifier quoter (quote_identifier / ensure_identifier). · It doubles embedded double quotes (" → "") so any name PostgreSQL accepts as a delimited · identifier can be…
v0.8.1 · 2026-09-01
Added · Dev dependencies: pytest-mock, pytest-randomly, pytest-socket, time-machine, · pytest-rerunfailures. Of these, only pytest-randomly is active today - it auto-enables and · randomizes test order by default. The…
v0.8.0 · 2026-08-19
Security · Release SBOM + build provenance, and a CODEOWNERS file. Cutting a · release now generates a CycloneDX SBOM (cyclonedx-bom, new dev dep) · for the runtime dependencies and attaches it to the GitHub release…
04 · Who maintains Mcpg
mcpg is maintained by devopam. It's the only MCP server we track from this author; the repo dates to May 2026.
05 · Facts
- repository
- github.com/devopam/mcpg
- website
- https://devopam.github.io/MCPg/
- category
- database - ranked #42 of 168 actively-maintained database servers as of 2026-09-18.
- release cadence
- 10+ releases in the last 90 days (latest 2026-09-04)
- registry
- io.github.devopam/mcpg (active, first published 2026-06-09 · 13 versions)
- packages
- pypi:mcpg
06 · Mcpg FAQ
What is Mcpg?
A production-grade Model Context Protocol server for PostgreSQL. It lets AI agents safely inspect, query, operate, and tune a Postgres database - 254 tools spanning catalog introspection, query intelligence, natural-language SQL, structural diffs, hybrid search, graph queries, data movement, live ops, and more. It runs locally over stdio via the published package.
Is Mcpg still maintained?
Yes - as of 2026-09-18, its last commit was 2026-09-14 and it shipped 10+ releases in the last 90 days. We re-verify nightly.
How do I install Mcpg?
Run `uvx mcpg`. The README documents 4 environment variables (MCPG_DATABASE_URL, MCPG_TRANSPORT, MCPG_HTTP_PORT…) to set first. Set MCPG_HTTP_PORT, MCPG_ACCESS_MODE before connecting. MCPG_DATABASE_URL, MCPG_TRANSPORT are optional or environment-specific per the README. You can also paste the ready-made client config above.
Does Mcpg run locally?
Yes - it's a stdio server: it runs on your machine (via uvx) with your user's permissions. Your data stays local unless the server itself calls external APIs.
07 · Alternatives to Mcpg
Alternatives to Mcpg
Maintained database servers if Mcpg isn't the fit.
- Dbx Query databases from AI agents using connections configured in DBX. ★ 20,017 · 2026-09-18
- Toolbox for Databases MCP Toolbox for Databases enables your agent to connect to your database. ★ 16,449 · 2026-09-18
- Butterbase Ai MCP Server Butterbase MCP server - manage your backend: schemas, auth, functions, storage, RAG, deploys. ★ 3,562 · 2026-09-18
- Dbhub Minimal, token-efficient Database MCP Server for PostgreSQL, MySQL, SQL Server, SQLite, MariaDB ★ 3,534 · 2026-09-18
- LINQ to DB Inspect database schemas and execute SQL queries across multiple database providers with LINQ to DB. ★ 3,328 · 2026-09-17
- Supabase MCP server for interacting with the Supabase platform ★ 2,910 · 2026-09-17
Pairs well with
Servers that cover what Mcpg doesn't - only shown when the pairing reason fits the companion.
- Server Chart → data & analytics companion data & analytics · ★ 4,367
- ClaudeR - RStudio MCP Server → data & analytics companion data & analytics · ★ 342
- Server Filesystem → filesystem companion filesystem · ★ 39,038
- Pdf MCP → filesystem companion filesystem · ★ 135
- Telnyx → API integration companion API integration · ★ 197
- Microsoft 365 MCP Server → API integration companion API integration · ★ 980
More database MCP servers · ClickHouse · Open Food Facts · Postgres MCP · Metabase AI Assistant · Sql Server Rules
More Python MCP servers · ASD-STE100 Simplified Technical English · Homebox MCP · Chain Weaver · Contextweaver (dgenio) · Edgar Tools · see all