Claude Code quickstart

Connect cloneside to Claude Code so the AI can query your database safely — with a read-only firewall, 500-row cap, and PII classification, all without exposing your connection string through the AI interface.

Prerequisites

  • Python 3.12 or later
  • A PostgreSQL, MySQL, or SQL Server database you can reach locally
  • Claude Code installed

1. Install cloneside

bash
pip install cloneside

Or with uv:

bash
uv add cloneside

2. Scan your database

Run a scan to verify connectivity and see which columns cloneside classifies as PII:

bash
cloneside scan postgresql://user:pass@localhost:5432/mydb

Replace the URL with your actual connection string. cloneside reads schema metadata only — no rows are stored or uploaded.

3. Create cloneside.toml

Create cloneside.toml in your project root (or ~/.cloneside.toml for a global config):

toml
[gateway]
target_url = "postgresql://user:pass@localhost:5432/mydb"
dialect     = "postgresql"
license_key = ""          # paste your license key here to unlock the query tool

4. Add the MCP server to Claude Code

Option A — CLI (recommended):

bash
claude mcp add cloneside -- cloneside mcp

Option B — manual: add to .mcp.json in your project root:

json
{
  "mcpServers": {
    "cloneside": {
      "command": "cloneside",
      "args": ["mcp"]
    }
  }
}

5. Verify the connection

Restart Claude Code. In the chat, type:

text
describe_table users

You should see column names, types, and PII classifications. The query tool appears automatically once you add a valid license_key.

Need a license key? Create an account and subscribe to the Gateway plan. Your key appears in the dashboard under Settings.