env0
OfficialSummary: The env0 MCP server lets AI assistants inspect and operate env0 environments, deployments, deployment logs, and Cloud Compass cloud resources through natural language.
Projects & environments — list all projects (
get-projects) and query environments by ID, name, or project with paging (get-environments).Environment operations — trigger a new deployment (always requiring user approval), approve a pending plan, cancel a queued deployment, or abort one already running (
deploy-environment,approve-environment,cancel-environment,abort-environment).Monitoring & troubleshooting — pull plan logs for the latest deployment (
get-plan-logs), analyze errors from the last deployment (get-error-analysis), list recent deployments filtered by status (search-deployments), and debug a specific past deployment including step statuses and failed-step logs (get-deployment-context).Cloud resources (Cloud Compass) — list cloud configurations (
get-cloud-configurations) and search cloud resources with rich filters (provider, account, region, type, service, environment, drift status, severity, IaC management type; sorted and paginated) viaget-cloud-resources.IaC generation — generate Terraform or OpenTofu code for selected cloud resource IDs (
generate-iac) and poll the job for results (check-iac-job-status).Delivery — runs as a Docker container over stdio (default) or HTTP transport, authenticated with
ENV0_API_KEY,ENV0_API_SECRET, and optionalENV0_ORGANIZATION_ID, and integrates with Cursor, Claude Code/Desktop, VS Code, Windsurf, Cline, Zed, JetBrains, and many other MCP clients.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@env0 deploy the development environment from template 'app-dev'"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Env0's MCP Server
The Env0 MCP Server connects AI tools Env0's platform. This gives AI agents, assistants, and chatbots the ability to interact with environments in Env0's platform (for example, deploying, canceling and getting the logs of environments), as well as getting the resources from Env0's Cloud Compass. All through natural language interactions.
🛠️ Installation
Requirements
Docker - Required to run the MCP server container
MCP Client - One of the following AI coding assistants:
Cursor, Claude Code, VSCode, Windsurf, Cline, Zed, JetBrains AI Assistant, or another MCP-compatible client
Env0 API Credentials - You'll need to gather the following from your env0 account:
🔑 API Key and Secret
Create an API key and secret by following the env0 API Keys guide.
🏢 Organization ID
Find your organization ID in the env0 dashboard:
Click on your organization icon in the bottom left corner
Select Settings from the left side panel
Go to the General tab under Organization Settings
Copy the Organization ID
For detailed instructions, see the env0 Organizations documentation.
Note: The Organization ID is required if you belong to multiple organizations. If you only have access to one organization, this step ensures the MCP server connects to the correct one.
Go to: Settings -> Cursor Settings -> MCP & Integrations -> New MCP Server
Pasting the following configuration into your Cursor ~/.cursor/mcp.json file is the recommended approach. You may also install in a specific project by creating .cursor/mcp.json in your project folder. See Cursor MCP docs for more info.
{
"mcpServers": {
"env0": {
"command": "docker",
"args": [
"run", "-i", "--rm",
"-e", "ENV0_API_KEY=your-api-key-here",
"-e", "ENV0_API_SECRET=your-api-secret-here",
"-e", "ENV0_ORGANIZATION_ID=your-org-id-here",
"env0/mcp-server"
]
}
}
}Run this command. See Claude Code MCP docs for more info.
claude mcp add env0 -- docker run -i --rm -e ENV0_API_KEY=your-api-key-here -e ENV0_API_SECRET=your-api-secret-here -e ENV0_ORGANIZATION_ID=your-org-id-here env0/mcp-serverAdd this to your Windsurf MCP raw config file. See Windsurf MCP docs for more info.
{
"mcpServers": {
"env0": {
"command": "docker",
"args": [
"run", "-i", "--rm",
"-e", "ENV0_API_KEY=your-api-key-here",
"-e", "ENV0_API_SECRET=your-api-secret-here",
"-e", "ENV0_ORGANIZATION_ID=your-org-id-here",
"env0/mcp-server"
]
}
}
}Add this to your VS Code MCP config file. See VS Code MCP docs for more info.
{
"mcp": {
"servers": {
"env0": {
"type": "stdio",
"command": "docker",
"args": [
"run", "-i", "--rm",
"-e", "ENV0_API_KEY=your-api-key-here",
"-e", "ENV0_API_SECRET=your-api-secret-here",
"-e", "ENV0_ORGANIZATION_ID=your-org-id-here",
"env0/mcp-server"
]
}
}
}
}Open Cline.
Click the hamburger menu (☰) to open the side menu.
Go to the MCP Servers section.
Switch to the Installed tab.
Click on Configure MCP Servers.
Add the env0 MCP server to your configuration:
{
"mcpServers": {
"env0": {
"command": "docker",
"args": [
"run", "-i", "--rm",
"-e", "ENV0_API_KEY=your-api-key-here",
"-e", "ENV0_API_SECRET=your-api-secret-here",
"-e", "ENV0_ORGANIZATION_ID=your-org-id-here",
"env0/mcp-server"
]
}
}
}Add this to your Zed settings.json. See Zed Context Server docs for more info.
{
"context_servers": {
"env0": {
"command": {
"path": "docker",
"args": [
"run", "-i", "--rm",
"-e", "ENV0_API_KEY=your-api-key-here",
"-e", "ENV0_API_SECRET=your-api-secret-here",
"-e", "ENV0_ORGANIZATION_ID=your-org-id-here",
"env0/mcp-server"
]
},
"settings": {}
}
}
}To configure the env0 MCP server in Augment Code, you can use either the graphical interface or manual configuration.
A. Using the Augment Code UI
Click the hamburger menu.
Select Settings.
Navigate to the Tools section.
Click the + Add MCP button.
Enter the following command:
docker run -i --rm -e ENV0_API_KEY=your-api-key-here -e ENV0_API_SECRET=your-api-secret-here -e ENV0_ORGANIZATION_ID=your-org-id-here env0/mcp-serverName the MCP: env0.
Click the Add button.
B. Manual Configuration
Press Cmd/Ctrl Shift P or go to the hamburger menu in the Augment panel
Select Edit Settings
Under Advanced, click Edit in settings.json
Add the server configuration to the
mcpServersarray in theaugment.advancedobject
{
"augment.advanced": {
"mcpServers": [
{
"name": "env0",
"command": "docker",
"args": [
"run", "-i", "--rm",
"-e", "ENV0_API_KEY=your-api-key-here",
"-e", "ENV0_API_SECRET=your-api-secret-here",
"-e", "ENV0_ORGANIZATION_ID=your-org-id-here",
"env0/mcp-server"
]
}
]
}
}Once the MCP server is added, restart your editor.
Add this to your Roo Code MCP configuration file. See Roo Code MCP docs for more info.
{
"mcpServers": {
"env0": {
"command": "docker",
"args": [
"run", "-i", "--rm",
"-e", "ENV0_API_KEY=your-api-key-here",
"-e", "ENV0_API_SECRET=your-api-secret-here",
"-e", "ENV0_ORGANIZATION_ID=your-org-id-here",
"env0/mcp-server"
]
}
}
}See Gemini CLI Configuration for details.
Open the Gemini CLI settings file. The location is
~/.gemini/settings.json(where~is your home directory).Add the following to the
mcpServersobject in yoursettings.jsonfile:
{
"mcpServers": {
"env0": {
"command": "docker",
"args": [
"run", "-i", "--rm",
"-e", "ENV0_API_KEY=your-api-key-here",
"-e", "ENV0_API_SECRET=your-api-secret-here",
"-e", "ENV0_ORGANIZATION_ID=your-org-id-here",
"env0/mcp-server"
]
}
}
}If the mcpServers object does not exist, create it.
Open Claude Desktop developer settings and edit your claude_desktop_config.json file to add the following configuration. See Claude Desktop MCP docs for more info.
{
"mcpServers": {
"env0": {
"command": "docker",
"args": [
"run", "-i", "--rm",
"-e", "ENV0_API_KEY=your-api-key-here",
"-e", "ENV0_API_SECRET=your-api-secret-here",
"-e", "ENV0_ORGANIZATION_ID=your-org-id-here",
"env0/mcp-server"
]
}
}
}Add this to your Opencode configuration file. See Opencode MCP docs for more info.
{
"mcp": {
"env0": {
"type": "local",
"command": [
"docker", "run", "-i", "--rm",
"-e", "ENV0_API_KEY=your-api-key-here",
"-e", "ENV0_API_SECRET=your-api-secret-here",
"-e", "ENV0_ORGANIZATION_ID=your-org-id-here",
"env0/mcp-server"
],
"enabled": true
}
}
}See OpenAI Codex for more information.
Add the following configuration to your OpenAI Codex MCP server settings:
[mcp_servers.env0]
command = "docker"
args = [
"run", "-i", "--rm",
"-e", "ENV0_API_KEY=your-api-key-here",
"-e", "ENV0_API_SECRET=your-api-secret-here",
"-e", "ENV0_ORGANIZATION_ID=your-org-id-here",
"env0/mcp-server"
]See JetBrains AI Assistant Documentation for more details.
In JetBrains IDEs go to
Settings->Tools->AI Assistant->Model Context Protocol (MCP)Click
+ Add.Click on
Commandin the top-left corner of the dialog and select the As JSON option from the listAdd this configuration and click
OK
{
"mcpServers": {
"env0": {
"command": "docker",
"args": [
"run", "-i", "--rm",
"-e", "ENV0_API_KEY=your-api-key-here",
"-e", "ENV0_API_SECRET=your-api-secret-here",
"-e", "ENV0_ORGANIZATION_ID=your-org-id-here",
"env0/mcp-server"
]
}
}
}Click
Applyto save changes.The same way env0 could be added for JetBrains Junie in
Settings->Tools->Junie->MCP Settings
See Kiro Model Context Protocol Documentation for details.
Navigate
Kiro>MCP ServersAdd a new MCP server by clicking the
+ Addbutton.Paste the configuration given below:
{
"mcpServers": {
"env0": {
"command": "docker",
"args": [
"run", "-i", "--rm",
"-e", "ENV0_API_KEY=your-api-key-here",
"-e", "ENV0_API_SECRET=your-api-secret-here",
"-e", "ENV0_ORGANIZATION_ID=your-org-id-here",
"env0/mcp-server"
],
"env": {},
"disabled": false,
"autoApprove": []
}
}
}Click
Saveto apply the changes.
Use the Add manually feature and fill in the JSON configuration information for that MCP server. For more details, visit the Trae documentation.
{
"mcpServers": {
"env0": {
"command": "docker",
"args": [
"run", "-i", "--rm",
"-e", "ENV0_API_KEY=your-api-key-here",
"-e", "ENV0_API_SECRET=your-api-secret-here",
"-e", "ENV0_ORGANIZATION_ID=your-org-id-here",
"env0/mcp-server"
]
}
}
}Add this to your Amazon Q Developer CLI configuration file. See Amazon Q Developer CLI docs for more details.
{
"mcpServers": {
"env0": {
"command": "docker",
"args": [
"run", "-i", "--rm",
"-e", "ENV0_API_KEY=your-api-key-here",
"-e", "ENV0_API_SECRET=your-api-secret-here",
"-e", "ENV0_ORGANIZATION_ID=your-org-id-here",
"env0/mcp-server"
]
}
}
}See Warp Model Context Protocol Documentation for details.
Navigate
Settings>AI>Manage MCP servers.Add a new MCP server by clicking the
+ Addbutton.Paste the configuration given below:
{
"env0": {
"command": "docker",
"args": [
"run", "-i", "--rm",
"-e", "ENV0_API_KEY=your-api-key-here",
"-e", "ENV0_API_SECRET=your-api-secret-here",
"-e", "ENV0_ORGANIZATION_ID=your-org-id-here",
"env0/mcp-server"
],
"env": {},
"working_directory": null,
"start_on_launch": true
}
}Click
Saveto apply the changes.
See LM Studio MCP Support for more information.
Navigate to
Program(right side) >Install>Edit mcp.json.Paste the configuration given below:
{
"mcpServers": {
"env0": {
"command": "docker",
"args": [
"run", "-i", "--rm",
"-e", "ENV0_API_KEY=your-api-key-here",
"-e", "ENV0_API_SECRET=your-api-secret-here",
"-e", "ENV0_ORGANIZATION_ID=your-org-id-here",
"env0/mcp-server"
]
}
}
}Click
Saveto apply the changes.Toggle the MCP server on/off from the right hand side, under
Program, or by clicking the plug icon at the bottom of the chat box.
You can configure the env0 MCP server in Visual Studio 2022 by following the Visual Studio MCP Servers documentation.
Add this to your Visual Studio MCP config file (see the Visual Studio docs for details):
{
"mcp": {
"servers": {
"env0": {
"type": "stdio",
"command": "docker",
"args": [
"run", "-i", "--rm",
"-e", "ENV0_API_KEY=your-api-key-here",
"-e", "ENV0_API_SECRET=your-api-secret-here",
"-e", "ENV0_ORGANIZATION_ID=your-org-id-here",
"env0/mcp-server"
]
}
}
}
}For more information and troubleshooting, refer to the Visual Studio MCP Servers documentation.
Add this to your Crush configuration file. See Crush MCP docs for more info.
{
"$schema": "https://charm.land/crush.json",
"mcp": {
"env0": {
"type": "stdio",
"command": "docker",
"args": [
"run", "-i", "--rm",
"-e", "ENV0_API_KEY=your-api-key-here",
"-e", "ENV0_API_SECRET=your-api-secret-here",
"-e", "ENV0_ORGANIZATION_ID=your-org-id-here",
"env0/mcp-server"
]
}
}
}Open the "Settings" page of the app, navigate to "Plugins," and enter the following JSON:
{
"mcpServers": {
"env0": {
"command": "docker",
"args": [
"run", "-i", "--rm",
"-e", "ENV0_API_KEY=your-api-key-here",
"-e", "ENV0_API_SECRET=your-api-secret-here",
"-e", "ENV0_ORGANIZATION_ID=your-org-id-here",
"env0/mcp-server"
]
}
}
}More information is available on BoltAI's Documentation site. For BoltAI on iOS, see this guide.
Edit your Rovo Dev CLI MCP config by running the command below:
acli rovodev mcpAdd this configuration:
{
"mcpServers": {
"env0": {
"command": "docker",
"args": [
"run", "-i", "--rm",
"-e", "ENV0_API_KEY=your-api-key-here",
"-e", "ENV0_API_SECRET=your-api-secret-here",
"-e", "ENV0_ORGANIZATION_ID=your-org-id-here",
"env0/mcp-server"
]
}
}
}To configure the env0 MCP server in Zencoder, follow these steps:
Go to the Zencoder menu (...)
From the dropdown menu, select Agent tools
Click on the Add custom MCP
Add the name and server configuration from below, and make sure to hit the Install button
{
"command": "docker",
"args": [
"run", "-i", "--rm",
"-e", "ENV0_API_KEY=your-api-key-here",
"-e", "ENV0_API_SECRET=your-api-secret-here",
"-e", "ENV0_ORGANIZATION_ID=your-org-id-here",
"env0/mcp-server"
]
}Once the MCP server is added, you can easily continue using it.
See Qodo Gen docs for more details.
Open Qodo Gen chat panel in VSCode or IntelliJ.
Click Connect more tools.
Click + Add new MCP.
Add the following configuration:
Qodo Gen Docker Connection
{
"mcpServers": {
"env0": {
"command": "docker",
"args": [
"run", "-i", "--rm",
"-e", "ENV0_API_KEY=your-api-key-here",
"-e", "ENV0_API_SECRET=your-api-secret-here",
"-e", "ENV0_ORGANIZATION_ID=your-org-id-here",
"env0/mcp-server"
]
}
}
}See Local and Remote MCPs for Perplexity for more information.
Navigate
Perplexity>SettingsSelect
Connectors.Click
Add Connector.Select
Advanced.Enter Server Name:
env0Paste the following JSON in the text area:
{
"args": [
"run", "-i", "--rm",
"-e", "ENV0_API_KEY=your-api-key-here",
"-e", "ENV0_API_SECRET=your-api-secret-here",
"-e", "ENV0_ORGANIZATION_ID=your-org-id-here",
"env0/mcp-server"
],
"command": "docker",
"env": {}
}Click
Save.
Related MCP server: Cloud Pilot MCP
🔧 Available Tools
The Env0 MCP Server provides a comprehensive set of tools to interact with Env0's platform through natural language. These tools are organized into the following categories:
get-projects
Retrieve all projects from your Env0 organization.
Description: Get the projects from env0
Parameters: None required
Usage: "Show me all my projects" or "List projects"
get-environments
Retrieve environments from Env0, with optional filtering.
Description: Get the environments from env0
Parameters:
environmentId(optional): Get a specific environment by IDname(optional): Filter by environment nameprojectId(optional): Filter by project IDlimit(optional): Maximum number of environments to returnoffset(optional): Pagination offset
Usage: "Show me all environments" or "Get environment with ID xyz"
deploy-environment
Create a new deployment for an existing environment.
Description: Creates a new deployment for an existing env0 environment. Always requires user to approve the deployment in env0.
Parameters:
environmentId(required): The environment ID to deploycomment(optional): Deployment commentrevision(optional): Specific revision to deploy
⚠️ Important: This action ALWAYS requires user approval before execution
Usage: "Deploy environment xyz" or "Deploy the latest version of my staging environment"
abort-environment
Forcefully stop a deployment that is already in progress.
Description: Forcefully stops the environment's latest deployment while it is in progress. If the deployment is still queued or waiting for user approval, use
cancel-environmentinstead.Parameters:
environmentId(required): The environment ID to abort
Usage: "Abort the running deployment of environment xyz"
approve-environment
Approve an environment plan, pending approval for applying.
Description: Approve an environment plan, pending approval for applying.
Parameters:
environmentId(required): The environment ID to approve
Usage: "Approve environment xyz"
cancel-environment
Cancel a deployment that has not started running yet.
Description: Cancels the environment's latest deployment while it is still queued or waiting for user approval, before any changes are applied. If the deployment is already in progress, use
abort-environmentinstead.Parameters:
environmentId(required): The environment ID to cancel
Usage: "Cancel the pending deployment of environment xyz"
get-plan-logs
Retrieve Terraform/OpenTofu plan logs (or any other IaC's dry runs results) for an environment.
Description: Get plan logs for a specific environment from env0
Parameters:
environmentId(required): The environment ID to get logs for
Note: For full plan details, see the env0 console
Usage: "Show me the plan logs for environment xyz"
get-error-analysis
Analyze errors from the last environment deployment.
Description: Analyzes errors in the last environment's deployment
Parameters:
environmentId(required): The environment ID to analyze errors for
Usage: "Analyze errors for environment xyz" or "What went wrong with my last deployment?"
search-deployments
Find recent deployments for an environment, optionally filtered by status.
Description: List an environment's deployments, newest first, to pick a
deploymentLogIdforget-deployment-contextParameters:
environmentId(required): The environment to list deployments forstatuses(optional): Comma-separated statuses to filter by, e.g.FAILURE,SUCCESS,IN_PROGRESS,CANCELLED,ABORTED,WAITING_FOR_USER,TIMEOUTlimit(optional): Maximum deployments to return. Defaults to 10, max 25offset(optional): Number of deployments to skip. Prefer filtering withstatuses
Returns: Each deployment's ID, status, type, timestamps, trigger, comment, resource count, template revision and type, PR number, git metadata, plan summary and failed command.
hasMoreistruewhen another page exists.Note: For the latest deployment alone, use
get-plan-logsorget-error-analysis; they need no ID.Usage: "Show me the failed deployments of environment xyz" or "List the last 5 deployments of my staging environment"
get-deployment-context
Fetch full debug context for one specific (historical) deployment: metadata, all step statuses, and the log of the first failed step (status FAIL or TIMEOUT). When no step failed and no stepName is given, log is null.
Description: Debug a past deployment by ID — metadata + steps + failed step log
Parameters:
deploymentLogId(required): The deployment to inspect. Usesearch-deploymentsfirst to find one.stepName(optional): Inspect a specific step (e.g.,tf:plan,tf:apply,tf:destroy). Omit to get the first failed step. Pass it to read a step of a successful deployment. A step that has not started returns an error.
Note: For the latest deployment's plan log, prefer
get-plan-logs(no ID needed). For an error summary, preferget-error-analysis.Usage: "Why did the deployment from yesterday on env X fail?" → chain via
search-deploymentsthen this tool.
get-cloud-configurations
Retrieve cloud configurations from Env0's Cloud Compass.
Description: Get the compass cloud configurations
Parameters: None required
Usage: "Show me my cloud configurations"
get-cloud-resources
Retrieve cloud resources with advanced filtering capabilities.
Description: Get cloud resources from env0
Parameters: Complex filtering options including:
filters(required): Object with various filter options:cloudProvider: Filter by cloud provider (AWS, GCP, AzureLAW)cloudConfigurationId: Filter by cloud configuration IDenvironmentId: Filter by environment IDresourceId: Filter by resource IDname: Filter by resource nametype: Filter by resource typeregion: Filter by regionservice: Filter by servicemanagementType: Filter by management typedriftStatus: Filter by drift statusseverity: Filter by severity (High, Medium, Low, Optimal, Ignored, Reset)searchBy: General search term
paging: Pagination options (limit, offset)orderBy: Sorting options
Usage: "Show me all AWS resources" or "Find resources with high severity drift"
generate-iac
Generate Infrastructure as Code (Terraform/OpenTofu) from existing cloud resources.
Description: Generate Infrastructure as Code (IaC) for cloud resources
Parameters:
cloudResourceIds(required): Array of cloud resource IDs to generate IaC foriacType(required): Type of IaC to generate ("OpenTofu" or "Terraform")
Returns: Job ID for tracking progress
Usage: "Generate Terraform code for these resources" or "Create OpenTofu configuration for resource xyz"
check-iac-job-status
Monitor the progress of IaC generation jobs.
Description: Check the status and retrieve results of an Infrastructure as Code generation job
Parameters:
jobId(required): Job ID returned from generate-iac request
Note: Jobs can take up to around 1 minute to complete
Usage: "Check the status of job abc123" or "Is my IaC generation ready?"
💡 Usage Examples
Here are some example natural language queries you can use with the MCP server:
Project & Environment Management:
"Show me all my projects"
"List environments in project xyz"
"Get details for environment abc123"
"Do I have any environments in project xyz that require my attention?"
Deployments:
"Deploy my staging environment"
"Deploy environment xyz with comment 'hotfix deployment'"
"Abort the running deployment for environment xyz"
Monitoring:
"Show me the plan logs for my production environment"
"What's the status of environment abc123?"
"Analyze errors for environment xyz" or "What went wrong with my last deployment?"
"Why did the deployment from yesterday on env xyz fail?" (chains
search-deployments→get-deployment-context)"Show me the apply log for deployment abc123"
Cloud Resources:
"Show me all my AWS resources"
"Find resources with drift issues"
"List all S3 buckets in us-east-1 in AWS account xyz"
"Generate Terraform code for resource xyz from AWS account xyz"
"Check if my IaC generation job is complete"
For Development of the MCP Server
To set up the development environment and test the server:
Clone and install dependencies:
git clone <repository-url> cd mcp-server npm installRun the server:
npm startTest with MCP Inspector:
Use the MCP Inspector tool for testing and debugging:
npx @modelcontextprotocol/inspector npx tsx src/cli.tsThis will open a web interface at http://localhost:6274 where you can interact with the MCP server and test its capabilities.
Authentication
To allow the MCP server to connect to Env0's platform, you need to provide your API credentials. To create a new API key, please follow (this guide)[https://docs.env0.com/docs/api-keys]
Once you have your API credentials, you can configure them in the MCP server by setting the following environment variables:
export ENV0_API_KEY="your-api-key-id"
export ENV0_API_SECRET="your-api-key-secret"
export ENV0_ORGANIZATION_ID="your-organization-id"You can also create a .env file like our example .env.example and fill in the values:
# Required: Your env0 API Key ID (Get this from the Env0 site using the guide above)
ENV0_API_KEY=your-api-key-id-here
# Required: Your env0 API Key Secret (Get this from the Env0 site using the guide above)
ENV0_API_SECRET=your-api-key-secret-here
# Your env0 Organization ID (found in your env0 organization settings). This is required if you have multiple organizations
ENV0_ORGANIZATION_ID=your-organization-id-hereDocker Configuration
The env0 MCP server supports Docker deployment, making it easy to run in containerized environments and integrate with MCP clients.
Building the Docker Image
Build the Docker image:
docker build -t env0/mcp-server .Test the container:
docker run --rm -e ENV0_API_KEY=your-api-key -e ENV0_API_SECRET=your-api-secret -e ENV0_ORGANIZATION_ID=your-org-id env0/mcp-server
Docker Transport Modes
The container supports both MCP transport modes:
1. Stdio Transport (Default)
Used by most MCP clients (Claude Desktop, Windsurf)
Communication via stdin/stdout
Use
-iflag for interactive mode
2. HTTP Transport
For remote MCP server access
Set
MCP_TRANSPORTenvironment variable tohttpto enable
docker run -d -p 3000:3000 -e PORT=3000 -e MCP_TRANSPORT=http -e ENV0_API_KEY=your-api-key-here -e ENV0_API_SECRET=your-api-secret-here -e ENV0_ORGANIZATION_ID=your-org-id-here env0/mcp-serverThen, configure your MCP client to use the HTTP transport mode:
{
"mcpServers": {
"env0": {
"serverUrl": "http://localhost:3000/mcp"
}
}
}Available Tools
14 toolsabort-environmentAbort EnvironmentA
Forcefully stop an environment's latest deployment while it is in progress. To cancel a deployment that is still queued or waiting for user approval, use cancel-environment instead.
Inputs: environmentId (required).
approve-environmentApprove EnvironmentC
Approve an environment
Inputs: environmentId (required).
cancel-environmentCancel EnvironmentA
Cancel an environment's latest deployment while it is still queued or waiting for user approval. No changes are applied. To stop a deployment that is already in progress, use abort-environment instead.
Inputs: environmentId (required).
check-iac-job-statusCheck IaC Job StatusA
Check the status and retrieve results of an Infrastructure as Code generation job. Use this tool after calling generate-iac to monitor progress and get results. Could take up to around 1 minute to get results.
Inputs: jobId (required).
deploy-environmentDeploy EnvironmentA
This tool creates a new deployment for an existing env0 environment. You can use the "get-environments" or "get-environment" tool to find the environment ID of the environment you are looking for. This action ALWAYS requires approval from the user before execution.
Inputs: environmentId (required), comment, revision.
generate-iacGenerate Infrastructure as CodeA
Generate Infrastructure as Code (IaC) for cloud resources. This tool initiates a long-running job and returns a job ID for tracking progress.
Inputs: iacType (required), cloudResourceIds (required).
get-cloud-configurationsGet Cloud ConfigurationsC
Get the compass cloud configurations
Inputs: no named parameters.
get-cloud-resourcesGet Cloud ResourcesC
Get cloud resources from env0
Inputs: filters (required), paging, orderBy.
get-deployment-contextGet Deployment ContextA
Fetch debug context for one specific deployment: metadata, all step statuses, and the log of the first failed step (auto-picked: status FAIL or TIMEOUT). Returns log:null on clean success — pass an explicit stepName to inspect a successful step.
Use when: user asks why a past deployment failed, names a deploymentLogId, or wants to inspect a specific step (apply, destroy, custom flow) of a historical deployment.
Do NOT use for the latest deployment's plan log — use get-plan-logs (no deploymentLogId needed, cheaper). For an error summary use get-error-analysis.
deploymentLogId is REQUIRED. Use search-deployments first to find one.
Returns { deployment, steps, log }. log is { stepName, events, truncated } or null when no failed step exists and no stepName was given. Step names look like 'tf:plan', 'tf:apply', 'opentofu:plan', 'terragrunt:plan', 'pulumi:preview', 'helm:diff', 'k8s:apply', 'git:clone', 'spec:load'. Targeting a NOT_STARTED step returns 400.
Example chain: search-deployments(envId, statuses="FAILURE") → get-deployment-context(deploymentLogId=)
Inputs: deploymentLogId (required), stepName.
get-environmentsGet EnvironmentsD
Get the environments from env0
Inputs: name, limit, offset, projectId, +1 more.
get-error-analysisGet Error AnalysisA
Analyzes errors in the latest deployment of an environment. For historical deployments use get-deployment-context instead.
Inputs: environmentId (required).
get-plan-logsGet Plan LogsA
Get plan logs for the latest deployment of a specific environment from env0. For historical deployments use get-deployment-context instead. For full plan see env0 console.
Inputs: environmentId (required).
get-projectsGet ProjectsC
Get the projects from env0
Inputs: no named parameters.
search-deploymentsSearch DeploymentsA
Find recent deployments for an environment, optionally filtered by status. Use this to pick a deploymentLogId for follow-up debug via get-deployment-context.
Use when: user asks for deployment history, wants to find a failed deployment, or needs to pick among multiple recent deployments.
Do NOT use for the latest deployment alone — get-plan-logs or get-error-analysis already cover that without needing an ID.
Returns up to 10 deployments by default (raise limit to 25 max). Sorted newest-first. Each entry includes: id, status, type, queuedAt, startedAt, finishedAt, triggerName, comment, resourceCount, blueprintRevision, blueprintName, blueprintType, prNumber, gitMetadata, planSummary, failedCommand. Set hasMore=true means another page exists.
Prefer filtering via 'statuses' over paging with 'offset'.
Inputs: environmentId (required), limit, offset, statuses.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 14 tools
Most tools have distinct, well-documented purposes, with cancel-environment/abort-environment and get-plan-logs/get-error-analysis/get-deployment-context explicitly differentiated in their descriptions. The only fuzzy pair is get-cloud-resources vs get-cloud-configurations, whose boundary is not clearly explained.
All 14 tools follow a consistent verb_noun pattern in kebab-case (get-plan-logs, search-deployments, cancel-environment, generate-iac, etc.), with predictable verbs like get/search/check/deploy/approve.
14 tools is well within the ideal range and each tool covers a distinct slice of the env0 domain (environments, deployments, projects, cloud resources, IaC generation), so no tool feels redundant or filler.
Coverage is read-heavy: environments and projects support get/deploy/cancel/abort/approve but there is no create/update/delete for environments or projects, and the deploy-environment description references a get-environment tool that is not present in the set. Core deployment-debug workflows are complete, but lifecycle CRUD has notable gaps.
Maintenance
Related MCP Connectors
Provides capabilities that let LLM agents perform a range of infrastructure management tasks.
Plan Salesforce deploys, open pull requests and trigger pipelines from your AI client.
Unified API to query AWS, GCP, Azure and generate Terraform/CLI execution kits for AI agents.
Manage platform201 projects, environments, blueprints and deployment graphs from your AI assistant.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables AI assistants to interact with Terraform Cloud workspaces and runs, including checking run status, listing workspaces, and retrieving detailed information about workspaces and runs.4MIT
- AlicenseNot gradedqualityDmaintenanceProvides AI agents with natural language control over AWS, Azure, GCP, and Alibaba Cloud infrastructure through dynamic API discovery and execution. Supports 51,900+ cloud operations and includes OpenTofu integration for complete infrastructure lifecycle management.3MIT
- AlicenseNot gradedqualityDmaintenanceEnables managing and deploying apps to your cloud directly from Cursor through natural language, including environment management, job monitoring, and approval workflows.1MIT
- AlicenseNot gradedqualityCmaintenanceEnables LLM clients to inspect and query your own GCP and AWS infrastructure, including BigQuery/Athena, CI build systems, container/serverless runtimes, and their logs through configurable environments.MIT