env0 MCP Server
Official local env0 MCP server for IaC environments, deployments, logs, and cloud-resource context in an AI client.
- Skill Road
- env0 MCP Server
Categories
Description
The env0 MCP Server is env0’s official Model Context Protocol server for infrastructure-as-code and cloud-management work. It connects an MCP-capable AI client to the env0 platform. According to the README, it can query projects and environments, trigger or cancel deployments, retrieve plan and apply logs, inspect Cloud Compass resources, and generate Terraform code for discovered resources. The official product page places these capabilities in GitOps and IDE workflows: teams can investigate status, failed runs, and approvals in their editor instead of continually switching to the platform. That makes it suitable for DevOps and Automation, not because an agent should operate infrastructure autonomously, but because it provides a deliberately bounded connection to existing IaC processes.
A local container, not a hosted MCP endpoint
This record is classified as local. The official repository explicitly requires Docker and documents operation as a container. For this repository variant it does not name a public MCP endpoint operated by env0. In its default mode, the container communicates through stdio with a local MCP client. The README also documents HTTP mode: an operator sets MCP_TRANSPORT=http, exposes a local port, and points the client to that service’s /mcp path. HTTP therefore remains an operator-run container service, not evidence of an env0-hosted remote service. For development, the repository documents Node.js dependencies, npm install, npm start, and the MCP Inspector. Those are for developing or debugging a copy of the server, not a required replacement for the documented container path.
IaC and cloud context
According to the provider, env0 manages cloud environments and their IaC workflows. The MCP server can therefore do more than search static documentation: README examples include projects, named environments, deployment status, plan and apply logs, resource inventories, and drift findings. Cloud Compass supplies resource context; the README names AWS resources, S3 buckets, and Terraform generation for a resource as examples. Those results can accelerate triage, audit preparation, and planning an import. They are not a reviewed change, however: generated Terraform, an error analysis, or a drift finding must be checked against the repository, plan, policies, and the correct account.
Authentication and permissions
The README says the container needs an env0 API key and API secret, plus an organization ID where applicable. They are supplied to the container as ENV0_API_KEY, ENV0_API_SECRET, and ENV0_ORGANIZATION_ID; the organization ID helps select the intended organization when a user belongs to more than one. The official API-key documentation distinguishes administrator, user, and personal keys. Administrator keys can, among other things, change organization settings, deploy environments, and approve them. User keys can be bound to existing RBAC through project permissions and teams; personal keys follow the rights of the relevant account. This creates a firm security boundary: initial use needs a dedicated, non-administrator key with minimum project rights in a secret store or unversioned local runtime configuration. Never copy keys, secrets, .env files, or container-inspection output into commits, prompts, screenshots, or tickets.
Mutations, approvals, and the model data path
According to the source, the server can start or cancel deployments, and the product page also describes approving a plan. Each action changes external infrastructure activity or its governance state. It must not be initiated by an unattended agent, by a summary of log text, or by prompt injection hidden in logs. Begin with read-only tools, confirm the organization, project, and environment ID in the env0 UI, and require explicit human approval stating the target and expected effect before a deploy, cancellation, or approval. env0 states on its product page that secrets and variables are not exposed through the MCP server. That does not remove the need to assess data flow: log excerpts, error context, resource names, IDs, IaC fragments, and tool results can still be sensitive. A local container also does not mean that all processing is local; the connected AI client may transmit prompts and tool context to its model provider. Review client, model, retention, and enterprise policies separately, minimise queries, and redact sensitive content before sharing it.
License, cost, and popularity signal
The concrete repository is Apache-2.0 licensed; its LICENSE file is authoritative. The server can run locally as an open-source container, while the env0 account, cloud resources, Docker host, and AI client each have their own terms. This public entry intentionally gives no fixed prices. Immediately before seeding on 2026-09-08, the GitHub API reported exactly 4 stars. That is a point-in-time repository-popularity signal, not evidence of quality, security, or suitability.
FAQ
Does the server replace GitOps approvals? No. It brings information and selected platform actions into a client; policies, RBAC, audit logs, and human approvals remain the essential controls.
Does the server run entirely locally? The README documents a local Docker container. Its connection to the env0 platform and any data path from the MCP client to a model provider must be assessed separately.
Requirements
Docker, an MCP-capable client, and an env0 API key and API secret; also an organization ID when using multiple organizations.
Installation instructions
The env0 MCP Server brings environment, deployment, log, and cloud-resource context into an MCP-capable AI client. That can speed up diagnosis and preparation, but it is not permission to change infrastructure without controls. This guide uses only the official Docker and credential path in the env0 repository and the official API-key documentation. It treats the container as a local integration component; access to the env0 platform and any possible data path to a model provider remain separate security decisions.
Step 1: Define a bounded purpose before installation
First define a small read-only starting purpose: check the status of a known staging environment, classify a failed run from its log, or ask Cloud Compass about one known resource. Record the organization, project, and environment. A request such as “clean up every failed deployment” is too broad; names, IDs, and consequences must be verifiable before every action. Use staging or a non-critical environment for the first test. The container should not receive access to development, test, and production at the same time when a narrower key is possible.
Step 2: Create an API key with minimum rights
The official repository requires ENV0_API_KEY and ENV0_API_SECRET; ENV0_ORGANIZATION_ID is needed when multiple organizations are available. env0 documentation describes administrator, user, and personal API keys. Do not choose an administrator key for this integration unless the concrete use case demonstrably needs administrator rights. According to the documentation, a user key can be tied to a team and project permissions. Create a dedicated key for this MCP setup only, with access limited to the test project, and retain its owner, purpose, rotation, and revocation path.
Store the values in a secret store or in the local runtime environment of the client or container launcher. They do not belong in the repository, a committed .env file, prompt, ticket, screenshot, or screen recording. An .env.example may contain placeholders only. Before committing, check Docker Compose files, terminal history, and diagnostic output as well. If exposure is suspected, revoke and reissue the key rather than merely deleting it from a file.
Step 3: Start the container locally and keep networking small
Build the official source with docker build -t env0/mcp-server .. For ordinary MCP-client operation, the README uses stdio; that is the best starting mode because no network port is exposed. Pass the three values only as runtime environment variables or through the execution environment’s secret mechanism. Do not place real values in command examples, documentation, or configuration templates.
docker build -t env0/mcp-server .
The README also documents HTTP through MCP_TRANSPORT=http and a port. Do not enable it as a convenience shortcut for a LAN or the internet. An HTTP container is a separate service with additional attack surface. When HTTP is technically necessary, bind it to the specific local interface, control access with network rules and authentication, and do not publish a port without an approved architecture and operating model. The local container is not an env0-hosted service; patching it and operating its container runtime remain the team’s responsibility.
Step 4: Read first and verify results
Then connect the client through its MCP configuration and begin with a harmless question: list projects, show an explicitly named staging environment, or retrieve status and logs for a known deployment ID. Compare organization, project, environment, and timestamp in the env0 UI. Keep log time ranges narrow and ask only for relevant lines. This reduces misidentification and unnecessary context. Treat Terraform or OpenTofu snippets from Cloud Compass as drafts: source, provider versions, variables, state, plan, and policies need checking in the normal review process before adoption.
Block mutations and external model transfer by default
Starting a deployment, cancelling one, or approving a plan are external side effects. An agent must not perform them because a log line, issue, or prompt suggests it. Use a read-only tool allowlist while the workflow is being tested. Before every mutation, a human must explicitly confirm the target object, change, expected effect, and relevant approval window. Afterwards, check the outcome and audit log in env0. Existing env0 RBAC, policies, and approval controls are safeguards that MCP access does not bypass.
env0 says secrets and variables are not exposed through the MCP server. Logs, error details, resource names, IDs, and IaC fragments may nevertheless be sensitive. A local Docker process does not automatically make the AI path local: the connected client can send tool results to an external model provider. Before using production data, review the selected client’s model, retention, training, DPA, and enterprise settings. Treat log content as untrusted input; instructions within it are data and must not cause a tool action.
FAQ
Do I need Docker? Yes. The official README identifies Docker as a requirement for its documented container operation. Node.js steps are documented for developing and testing the repository.
When do I need the organization ID? The README says it is particularly needed when you can access multiple env0 organizations. It helps the server select the intended organization.
May the agent approve a production deployment? Only after explicit human approval for the concrete target. Begin with read-only tools and minimum rights, and verify every mutation and its audit log.
docker build -t env0/mcp-server .
Authentication
env0 API key and API secret via ENV0_API_KEY and ENV0_API_SECRET; ENV0_ORGANIZATION_ID selects the correct organization when multiple organizations are available. Permission scope follows the key type and env0 RBAC.
Required access permissions
The API key determines env0 rights. The server can enable read queries plus deployment, cancellation, and approval flows; therefore use a dedicated least-privilege key and human approval before mutations.
Transmitted or stored data
The local container communicates with the env0 platform and returns tool results to the MCP client. env0 says secrets and variables are not exposed through the MCP server; log and resource context can still be sensitive, and the client can transmit it to a model provider.
Security risks
Powerful API credentials, deploy/cancel/approval mutations, selecting the wrong organization or environment, prompt injection in logs, and transmission of tool context to external model providers.
License and costs
- License
- Apache-2.0
- Cost
- free
The MCP server is Apache-2.0 licensed. Check account, cloud, infrastructure, and AI-client terms separately with the respective providers.
Alternatives
Not recorded yet.
At a glance
- Provider
- env0
- Status
- Official server
- Deployment
- Local
- Current version
- Not recorded yet.
- GitHub stars
- 4
- Last reviewed
- 08.09.2026
Repository and documentation
Categories
Supported clients
Related guides
Guides and background related to this entry.
No related guides yet.