SchemaBrain vs Anthropic Reference Postgres MCP Server
One-line: the Anthropic-published reference Postgres MCP server is where most developers start. It’s a 143-line
index.ts that ships one tool that accepts arbitrary SQL. Anthropic archived it on May 29, 2025 — but it remains the default mental model. SchemaBrain is what you graduate to.modelcontextprotocol/servers-archived repo and started wiring it into Claude Desktop, this page is for you. The reference does exactly enough to demonstrate MCP works against a database. It is not a production posture.
Quick verdict
- Just starting with MCP + Postgres
- Already wired the reference
- Want the technical depth
Skip the reference. The Anthropic Postgres MCP was a demo, not a posture — it ships one tool that accepts arbitrary SQL, has no PII awareness, and no audit log. It was archived May 29, 2025. SchemaBrain is the production replacement: 12 typed tools, PII refusal by default, hash-chained audit.
The full comparison
30-second version
| Anthropic reference Postgres MCP | SchemaBrain | |
|---|---|---|
| Status | Archived May 29, 2025 (the repo is read-only) | Active, v0.6.0 (pre-1.0) |
| MCP tools | 1 (query, accepts arbitrary SQL string) | 12 (typed structured-argument; none accept SQL) |
| Read-only enforcement | BEGIN TRANSACTION READ ONLY + ROLLBACK (one layer) | No write tool exists + session-level default_transaction_read_only=on + NullPool (three layers) |
| PII handling | None | 12-category taxonomy with compiler-layer propagation |
| Audit log | None | Append-only SQLite with SHA256 chain (audit verify) |
| Refusal shape | Generic MCP error | Typed recovery contract (kind, recovery.suggested_tool, recovery.suggested_args) |
| Trust signal | None | 2D: inference_method × validation_state (Charter v1.2) |
| Semantic layer | None — agent does all SQL writing | Entities, metrics, canonical joins compiled at the server |
| Wire transport | stdio | stdio (HTTPS on the roadmap) |
| License | MIT, archived | Apache-2.0, active |
What the reference actually ships
The entire safety story is two lines of TypeScript:Where the reference is enough
Be honest — there are situations where the reference is the right tool:- You’re learning MCP itself. 143 lines you can read in five minutes is a teaching artifact.
- The database is throwaway (a local fixture, a CI test container, an evaluation harness). No PII, no compliance, no production exposure.
- You’re building your own MCP server and want a reference for transport plumbing and tool registration.
Where SchemaBrain is what you graduate to
For everything else — any database you’d be sad to leak from, any agent loop that might run unattended, any compliance obligation — the gaps in the reference become load-bearing.1. The reference accepts arbitrary SQL
The reference’squery tool takes a SQL string. The agent’s LLM writes that string. SchemaBrain’s 12 tools are structured-argument calls:
2. The reference has no PII model
If yourusers table has an email column, the reference happily returns it. The agent’s prompt determines whether that’s appropriate.
SchemaBrain tags every column at index time with one or more of 12 categories grounded in GDPR / CCPA / HIPAA / PCI DSS. The metric compiler propagates those tags through JOIN ON pairs, group_by columns, filter predicates, measure columns (including composite expressions), and time-dimension columns. A get_metric whose path touches a blocked category refuses before the database is queried. Three catastrophic-leak categories (credential, payment_card, government_id) are blocked by default on a zero-config install.
3. The reference has no audit log
The reference doesn’t record what the agent asked for. SchemaBrain’s audit chain records every tool call in an append-onlymcp_audit table with a SHA256 hash chain. schemabrain audit verify re-walks the chain and exits non-zero if any past row was rewritten. Two SQL triggers forbid UPDATE/DELETE at the SQLite layer.
If your security review asks “can you prove what the agent saw three weeks ago?”, the reference says no and SchemaBrain says yes (exit 0 from audit verify).
4. The reference has no recovery contract
The reference returns generic MCP errors. SchemaBrain returns typed recovery envelopes:recovery.suggested_tool, pivots to the right tool, retries. The closed ErrorKind Literal has 26 values an agent can switch on programmatically rather than parsing English error messages.
5. The reference has no trust signal
If a metric definition was hand-typed by you, or LLM-suggested duringinit, or FK-derived from a constraint — the reference can’t tell. Every result is “trust this” or “the query failed.”
SchemaBrain’s 2D trust signal labels every fact with inference_method (manually_authored | llm_suggested | fk_constraint | dbt_import | observed_in_query_log) and validation_state (draft | applied | confirmed). The agent can branch on either axis. An LLM-suggested metric the operator never confirmed comes back with confidence: MEDIUM; the well-behaved agent flags that to the user. The FK-derived join comes back confidence: HIGH; the agent writes the answer confidently.
”But the reference is archived”
Yes — Anthropic archivedservers-archived/src/postgres on May 29, 2025. That doesn’t mean it’s been replaced by an official equivalent; it means Anthropic stopped maintaining it without naming a successor. The reference still runs and still works for the use cases it was meant for. But there’s no upgrade path within Anthropic’s own surface area.
Several projects fill the gap — SchemaBrain is one of them, alongside community-maintained Postgres MCP servers from teams like Supabase, Neon, and crystaldba/postgres-mcp. We’re explicit about our shape (firewall + semantic layer + audit), our scope (Postgres only today; MySQL and SQLite on the roadmap), and our trade-offs (local-first, no hosted gateway).
Pick the reference if
- You’re learning MCP and want a teaching artifact
- The database is throwaway / fixture / eval-only
- You’re building your own MCP server and want plumbing reference
Pick SchemaBrain if
- The agent’s queries hit real data
- Any column matters (PII, financial, health, credential)
- You need an audit trail you can defend in a review
- You want a semantic layer instead of “agent writes raw SQL”
- “No write tool in the binary” is a meaningful guarantee for your threat model
Sources & further reading
- Reference repo: github.com/modelcontextprotocol/servers-archived/tree/main/src/postgres
- SchemaBrain’s mechanism docs:
/mechanism/read-only·/mechanism/pii-taxonomy·/mechanism/audit-chain·/mechanism/structured-recovery·/mechanism/trust-signal - Compare with the other live alternative: vs Querybear
- Try SchemaBrain in 60 seconds:
/setup/claude-desktop·/setup/cursor·/setup/windsurf·/setup/claude-code