Configuration by Client
- Codex
- Cursor
- Claude Desktop
- Claude Code
- Windsurf
- Generic / stdio
Self-Hosted Databrain
If you’re running a self-hosted Databrain instance, setDATABRAIN_API_URL to the API origin for that instance.
DATABRAIN_API_URLmust be the API origin, not the dashboard URL.- The token must be minted from that same self-hosted instance. Tokens are not portable across instances.
- The MCP client process must be able to reach the URL through your VPN, firewall, or certificate setup.
- Set
DATABRAIN_DEMO_DOMAINifget_demo_linkshould use a custom preview host.
API-Token-Only Mode
By default, use a service token. It lets the MCP server discover resources, manage data apps, create API tokens, and run semantic-layer workflows. If you only need operations inside one existing data app, you can configure an API token instead:API-token-only mode is scoped to one data app. It supports embed, guest token, widget, demo link, and scheduled report metadata operations, but org-level discovery and setup tools require
DATABRAIN_SERVICE_TOKEN.Environment Variables Reference
At least one of
DATABRAIN_SERVICE_TOKEN or DATABRAIN_API_TOKEN must be set. If both are set, service-token mode is used for org-level operations.
Verifying the Connection
After configuring your client, try asking your AI assistant:“Who am I authenticated as in Databrain?”This calls
whoami and confirms whether the server is running in service-token or API-token mode.
Then ask:
“List my Databrain data apps”If you get a missing-token configuration error, double-check that the token is set in the
env block of your MCP config and restart your client.
See the Troubleshooting guide for common issues and solutions.
