Skip to main content

ControlMonkey MCP Server

Manage your cloud infrastructure through natural language. The ControlMonkey MCP server connects AI assistants like Cursor, Claude Code, and Windsurf directly to your ControlMonkey platform - so you can query, create, and operate your Terraform workflows without leaving your editor.

Example Use Cases

Investigate a Failed Deployment

When a deployment fails, ask the AI to pull the logs and diagnose the issue directly in your IDE.

The last deployment on stack "payments-service" failed.
Get the deployment details and show me the Terraform apply logs.
What went wrong?

Policy and Compliance Setup

Enforce governance rules across your infrastructure using control policies.

Create a control policy that prevents deploying resources without
the "team" and "environment" tags. Map it to the "production"
namespace so it applies to all stacks there.

Available Tools

The available tools of the agents are built dynamically during the MCP server startup based on the API token's role and permissions. Once connected, your AI assistant can help you:

  • Namespaces & Stacks — Create, update, query, and delete namespaces and Terraform stacks
  • Plans & Deployments — Trigger Terraform plans and deployments, review states, approve or cancel runs
  • Templates — Manage ephemeral and persistent templates, create stacks from templates
  • Variables — Create and manage Terraform input variables across scopes
  • Control Policies — Create policies and policy groups, map them to targets for governance
  • Cloud Credentials — Manage AWS, Azure, and GCP credentials
  • Notifications — Configure Slack, Teams, and email notification endpoints and subscriptions
  • Disaster Recovery — Set up and manage DR configurations
  • Auto Discovery — Configure automatic stack discovery for namespaces
  • VCS & SSH Keys — Add version control providers and manage SSH keys
  • Audit — Query audit events across your organization

⚠️ Note – Use AI With Caution

ControlMonkey integrates with third-party LLM providers but does not control the underlying models or their outputs. AI-generated suggestions - including code changes, remediation steps, and infrastructure modifications - should always be reviewed by a qualified team member before being applied to your environment.

Prerequisites

1. Install uv

This server uses uv, the standard Python package manager for the MCP ecosystem.

macOS:

brew install uv

Linux / WSL:

curl -LsSf https://astral.sh/uv/install.sh | sh

Windows:

powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

2. Create a Programmatic User

You'll need an API token from a ControlMonkey Programmatic User. Follow the Programmatic Users guide to create one.

Note: The role you assign determines which operations are available through the MCP server. Choose permissions appropriate for your use case.

Quick Start

Cursor

Add to .cursor/mcp.json:

{
  "mcpServers": {
    "controlmonkey": {
      "command": "uvx",
      "args": ["controlmonkey-mcp"],
      "env": {
        "CM_BASE_URL": "https://api.controlmonkey.io",
        "CM_API_TOKEN": "your-api-token"
      }
    }
  }
}

Claude Code

Run in your terminal:

claude mcp add-json controlmonkey '{"command":"uvx","args":["controlmonkey-mcp"],"env":{"CM_BASE_URL":"https://api.controlmonkey.io","CM_API_TOKEN":"your-api-token"}}'

To make it available across all projects, add the --scope user flag:

claude mcp add-json controlmonkey --scope user '{"command":"uvx","args":["controlmonkey-mcp"],"env":{"CM_BASE_URL":"https://api.controlmonkey.io","CM_API_TOKEN":"your-api-token"}}'

Verify it's connected:

claude mcp list

Windsurf

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

{
  "mcpServers": {
    "controlmonkey": {
      "command": "uvx",
      "args": ["controlmonkey-mcp"],
      "env": {
        "CM_BASE_URL": "https://api.controlmonkey.io",
        "CM_API_TOKEN": "your-api-token"
      }
    }
  }
}

After saving, click Refresh in the MCP toolbar to connect.

Run Directly

CM_BASE_URL=https://api.controlmonkey.io CM_API_TOKEN=your-api-token uvx controlmonkey-mcp

Configuration

You can set configuration via environment variables or a .env file:

Variable Required Default Description
CM_BASE_URL ControlMonkey API base URL
CM_API_TOKEN Your Programmatic User API token
CM_REQUEST_TIMEOUT 30 HTTP timeout in seconds

Troubleshooting

externally-managed-environment error — Install uv (see Prerequisites) and use uvx instead of running with system Python.

Tools not appearing or outdateduvx caches packages. Run uv cache clean and restart your MCP client.

Acknowledgments

Special thanks to Lior Azroel (@liorazroel) for helping shape the use cases behind this project.

Resources

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

controlmonkey_mcp-1.0.1.tar.gz (12.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

controlmonkey_mcp-1.0.1-py3-none-any.whl (14.5 kB view details)

Uploaded Python 3

File details

Details for the file controlmonkey_mcp-1.0.1.tar.gz.

File metadata

  • Download URL: controlmonkey_mcp-1.0.1.tar.gz
  • Upload date:
  • Size: 12.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.12

File hashes

Hashes for controlmonkey_mcp-1.0.1.tar.gz
Algorithm Hash digest
SHA256 e256aab46698dba416ddf1e61bc6755dccda32f7c309062290569a80587e7bb9
MD5 58d46eba81ec28597a05b8158c48351c
BLAKE2b-256 86aebec285cccac6ada99af65ce1e9b5f279a9dd67884f229e13a8c4609548c8

See more details on using hashes here.

File details

Details for the file controlmonkey_mcp-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for controlmonkey_mcp-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6e3f4068afe5991dd49f22d8e3c22595fcb082474581e0731a9c8b3ae8a1293a
MD5 f6964c6c917b30a1f688dfaff74d5e5f
BLAKE2b-256 22a7c0a2b2c7e0fab2a18bd27166ba2edac37f7837ec9d9e81a5db2ae77da7a3

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 files

1.0.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page