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
pip install clonesideOr with uv:
uv add cloneside2. Scan your database
Run a scan to verify connectivity and see which columns cloneside classifies as PII:
cloneside scan postgresql://user:pass@localhost:5432/mydbReplace 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):
[gateway]
target_url = "postgresql://user:pass@localhost:5432/mydb"
dialect = "postgresql"
license_key = "" # paste your license key here to unlock the query tool4. Add the MCP server to Claude Code
Option A — CLI (recommended):
claude mcp add cloneside -- cloneside mcpOption B — manual: add to .mcp.json in your project root:
{
"mcpServers": {
"cloneside": {
"command": "cloneside",
"args": ["mcp"]
}
}
}5. Verify the connection
Restart Claude Code. In the chat, type:
describe_table usersYou 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.