Claude Setup
Connect Claude to DBTrail in 5 minutes. The web interface serves MCP directly, with no config files



Step 0: generate a token
Settings → MCP Server → Access token → Generate token. Copy it: it is shown once. It grants the read-only MCP tools only, and anyone holding it can read your change history, row images included. Browser logins do not work for MCP clients.
Token gone after a restart?
The token's hash lives in a file. If the container does not keep that file,
clients get a 401 after every restart. Point it at persistent storage:
BINTRAIL_CONSOLE_MCP_TOKEN_FILE (CLI: --mcp-token-file on
bintrail-console serve, --console-mcp-token-file on watch). The shipped
compose file already does.
Step 1: copy your MCP URL
Shown on MCP Server, e.g. http://your-host:8090/mcp. /mcp is the
default server; /mcp/{name} targets one server. It only needs to be reachable
from the AI client's machine.
Step 2: connect your client
- Download the
.mcpbbundle for your machine from MCP Server or the releases page. - Double-click it.
- Enter the MCP URL and the access token.
Bundles are published for macOS and Linux. Elsewhere: the raw-config snippet on
MCP Server, or make mcpb from source.
Web interface on public HTTPS: claude.ai → Settings → Connectors → Add custom
connector, same /mcp URL. Not public: use Claude Desktop.
.mcp.json (Claude Code) or .cursor/mcp.json (Cursor); MCP Server has it
ready to copy:
{
"mcpServers": {
"dbtrail": {
"command": "bintrail-mcp",
"args": ["--connect", "http://your-host:8090/mcp", "--token", "YOUR_CONSOLE_TOKEN"]
}
}
}bintrail-mcp ships in the release archives, packages and Docker image. A bad
URL or token exits with a one-line error.
Step 3: ask something
"What's the status of my binlog index?"
"Someone fat-fingered an UPDATE on
usersaround 3pm. What did it change, and write me the SQL to undo it."
Examples: Using Claude. Every tool: Tools Reference.
When something doesn't work
| Symptom | Cause |
|---|---|
401 | Wrong token, or a port-forward to a stale process |
403 no token configured | No token on the web interface yet |
| Connection refused | URL not reachable from the client: curl http://host:8090/api/healthz from there |
Full table: troubleshooting. SQL clients use a different door: ProxySQL integration for Flashback.
Headless setups (no web interface)
Standalone bintrail-mcp reads the index DSN directly, over stdio or --http:
MCP server reference.