Schemabrain
@Arun-kc
About Schemabrain
A read-only trust + intelligence layer between AI agents and your database — the agent never writes SQL, PII is refused before the query runs, and every call lands in a tamper-evident audit log. Postgres today.
Basic information
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"schemabrain": {
"command": "uvx",
"args": [
"schemabrain",
"serve",
"--url-env",
"DATABASE_URL"
],
"env": {
"DATABASE_URL": "postgresql://user:password@localhost:5432/dbname"
}
}
}
}Tools
No tools detected
We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.
Overview
What is Schemabrain?
Schemabrain is an MCP server that acts as a read-only trust and intelligence layer between AI agents (Claude, Cursor, Windsurf) and your SQL database. It compiles SQL from definitions you control and refuses queries touching blocked categories before the database is queried.
How to use Schemabrain?
Install Schemabrain using the uvx package manager. It sits between an AI agent and a Postgres database. Twelve read-only MCP tools are available; the agent never writes SQL directly.
Key features of Schemabrain
- Read-only architecture — 12 MCP tools, none can write.
- PII-aware refusal — blocked-category queries are rejected before hitting the database.
- Tamper-evident audit — SHA-256‑chained append‑only log of every call, refusal, and recovery.
- Postgres support today; Apache‑2.0 licensed.
- Simple installation via
uvx.
Use cases of Schemabrain
- Letting AI agents query a production database without risk of writes.
- Preventing accidental or malicious PII extraction from the database.
- Maintaining an immutable, verifiable audit trail of all agent queries.
- Enforcing data-access policies through category-based refusal rules.
FAQ from Schemabrain
Is Schemabrain read-only?
Yes. All 12 MCP tools are read-only by architecture. The agent never writes SQL; SchemaBrain compiles SQL from definitions you control.
How does Schemabrain handle PII?
It maintains a set of blocked categories. Any query touching a blocked category is refused before the database is queried.
What database does Schemabrain support?
Currently only Postgres.
Is there an audit log?
Yes. Every call, refusal, and recovery is recorded in a SHA-256-chained append-only log that is tamper-evident.
How do I install Schemabrain?
Install using uvx.
More Databases MCP servers
Sail MCP Server for Spark SQL
lakehqDrop-in Apache Spark replacement written in Rust, unifying batch processing, stream processing, and compute-intensive AI workloads.
Postgres Mcp
crystaldbaPostgres MCP Pro provides configurable read/write access and performance analysis for you and your AI agents.
PostgreSQL Model Context Protocol (PG-MCP) Server
stuzeroClickHouse MCP Server
ClickHouseConnect ClickHouse to your AI assistants.

PostgreSQL
modelcontextprotocolModel Context Protocol Servers
Comments