MCP Safe DB — Data skill for Claude Code
Zero-risk, strictly read-only SQL database inspector for AI agents (Claude, Antigravity, Cursor).
How to install MCP Safe DB
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open MrSkelee/mcp-safe-db and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What MCP Safe DB does
Zero-risk, strictly read-only SQL database inspector for AI agents (Claude, Antigravity, Cursor).
Alternatives in Data
- Private GPT — Complete API layer for private AI applications on local models: RAG, skills, tools, MCP, text-to-sql, and more 57.5k ★
- MCP Server Supabase — Supabase database and auth integration 2.6k ★
- Agentlytics — Comprehensive analytics dashboard for AI coding agents — Cursor, Windsurf, Claude Code, VS Code Copilot, Zed 473 ★
README
🛡️ mcp-safe-db
[](https://opensource.org/licenses/MIT) [](https://nodejs.org/) [](https://modelcontextprotocol.io/)
**Zero-risk, strictly read-only SQL database inspector for AI agents** (Claude Desktop, Antigravity, Cursor, Cline).
Let your AI explore schemas, inspect tables, and run `SELECT` queries without risking accidental `DROP`, `UPDATE`, or `DELETE`.
⚡ The Problem
Giving an AI assistant database access is risky:
- A hallucinated
UPDATEquery without aWHEREclause can wipe production or local dev data. - Semicolon injection (
SELECT 1; DROP TABLE users;) can execute hidden destructive actions. - Unbounded queries (
SELECT *) blow up context windows and burn API tokens.
**mcp-safe-db** solves this with a **Dual-Layer Defense**:
- Layer 1 (Parser Guard): Strict AST & regex validation blocks mutation keywords, multiple statements, and comment bypasses. High limits are capped to 50 rows automatically.
- Layer 2 (Engine Lock): SQLite engine is locked with
PRAGMA query_only = ON;. Even if a query bypasses parsing, the database engine physically rejects write operations.
🚀 Quickstart
Direct execution via `npx`
npx mcp-safe-db ./path/to/database.sqlite
🛠️ Configuration
1. Claude Desktop
Add to your `claude_desktop_config.json`:
{
"mcpServers": {
"safe-db": {
"command": "npx",
"args": ["-y", "mcp-safe-db", "/absolute/path/to/your/database.sqlite"]
}
}
}
2. Antigravity IDE / Cursor / Cline
Add to your `mcp_config.json`:
{
"mcpServers": {
"safe-db": {
"command": "npx",
"args": ["-y", "mcp-safe-db", "/absolute/path/to/your/database.sqlite"]
}
}
}
🧰 Available Tools for AI
| Tool | Description | S
Related Skills
Data Studio Agent
Open-source MCP server that gives AI coding agents secure database access via DocKit and SqlKit bridges — 70+
MCP Company Connectors
Secure MCP servers + gateway that connect Claude, ChatGPT, Cursor and other AI assistants to company systems (
Hutchdb
A database for AI agents. No schema, SQL, or structure required. Claude Code, Codex, Cursor, Hermes, Claw, Gro
MySQL
Safe read-only SQL queries against MySQL databases.
Mssql
Safe read-only SQL queries against Microsoft SQL Server databases.
DB LLM Skills
A globally-installed engine for letting an LLM access PostgreSQL safely: read-only role provisioning, a pg_cat
Related Agents
ReadOnly
Safe read-only codebase exploration with zero edits. Use to locate and understand code without any risk of mod
Data Migration Reviewer
Read-only database-migration reviewer for the forgeward gate. Fires when the diff adds or changes a schema mig
Migration Agent
Creates safe, reversible database migrations with proper indexes, constraints, and zero-downtime strategies. U