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 outdated — uvx 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
Metadata
Release files for controlmonkey-mcp 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| controlmonkey_mcp-1.0.2.tar.gz | 12.1 kB | Without provenance | Details for controlmonkey_mcp-1.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| controlmonkey_mcp-1.0.2-py3-none-any.whl | Python 3 | none | any | Details for controlmonkey_mcp-1.0.2-py3-none-any.whl |
Total release size: 26.7 kB
Release files / controlmonkey_mcp-1.0.2.tar.gz
| Download URL | controlmonkey_mcp-1.0.2.tar.gz |
|---|---|
| Size | 12.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dd1682a3568e7a741617a0b8d4108f3724e17aea21b36e34d6fa042c4a1a88f7
|
|
BLAKE2b-256 checksum How to use checksums |
85cf6010dfb67cf16ff812eb557ab4a01845eabb9d8789d2675cd198237c6d8d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.12
|
Release files / controlmonkey_mcp-1.0.2-py3-none-any.whl
| Download URL | controlmonkey_mcp-1.0.2-py3-none-any.whl |
|---|---|
| Size | 14.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9cbd599d14ff1e19c85441c3d57e16ffb7e5b0085a41db174bc7b95bd5deff23
|
|
BLAKE2b-256 checksum How to use checksums |
1e4aa8221e451e4185bdba62c6acac2aeed0598715956778c872c081c2b9fa3c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.12
|
Security for controlmonkey-mcp 1.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.