Connect Claude to TenantsDB
Give Claude secure access to your tenant databases. Ask questions, manage workspaces, query data, all in natural language.

Once connected, Claude can list your workspaces, read tenant schemas, run SQL queries against isolated tenant databases, search across tenants, deploy blueprints, and more. Claude never sees your password or API keys. Access is scoped to one project and can be revoked anytime.

This guide walks through Claude Desktop and Claude.ai specifically. TenantsDB's MCP server is standards-based, so any MCP-compatible client like Cursor, ChatGPT, or a custom app can connect using the same OAuth flow. See Build an Integration for the generic approach.

Before You Start
You need two things.
RequirementDetails
A TenantsDB account With at least one project. If you do not have one yet, sign up at app.tenantsdb.com.
Claude Desktop or Claude.ai Any recent version that supports MCP connectors. Download Claude Desktop from claude.ai/download.

Connect in 4 Steps
The entire flow takes about 30 seconds.
1
Open the connector settings in Claude

In Claude Desktop, open Settings → Connectors → Add custom connector. In Claude.ai web, open Settings → Integrations.

2
Add the TenantsDB server URL

Paste this URL in the connector field:

MCP Server URL
https://api.tenantsdb.com/mcp

Claude automatically discovers the OAuth endpoints using RFC 9728 metadata. No other configuration needed.

3
Approve access on the consent page

Claude opens your browser to the TenantsDB consent page. You will see the app requesting access (Claude), a project picker so you can choose which project Claude can access, and the permissions being requested (typically read and write). Click Allow to approve. If you are not logged in, you will be prompted first.

4
Start using Claude with TenantsDB

That is it. Go back to your Claude conversation and ask anything about your data:

Example prompts
"List my workspaces and how many tenants each has"

"Show me the schema of the users table in my orders workspace"

"How many orders did customer acme place in the last 7 days?"

"Create a new tenant called wayne_enterprises using the orders blueprint"

What Claude Can Do
Claude has 26 tools available for TenantsDB. Here are the main categories.
CategoryWhat Claude can do
Workspaces List workspaces, read schemas, create new workspaces, check schema diffs, run dev queries.
Tenants List tenants, create new ones, suspend, resume, inspect logs, view metrics, manage backups.
Data queries Run SQL against a specific tenant's isolated database, or query the same table across all tenants.
Search Keyword search and AI search across tenant data, with full tenant isolation.
Deployments Deploy blueprints to tenants, track deployment status.
Docs Search the TenantsDB documentation live. Claude can answer questions about TenantsDB itself.

For the complete list with input and output schemas, see the MCP Server Reference.


What Claude Cannot Do
Safety limits built into the MCP server.

Some operations are deliberately not exposed to Claude, even if you granted write or admin scopes. These are destructive or irreversible operations that should be performed through the dashboard or CLI: deleting workspaces or tenants, rolling back tenant data, point-in-time recovery, importing production data, managing API keys or billing, and managing projects (creating, renaming, deleting).

Claude can suggest these operations and prepare the commands, but you execute them yourself from the dashboard or CLI. This keeps destructive actions under your direct control.

Revoking Access
You can disconnect Claude anytime from the TenantsDB dashboard.

Open app.tenantsdb.com, click Connected Apps in the sidebar, find the Claude entry, click Revoke, and confirm.

All tokens held by Claude for that project are immediately invalidated. The next time Claude tries to use them, it will receive a 401 response and prompt you to reconnect.

Revoking access is per-project. If Claude is connected to multiple projects, each one needs to be revoked separately.

Troubleshooting
Common issues and fixes.
IssueFix
Consent page shows "Invalid redirect_uri" The Claude client registered with a redirect URI that does not match. Try removing the connector and adding it again. If the issue persists, use Claude Desktop instead of claude.ai web.
Claude says "authorization expired" Your refresh token has expired (30-day inactivity limit). Remove the connector in Claude and add it again to re-authenticate.
Tool calls return "insufficient scope" The scope you approved does not include the operation Claude is trying to perform. Revoke the connection, reconnect, and approve the required scope on the consent page.
Claude cannot see my tenants Make sure you selected the correct project on the consent page. OAuth tokens are scoped to one project at a time.