MCP Warehouse Server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP Warehouse Serverwhat are the top 5 providers by total claims amount?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Warehouse Server
An MCP server that gives AI agents governed access to a Postgres data warehouse — not a free-for-all SQL tool. Every request is policy-checked, row-capped, and audited.
Why
The default pattern for "let an agent query my database" is to hand it a SQL tool and hope the prompt holds. That fails on the things data teams actually care about: PII exposure, runaway queries, and no record of who asked what.
This server takes the opposite approach: the agent gets a narrow, discoverable interface, and enforcement lives in the database, not the prompt.
Related MCP server: pgguard-mcp
Tools
Tool | Purpose |
| Discover queryable tables and row counts |
| Column names and types for one allowed table |
| Run a validated, row-capped read-only SELECT |
| Read back the trail of what was asked and whether it was allowed |
Defence in depth
Three independent layers, so no single failure leaks data:
Database grants — the
mcp_agentrole hasSELECTonanalyticsonly. It has no grant at all on therawschema that holds SSN and date of birth. Even a perfectly crafted injection getspermission denied for schema raw.Policy layer (
policy.py) — single statement only,SELECT/WITHonly, keyword blocklist, table allow-list, automaticLIMITinjection.Session guards (
db.py) — every query runs in aREAD ONLYtransaction with astatement_timeout.
Known limitation: the policy layer is regex-based, not a real SQL parser.
It is a filter, not a guarantee. The security guarantee comes from layer 1.
A production version would use a parser (e.g. sqlglot) and per-caller identity
from the transport's auth context instead of a hardcoded caller.
Audit trail
Every tool call writes to governance.query_audit: timestamp, caller, tool,
the exact SQL executed, allow/deny, deny reason, rows returned, duration.
Data model
raw.members— PII. Never reachable by the agent.analytics.dim_member,dim_provider,fct_claims— the agent-safe star schema.governance.query_audit— the log.
Synthetic healthcare claims data (200 members, 40 providers, 3000 claims).
Setup
python3.12 -m venv venv && source venv/bin/activate
pip install "mcp[cli]" "psycopg[binary]" python-dotenv
createdb warehouse
psql -d warehouse -f sql/schema.sql
psql -d warehouse -f sql/roles.sql # change the password first
psql -d warehouse -f sql/seed.sql
cp .env.example .env # set your DSNTest locally:
npx @modelcontextprotocol/inspector ./venv/bin/python server.pyOr add to claude_desktop_config.json:
{
"mcpServers": {
"warehouse": {
"command": "/absolute/path/venv/bin/python",
"args": ["/absolute/path/server.py"]
}
}
}Stack
Python 3.12, MCP Python SDK 2.x (MCPServer), Postgres 17, psycopg 3.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
No tool schema history has been recorded yet.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Safe, read-only Postgres and MySQL access for AI agents. Audit log + column-level controls.
Query 40 databases from Claude, ChatGPT, or Cursor — on any device. Read-only, encrypted, audited.
Deterministic safety, correctness & cost gate that vets Postgres SQL before your AI agent runs it.
Query PostgreSQL databases in plain English — LLM-generated, safety-validated SQL.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceConnects AI assistants to PostgreSQL databases with production-grade safety features including query validation, guarded writes, rate limiting, and audit logging.3MIT
- AlicenseAqualityBmaintenanceRead-only Postgres access with a policy gate that blocks writes and restricts visible tables and columns.66MIT
- AlicenseNot gradedqualityBmaintenanceProvides read-only access to PostgreSQL databases via MCP, enforcing least-privilege roles, row-level security, masked views, and SQL AST guardrails to prevent data leakage and unauthorized operations, enabling AI agents to safely query sensitive production data.MIT

MCP DB Gatewayofficial
AlicenseNot gradedqualityBmaintenanceProvides governed, read-only PostgreSQL access for AI agents via MCP. Enforces schema/table allowlists, query limits, and audit events.MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/kiranranganalli/mcp-warehouse-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server