MCP Server
Supported modes: Hosted Local Available in: Free Solo Teams (hosted MCP: COMING SOON)
The Control Zero MCP server exposes the /v1 management API -- DLP and policy administration -- plus the cooperative check guard tool as MCP tools, so an AI coding client can administer Control Zero from the editor.
This server administers Control Zero; it does not govern the MCP client's own
tool calls. Govern Claude Code actions with
coding hooks, and govern tool calls in your own
application with the SDK. The check tool is
cooperative: it returns a decision the client is expected to honor, and cannot
stop a client that ignores it.
Version 2.0 replaced the tool surface and the credential model. The 1.x tools
(list_policies, create_policy, delete_policy, provision_safeguards and
the others) are gone, as are the MCP resources and prompts. Use 2.0.1 or later:
in 2.0.0 a management key was refused at startup and every management tool that
writes failed. The CHANGELOG.md shipped inside the package lists every
removed tool and changed argument.
Installation
Configure the Control Zero registry once: add @controlzero:registry=https://npm.controlzero.ai to your .npmrc (or run npm config set @controlzero:registry https://npm.controlzero.ai). It applies to npm install and npx for the whole @controlzero scope.
npx -p @controlzero/mcp-server controlzero-mcp
The -p ... controlzero-mcp form is required. The package ships two binaries
(controlzero-mcp for stdio and controlzero-mcp-hosted for HTTP), neither of
which matches the package name, so a bare npx @controlzero/mcp-server fails
with could not determine executable to run.
If you installed globally with npm install -g @controlzero/mcp-server, run
controlzero-mcp directly instead.
The server starts on stdio transport, which is what most MCP clients expect.
Two keys
| Key | Environment variable | Prefix | Used for |
|---|---|---|---|
| Management key | CONTROLZERO_MGMT_KEY | cz_mgmt_* | Every dlp_*, policy_*, attachment_*, approval_*, export and apply* tool |
| Enforcement key | CONTROLZERO_API_KEY | cz_live_* / cz_test_* | The check tool only |
An org admin mints a management key in the dashboard. Do not give an agent a
management key minted with unattended_publish: true: that flag exists for CI.
The server refuses to start with one, and the API refuses a publish-class
change from one when the request comes from MCP
(403 UNATTENDED_KEY_NOT_ALLOWED_FROM_AGENT) and audits the attempt.
On start the server validates each key it was given: the management key at
GET /v1/management/self, the enforcement key at GET /v1/sdk/bootstrap. An
invalid key, or a management key that is not a management key, stops the
server with a message naming the problem.
CONTROLZERO_API_URL overrides the API base URL (default
https://api.controlzero.ai).
Client Configuration
Every snippet sets both keys. Omit whichever one you do not need: the management key drives the administration tools, the enforcement key drives only check.
Claude Desktop
Add to your Claude Desktop configuration file (claude_desktop_config.json):
{
"mcpServers": {
"controlzero": {
"command": "npx",
"args": ["-p", "@controlzero/mcp-server", "controlzero-mcp"],
"env": {
"CONTROLZERO_MGMT_KEY": "cz_mgmt_your_key_here",
"CONTROLZERO_API_KEY": "cz_live_your_key_here"
}
}
}
}
Claude Code
Add to your Claude Code MCP configuration:
{
"mcpServers": {
"controlzero": {
"command": "npx",
"args": ["-p", "@controlzero/mcp-server", "controlzero-mcp"],
"env": {
"CONTROLZERO_MGMT_KEY": "cz_mgmt_your_key_here",
"CONTROLZERO_API_KEY": "cz_live_your_key_here"
}
}
}
}
Cursor
In Cursor settings, navigate to MCP Servers and add:
{
"controlzero": {
"command": "npx",
"args": ["-p", "@controlzero/mcp-server", "controlzero-mcp"],
"env": {
"CONTROLZERO_MGMT_KEY": "cz_mgmt_your_key_here",
"CONTROLZERO_API_KEY": "cz_live_your_key_here"
}
}
}
Windsurf
Add to your Windsurf MCP configuration:
{
"mcpServers": {
"controlzero": {
"command": "npx",
"args": ["-p", "@controlzero/mcp-server", "controlzero-mcp"],
"env": {
"CONTROLZERO_MGMT_KEY": "cz_mgmt_your_key_here",
"CONTROLZERO_API_KEY": "cz_live_your_key_here"
}
}
}
}
VS Code
Add to your VS Code MCP settings (.vscode/mcp.json):
{
"servers": {
"controlzero": {
"command": "npx",
"args": ["-p", "@controlzero/mcp-server", "controlzero-mcp"],
"env": {
"CONTROLZERO_MGMT_KEY": "cz_mgmt_your_key_here",
"CONTROLZERO_API_KEY": "cz_live_your_key_here"
}
}
}
}
Gemini CLI
Add to your Gemini CLI MCP configuration:
{
"mcpServers": {
"controlzero": {
"command": "npx",
"args": ["-p", "@controlzero/mcp-server", "controlzero-mcp"],
"env": {
"CONTROLZERO_MGMT_KEY": "cz_mgmt_your_key_here",
"CONTROLZERO_API_KEY": "cz_live_your_key_here"
}
}
}
}