πŸ”’

Checking access…

← Go to app
← Back to app
Admin Guide
NetRefer Data MCP Β· NetRefer Admin

Admin access requires a @netrefer.com email address. All admin UI is under the Admin tab in the platform.


Environment variables

VariableRequiredDescription
DATABRICKS_SERVER_HOSTNAMEYesDatabricks SQL warehouse hostname
DATABRICKS_HTTP_PATHYesDatabricks warehouse HTTP path
DATABRICKS_TOKENYesDatabricks personal access token
B2C_CLIENT_IDYesAzure B2C application (client) ID
B2C_TENANT_HOSTYesB2C login hostname (e.g. example.b2clogin.com)
B2C_TENANT_NAMEYesB2C tenant name
B2C_POLICYYesB2C user flow policy name
B2C_REDIRECT_URIYesOAuth redirect URI for the SPA
ANTHROPIC_API_KEYNoCan be set here or via the AI settings UI
CONFIG_ENCRYPTION_KEYNoFernet key for encrypting stored secrets at rest. Generate: python -c "from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())"
SQL_CONNECTION_STRINGNoSQL Server connection string. Falls back to local JSON file if unset.
CORS_ALLOW_ORIGINSNoComma-separated allowed origins. Default: http://localhost:6274
PORTNoService port. Default: 8000

Table configuration

Adding tables

Tables in the Databricks gold_data schema with the ds_ prefix load automatically. To add tables from other schemas:

  1. Go to Admin > Tables > Explore layers to browse available schemas.
  2. Find the table you want to add.
  3. Click Add to platform.

Column configuration

For each table you can configure:

  • Enabled columns β€” control which columns the AI uses. Disable PII or irrelevant columns.
  • Column descriptions β€” plain-English descriptions. Click Auto-describe to generate with AI, then review and save.
  • Aliases β€” map a column name to a business-friendly alias (e.g. subscriber_guid β†’ client).
  • Cast overrides β€” override the data type shown to the AI.

Table descriptions

Add a plain-English description for each table. Click Auto-describe table to generate one, or write it manually.

Schema refresh

The schema is cached for 30 minutes. To force a refresh after adding a new column to Databricks, go to Admin > Schema > Refresh.


Glossary

The glossary maps business terms to SQL terms. The AI uses this when generating queries.

Examples:

  • revenue β†’ sum(deposit_amount - withdrawal_amount)
  • active player β†’ player who made a deposit or withdrawal in the last 30 days
  • FTD β†’ first time depositor

Go to Admin > Glossary to add, edit, or delete terms. Click Recommend to have the AI suggest terms based on your table schemas.


Query examples

Verified examples show the AI exactly how to write certain queries (few-shot prompting).

To add an example: ask a question in chat, get a correct result, then click Save as example.

To manage examples: go to Admin > Query examples. Click Compact to merge similar examples and reduce prompt size.


AI model settings

Go to Admin > AI settings to configure:

  • Provider β€” Anthropic (default) or OpenAI
  • Model β€” which model to use for NLβ†’SQL generation
  • API key β€” enter here or set ANTHROPIC_API_KEY / OPENAI_API_KEY env var

Changes take effect immediately β€” no restart required.


Tool permissions

Go to Admin > Tool permissions to enable or disable individual tools per integration. For example, you can enable Confluence search but disable the Atlassian tool that creates Jira tickets.


Failed queries

The platform logs queries the user flagged as incorrect or that returned errors. Go to Admin > Failed queries to:

  • Review β€” see the question, the SQL generated, and the error or user feedback.
  • Correct β€” write the correct SQL. This automatically adds it as a query example.
  • Dismiss β€” mark as not actionable.
  • Generate training questions β€” create test questions from current table schemas.

Integration setup

Atlassian / Confluence (OAuth)

  1. Go to Admin > Integrations > Atlassian.
  2. Enter the Atlassian OAuth app credentials (Client ID, Client Secret).
  3. Set the Confluence base URL.
  4. Click Start OAuth β€” you will be redirected to Atlassian to authorise.

Token refresh is handled automatically. If the token expires, re-run the OAuth flow.

HubSpot

Two modes: Shared token (one HubSpot connection for all users) or Per-user token.

  1. Go to Admin > Integrations > HubSpot.
  2. Enter the HubSpot OAuth app credentials.
  3. Choose shared or per-user mode.
  4. Click Start OAuth to connect.

Azure Cost Tools

  1. Go to Admin > Integrations > Azure MCP.
  2. Enter: Azure tenant ID, Client ID, Client secret, MCP server URL (typically http://localhost:3001), MCP app ID.
  3. Save. Users can then connect their own Azure accounts via OAuth.

Coralogix

  1. Go to Admin > Integrations > Coralogix.
  2. Enter the Coralogix API key and endpoint URL.
  3. Save. Changes take effect immediately.

n8n workflows

  1. Go to Admin > n8n.
  2. Enter the n8n API URL and API key.
  3. Click Sync workflows to import the workflow list.
  4. Use Get workflow metadata to add display names and descriptions.

Config persistence

By default, all configuration is stored in a local JSON file (data/config.json). For shared/persistent config, set SQL_CONNECTION_STRING to a pyodbc-compatible connection string:

Driver={ODBC Driver 18 for SQL Server};Server=myserver.database.windows.net;Database=mcp_config;Uid=myuser;Pwd=mypass;Encrypt=yes;

If CONFIG_ENCRYPTION_KEY is set, all secrets stored in the config (API keys, OAuth tokens) are encrypted at rest using Fernet (AES-128-CBC). Set it in production.