MCP guide · DB Gateway

@guardbee/mcp-db-gateway is a KVKK/GDPR-minded security layer between Claude (or any LLM) and your database. Sensitive fields are masked, table access is role-scoped, and every query is audited.
What does it do?
Use it whenever an AI agent needs product, order, or customer data without receiving raw PII. Requests go through the gateway instead of a direct DB connection.
Who is it for?
- Node.js / TypeScript teams on Prisma
- Teams wiring Claude Desktop or Cursor as an internal ops assistant
- Organizations that must not send raw customer data to an LLM
- SaaS teams demoing AI features on a safe dataset
What it is not
- Unlimited write/delete access to production databases
- Legal certification or VERBIS filings
- Replacing a network firewall
Features
| Feature | Description |
|---|---|
| PII masking | National IDs, IBANs, emails, phones, password hashes, and more |
| RBAC | Per-role table allow/deny lists and field rules |
| Rate limiting | Global and per-table request windows |
| Audit log | Console, file, or HTTP webhook sinks |
| Prisma adapter | Wrap an existing PrismaClient |
MCP tools
| Tool | Description |
|---|---|
Query / read tools | Safe reads inside configured roles |
Audit / status | Traceable record of requests |
Install with npm
Global install (handy for Claude Desktop / Cursor):
npm install -g @guardbee/mcp-db-gatewayor via npx (recommended with -y in config):
npx -y @guardbee/mcp-db-gatewayIn Prisma apps also install as a dependency: npm install @guardbee/mcp-db-gateway, then wire createServer + createPrismaAdapter.
Claude Desktop configuration
Config file paths:
- macOS
~/Library/Application Support/Claude/claude_desktop_config.json - Windows
%APPDATA%\Claude\claude_desktop_config.json - Linux
~/.config/Claude/claude_desktop_config.json
Merge this block, then restart Claude Desktop:
{
"mcpServers": {
"guardbee-db-gateway": {
"command": "guardbee-gateway",
"env": {
"DATABASE_URL": "postgresql://user:pass@localhost:5432/mydb"
}
}
}
}Cursor and other MCP clients
In Cursor, add the same command / args / env under Settings → MCP. stdio MCP servers use the same contract as Claude Desktop.
Example prompts in Claude
- “List the first 10 in-stock products — hide email fields”
- “As ai-agent, summarize only the products table”
- “Show a short audit log summary”
Related links
See surface risk with Guardbee
MCP servers speed up security work in chat. Start a 14-day free trial for brand scans and BeeAI.
Frequently asked questions
Can I install via Smithery?
Yes. DB Gateway is listed on Smithery for one-click Claude Desktop install.
Is it production-safe?
It reduces risk with RBAC, masking, and rate limits — still apply least privilege and restrict writes.
Which databases?
The Prisma adapter works with Prisma-supported sources; Claude config uses DATABASE_URL.