MCP server for ALTR data security: databases, tags, policies, classification, access, audits
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste into ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
ALTR provides tag-based data masking, access governance, and classification for Snowflake, Databricks, and OLTP databases. This MCP server enables AI assistants (Claude, Cursor, and other MCP clients) to manage data security on the ALTR platform, covering database connections, tag masking, policies, classification, access management, audits, telemetry, and sidecar configuration.
New to ALTR? See the ALTR documentation for an overview of the platform, concepts, and supported data sources.
All tools return structured {success, data, error} responses and can run over stdio, SSE, or streamable-http transports.
Install from PyPI:
Or run directly with uvx (no install required):
uvxis part of the uv Python package manager. Install it withpip install uvor see the uv installation guide.
Set the three required environment variables (see Getting Credentials for where to find each in the ALTR console):
Wire it into your AI client β see Setup for Claude Desktop, Claude Code, Cursor, VS Code, and Windsurf. The same three env vars go into the client's env block.
Verify by asking your AI assistant to run a read-only tool:
get_databasesget_tagsget_rolesIf these return data, your setup is working.
You need three values from the ALTR platform to configure this server. See Manage API keys for the full reference.
| Credential | Where to find it |
|---|---|
ORG_ID | In the ALTR console: Settings > Preferences > Organization β copy the value from "ALTR Organization ID" |
MAPI_KEY | In the ALTR console: Settings > Preferences > API > Add New β give it a description, then copy the key |
MAPI_SECRET | Shown once when you create the API key above β copy and store it securely |
Set the following environment variables before starting the server:
| Variable | Required | Description |
|---|---|---|
ORG_ID | Yes | ALTR organization ID |
MAPI_KEY | Yes | ALTR management API key |
MAPI_SECRET | Yes | ALTR management API secret |
MCP_TRANSPORT | No | Transport protocol: stdio (default), sse, or streamable-http |
MCP_HOST | No | Bind address for HTTP transports (default: 0.0.0.0) |
MCP_PORT | No | Port for HTTP transports (default: 8000) |
RESTRICTED_TOOLS | No | Comma-separated tool names to hide from clients |
LOG_FORMAT | No | Log output format: console (default) or json |
LOG_LEVEL | No | Log level (default: INFO) |
MAX_RETRIES | No | Attempts per API call before giving up (default: 3) |
DISABLE_RETRY | No | Set true to disable retries entirely (default: false) |
Every ALTR service endpoint can be pointed elsewhere, which is useful against a non-production ALTR environment. All are optional β leave them unset in normal use.
The seven per-service endpoints are derived from your ORG_ID as
https://<ORG_ID>.<service>.live.altr.com, four of them with a version path
segment appended. An override replaces the whole value, so it must include that
path segment where the default has one β see the table.
| Variable | Default |
|---|---|
ALTR_API_BASE_URL | https://api.live.altr.com |
ALTR_ALTRNET_BASE_URL | https://altrnet.live.altr.com |
ALTR_CLASSIFICATION_BASE_URL | https://<ORG_ID>.classification.live.altr.com |
ALTR_SC_CONTROL_BASE_URL | https://<ORG_ID>.sc-control.live.altr.com |
ALTR_SERVICE_USER_BASE_URL | https://<ORG_ID>.service-user.live.altr.com |
ALTR_AUDIT_REPORT_BASE_URL | https://<ORG_ID>.audit-report.live.altr.com/v1 |
ALTR_VAULT_BASE_URL | https://<ORG_ID>.vault.live.altr.com/api/v2 |
ALTR_CRITICAL_BASE_URL | https://<ORG_ID>.critical.live.altr.com/v2 |
ALTR_KMA_BASE_URL | https://<ORG_ID>.kma.live.altr.com/v1 |
Use RESTRICTED_TOOLS to hide specific tools from MCP clients. Restricted tools are removed from the tool list and blocked if called directly.
Names must match the registered tool name exactly. An entry that matches nothing restricts nothing, and is logged as a warning the first time a client lists tools. Note that 11 tools were renamed from delete_* to disconnect_* in 0.4.0.
For example, to give a team read-only access without any destructive operations:
Or in the Claude Desktop config:
This is an operator-level safety net β it prevents accidental or unwanted tool usage but is not a substitute for proper API key permissions.
Add the following to your claude_desktop_config.json (Settings > Developer > Edit Config):
This writes the config to .mcp.json which can be committed to share with your team.
Add to ~/.cursor/mcp.json (global) or .cursor/mcp.json (project-scoped):
Open User Settings JSON (Ctrl+Shift+P β "Preferences: Open User Settings (JSON)") and add:
Add to ~/.codeium/windsurf/mcp_config.json:
To run from a local clone instead of the published PyPI package:
Claude Code:
Claude Desktop:
This section is for building a standalone CLI binary from the MCP server. If you just want to use the server with Claude Desktop or Claude Code, skip to Tools.
A standalone CLI lets you call ALTR tools directly from the terminal without an MCP client. It's built with mcporter, an open-source tool that compiles MCP servers into native CLI binaries. See the mcporter docs for the full set of options.
mcporter itself does not need to be installed separately β npx downloads and runs it on demand.
From the repo root:
This generates a compiled binary at ./altr-cli.
Set your credentials as environment variables, then run any tool:
The CLI runs the MCP server locally via uv run and requires the repo to be present at the working directory. All environment variables from the Configuration section apply.
For a full breakdown of every tool with parameters, behavior, and examples, see docs/index.md.
| Domain | Tools | What it does |
|---|---|---|
| Databases | 8 | Connect Snowflake, OLTP, and Databricks data sources. Setup per platform: Snowflake, OLTP, Databricks. |
| Tags | 8 | Manage Snowflake tag connections to ALTR. See Connecting Snowflake Tags to ALTR. |
| Policies & Rules | 8 | Create masking policies and per-role rules. Tag-based (Snowflake, Databricks) and column-based (Snowflake only). Masking levels 10000β10009. Includes get_roles β list all ALTR roles (called user groups in the ALTR console). |
| Classification | 36 | Run automated data classification scans. Snowflake (in-house + ALTR Native + GDLP), OLTP (ALTR Native + GDLP), Databricks (GDLP only). Includes findings-tree navigation and human review decisions. |
| Access Management | 4 | Access management policies for Snowflake and OLTP. |
| Access Requests | 6 | Submit, approve, deny, and cancel data access approval requests. |
| Audits | 6 | Search sidecar, Snowflake query, and platform system audits. |
| Audit Reports | 17 | Create, schedule, and review structured audit report definitions and instances, including comments and sign-offs. |
| Telemetry | 9 | Monitor ALTR sidecar proxy agent and sidecar instance health. |
| Sidecar Configuration | 37 | Configure the ALTR sidecar proxy β agents, repos, repo users, service users, sidecars, listeners, and bindings. |
| Vault Tokenization | 4 | Tokenize and detokenize values using ALTR vaulted tokenization. |
| Critical Tokenization | 4 | Tokenize and detokenize values using ALTR critical tokenization. |
| Key Management | 9 | Manage FPE encryption keys and tweaks. |
A few things are easy to miss and worth surfacing here:
Snowflake tags vs Databricks tags. A Snowflake tag is a first-class ALTR object β you register it with connect_tag, it gets a tag_group_id, and shows up in get_tags, get_tag_details*, update_tag, and disconnect_tag*. A Databricks tag is the opposite: not an ALTR object at all, just a raw string you pass into create_policy (with policy_type="PUSHDOWN" and database_ids=[β¦]). Databricks tags never appear in get_tags and do not have a tag_group_id. None of the Tags tools apply to Databricks.
Databricks create_policy requirements. When creating a masking policy for a Databricks metastore, you must pass database_ids as a list β even for a single database (e.g. database_ids=[2167]) β and set policy_type="PUSHDOWN". Omitting database_ids or using policy_type="TAG" will be rejected by the API. Snowflake policies do the opposite: omit database_ids and let policy_type default to TAG.
Platform setup guides on the ALTR docs site:
| Feature | Snowflake | OLTP (via sidecar) | Databricks |
|---|---|---|---|
| Database connections | β | β | β |
| Masking policies | β | β | β |
| Classification | β | β | β οΈ Partial |
| Access management policies | β | β | β |
| Access requests | β | β | β |
| Query audit logging | β | β | β |
| System audit logging | β | β | β |
| Sidecar configuration | β | β | β |
| Telemetry & monitoring | β | β | β |
Legend: β Supported Β β οΈ Partial Β β Not supported Β β Not applicable
Classification mode coverage:
| Mode | Snowflake | OLTP | Databricks |
|---|---|---|---|
| In-house (ALTR pattern matching) | β | β | β |
| ALTR Native classifiers | β | β | β |
| GDLP (Google Cloud DLP) | β | β | β |
Databricks classification β Partial: GDLP only via create_databricks_job; no in-house or ALTR Native classifiers. A collection_name may optionally be passed to scope the scan to a specific ALTR collection's classifiers (subject to condition_types); when omitted, all default Google DLP infoTypes are used.
Access management policies (Databricks): This MCP server does not currently expose Databricks grant or access management APIs. For Databricks access control, use the Databricks UI or REST API directly.
OLTP refers to relational databases (PostgreSQL, MySQL, Oracle, SQL Server) accessed through a customer-managed ALTR sidecar proxy.
This works without credentials. Your AI client also reports the same version as the server version when it connects, which is the quickest way to confirm the client actually picked up an upgrade.
uvx: command not foundInstall uv: pip install uv or via the official installer.
Restart your AI client after editing the config file β changes are not picked up automatically.
ERROR: Missing required environment variablesVerify ORG_ID, MAPI_KEY, and MAPI_SECRET are set in the env block of your client config. Variable names are case-sensitive.
{"success": false, ...}| HTTP status | Likely cause | Fix |
|---|---|---|
401 | Invalid credentials | Verify MAPI_KEY / MAPI_SECRET in the ALTR console under Settings > Preferences > API |
403 | Feature not enabled for this organization | The endpoint exists but is gated by an ALTR feature flag your org doesn't have turned on. Contact ALTR support to confirm the feature is enabled for your account. |
404 | Resource not found | Confirm the ID exists in your organization |
429 | Rate limited | The server retries automatically up to 3Γ with backoff; if persistent, reduce request frequency |
Check whether the tool name appears in the RESTRICTED_TOOLS env var in your client config. Restricted tools are hidden from the tool list entirely.
RESTRICTED_TOOLS matches names exactly, so a misspelled or renamed entry restricts nothing. Check the server log for tool_restriction_middleware.unknown_tools, which names any entry that matched no registered tool.
Use pagination parameters (limit, offset, or cursor) available on audit, telemetry, and classification tools to reduce response size.
Platform setup
Data access controls
Discovery and observability
Protocol
Copyright (C) 2026 ALTR Solutions, Inc.
GNU General Public License v3.0 or later (GPL-3.0-or-later). See
LICENSE.md for the copyright notice and the full license text.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/altr-mcp-server)<a href="https://allmcps.com/mcp/altr-mcp-server"><img src="https://allmcps.com/api/badge/altr-mcp-server?style=directory" alt="Altr Mcp Server on AllMCPs" /></a>