MrSkelee

MCP Safe DB — Data skill for Claude Code

Data community

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

[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT) [![Node.js 22+](https://img.shields.io/badge/Node.js-22%2B-green.svg)](https://nodejs.org/) [![Model Context Protocol](https://img.shields.io/badge/Protocol-MCP-purple.svg)](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 UPDATE query without a WHERE clause 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**:

  1. Layer 1 (Parser Guard): Strict AST & regex validation blocks mutation keywords, multiple statements, and comment bypasses. High limits are capped to 50 rows automatically.
  2. 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