This guide covers the full configuration for each supported AI client, including file paths, self-hosted setup, and optional pre-configuration of API tokens.Documentation Index
Fetch the complete documentation index at: https://docs.usedatabrain.com/llms.txt
Use this file to discover all available pages before exploring further.
Configuration by Client
- Cursor
- Claude Desktop
- Claude Code
- Windsurf
- Generic / stdio
Config File Location
- Project-level:
.cursor/mcp.jsonin your project root - Global:
~/.cursor/mcp.json
Configuration
Restart
After saving the config file, restart Cursor or reload the window (Cmd+Shift+P → “Reload Window”) to pick up the new MCP server.Self-Hosted Databrain
If you’re running a self-hosted Databrain instance, add theDATABRAIN_API_URL environment variable pointing to your API:
DATABRAIN_API_URL is not set, the server defaults to https://api.usedatabrain.com.
Pre-Configuring an API Token
By default, the MCP server creates API tokens automatically during embed setup via thecreate_api_token tool. If you prefer to provide one upfront (for example, to reuse an existing token), add it to the config:
The API token is scoped to a single data app. If you work with multiple data apps, let the MCP server create tokens on the fly instead.
Environment Variables Reference
| Variable | Required | Default | Description |
|---|---|---|---|
DATABRAIN_SERVICE_TOKEN | Yes | — | Org-level token from Settings → Service Tokens |
DATABRAIN_API_TOKEN | No | — | Per-data-app token (auto-created during setup if not provided) |
DATABRAIN_API_URL | No | https://api.usedatabrain.com | API base URL for self-hosted instances |
Verifying the Connection
After configuring your client, try asking your AI assistant:“List my Databrain datasources”If the server is configured correctly, you’ll see a list of your connected datasources. If you get a
MISSING_SERVICE_TOKEN error, double-check that the token is set in the env block of your config and restart your client.
See the Troubleshooting guide for more common issues and solutions.
