Skip to content

ALTR MCP Server

The ALTR MCP Server connects AI assistants to the ALTR platform using the Model Context Protocol (MCP), an open standard for giving large language models access to external tools. With it, assistants such as Claude, Cursor, and GitHub Copilot can manage tag-based data masking, access controls, and data classification across Snowflake, Databricks, and OLTP databases directly from a conversation.

The server exposes 156 tools across 13 domains, covering database connections, tag masking, policies, classification, access management, audits, telemetry, and sidecar configuration. Every tool returns a structured {success, data, error} response and can run over stdio, Server-Sent Events (SSE), or streamable-http transports.

Before you begin, you need:

  • An ALTR organization with an API key.
  • The uv Python package manager, which provides the uvx command. Install it with pip install uv.

You need three values from the ALTR console to authenticate the server:

CredentialWhere to find it
ORG_IDSettings > Preferences > Organization — copy the value from “ALTR Organization ID”.
MAPI_KEYSettings > Preferences > API > Add New — enter a description, click Create API Key, then copy the Key Name (the auto-generated username).
MAPI_SECRETShown once when you create the API key — copy and store it securely.

For the full reference on creating and managing keys, see Manage API Keys.

Install the server from PyPI:

Terminal window
pip install altr-mcp

Or run it directly with uvx, which requires no separate install:

Terminal window
uvx altr-mcp

Add the ALTR MCP Server to your AI client’s configuration, passing your three credentials in the env block. Restart the client after editing its configuration — changes are not picked up automatically.

Add the following to your claude_desktop_config.json (Settings > Developer > Edit Config):

{
"mcpServers": {
"altr": {
"command": "uvx",
"args": ["altr-mcp"],
"env": {
"ORG_ID": "<YOUR_ORG_ID>",
"MAPI_KEY": "<YOUR_API_KEY>",
"MAPI_SECRET": "<YOUR_API_SECRET>"
}
}
}
}
Terminal window
claude mcp add altr -e ORG_ID=<YOUR_ORG_ID> -e MAPI_KEY=<YOUR_API_KEY> -e MAPI_SECRET=<YOUR_API_SECRET> -- uvx altr-mcp

This writes the configuration to .mcp.json, which you can commit to share with your team.

Add to ~/.cursor/mcp.json (global) or .cursor/mcp.json (project-scoped):

{
"mcpServers": {
"altr": {
"command": "uvx",
"args": ["altr-mcp"],
"env": {
"ORG_ID": "<YOUR_ORG_ID>",
"MAPI_KEY": "<YOUR_API_KEY>",
"MAPI_SECRET": "<YOUR_API_SECRET>"
}
}
}
}

Open your User Settings JSON (Ctrl+Shift+P → Preferences: Open User Settings (JSON)) and add:

{
"mcp": {
"servers": {
"altr": {
"command": "uvx",
"args": ["altr-mcp"],
"env": {
"ORG_ID": "<YOUR_ORG_ID>",
"MAPI_KEY": "<YOUR_API_KEY>",
"MAPI_SECRET": "<YOUR_API_SECRET>"
}
}
}
}
}

Add to ~/.codeium/windsurf/mcp_config.json:

{
"mcpServers": {
"altr": {
"command": "uvx",
"args": ["altr-mcp"],
"env": {
"ORG_ID": "<YOUR_ORG_ID>",
"MAPI_KEY": "<YOUR_API_KEY>",
"MAPI_SECRET": "<YOUR_API_SECRET>"
}
}
}
}

Confirm the server is working by asking your AI assistant to run a read-only tool:

  • “List my ALTR databases” calls get_databases.
  • “Show me the tags connected to ALTR” calls get_tags.
  • “List the ALTR roles in my org” calls get_roles.

If these return data, your setup is working.

Set the following environment variables before starting the server:

VariableRequiredDescription
ORG_IDYesALTR organization ID.
MAPI_KEYYesALTR management API key.
MAPI_SECRETYesALTR management API secret.
MCP_TRANSPORTNoTransport protocol: stdio (default), sse, or streamable-http.
MCP_HOSTNoBind address for HTTP transports (default: 0.0.0.0).
MCP_PORTNoPort for HTTP transports (default: 8000).
RESTRICTED_TOOLSNoComma-separated tool names to hide from clients.
LOG_FORMATNoLog output format: console (default) or json.
LOG_LEVELNoLog level (default: INFO).

Use the RESTRICTED_TOOLS variable to hide specific tools from MCP clients. Restricted tools are removed from the tool list and blocked if called directly. For example, to give a team read-only access without any destructive operations, list the tools to hide as a comma-separated value:

{
"mcpServers": {
"altr": {
"command": "uvx",
"args": ["altr-mcp"],
"env": {
"ORG_ID": "<YOUR_ORG_ID>",
"MAPI_KEY": "<YOUR_API_KEY>",
"MAPI_SECRET": "<YOUR_API_SECRET>",
"RESTRICTED_TOOLS": "disconnect_database,delete_policy,delete_rule,disconnect_tag"
}
}
}
}

RESTRICTED_TOOLS is an operator-level safety net. It prevents accidental or unwanted tool usage, but it is not a substitute for scoping the permissions of your ALTR API key.

The server exposes 156 tools across the following domains:

DomainToolsWhat it does
Databases8Connect Snowflake, OLTP, and Databricks data sources.
Tags8Manage Snowflake tag connections to ALTR.
Policies & Rules8Create masking policies and per-role rules, including Databricks pushdown policies, and list ALTR roles (called user groups in the console).
Classification36Run automated data classification scans and manage classifiers.
Access Management4Manage access management policies for Snowflake and OLTP.
Access Requests6Submit, review, and resolve Snowflake data access requests.
Audits6Search sidecar, Snowflake query, and platform system audits.
Audit Reports17Create, schedule, and review structured audit report definitions and instances.
Telemetry9Monitor ALTR sidecar proxy agent and instance health.
Sidecar Configuration37Configure the ALTR sidecar proxy — agents, repos, sidecars, listeners, bindings, and tasks.
Vault Tokenization4Tokenize and detokenize values using ALTR vaulted tokenization.
Critical Tokenization4Tokenize and detokenize values using ALTR critical tokenization.
Key Management9Manage Format-Preserving Encryption (FPE) keys and tweaks.

The ALTR MCP Server supports Snowflake, Databricks, and OLTP databases (PostgreSQL, MySQL, Oracle, and SQL Server accessed through a customer-managed ALTR sidecar proxy). Feature availability varies by platform. For setup, see the Snowflake, OLTP, and Databricks data source guides.

uvx: command not found — Install uv with pip install uv or the official installer.

Server not appearing in your AI client — Restart your AI client after editing the configuration file. Changes are not picked up automatically.

ERROR: Missing required environment variables — Verify that ORG_ID, MAPI_KEY, and MAPI_SECRET are set in the env block of your client configuration. Variable names are case-sensitive.

Tools returning {"success": false, ...} — Check the HTTP status in the error:

HTTP statusLikely causeFix
401Invalid credentialsVerify MAPI_KEY and MAPI_SECRET in the ALTR console under Settings > Preferences > API.
403Feature not enabledThe endpoint is gated by a feature your organization doesn’t have turned on. Contact ALTR Support to confirm the feature is enabled.
404Resource not foundConfirm the ID exists in your organization.
429Rate limitedThe server retries automatically with backoff. If the error persists, reduce request frequency.

A tool is missing from the tool list — Check whether the tool name appears in the RESTRICTED_TOOLS environment variable in your client configuration. Restricted tools are hidden from the tool list entirely.