Skip to main content
This guide covers full configuration for each supported AI client, including file paths, restart steps, self-hosted setup, and optional API-token-only configuration.

Configuration by Client

Add via CLI

Replace YOUR_SERVICE_TOKEN with your Databrain service token.

Self-Hosted

For a self-hosted Databrain instance, include the API URL:

Verify

Start a new Codex session after adding or updating the server.

Self-Hosted Databrain

If you’re running a self-hosted Databrain instance, set DATABRAIN_API_URL to the API origin for that instance.
Checklist:
  • DATABRAIN_API_URL must 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_DOMAIN if get_demo_link should 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.
You can also provide both tokens:

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.