The @pulumi/mcp-server provides a Model Context Protocol (MCP) interface for programmatic interaction with Pulumi operations. With this server, you can:
Preview infrastructure changes: Run
pulumi previewon a specific stack using thepulumi-cli-previewcommandDeploy infrastructure: Execute
pulumi upto deploy changes using thepulumi-cli-upcommandRetrieve stack outputs: Get output values from a specified stack
Access resource information: Get detailed information about specific Pulumi Registry resources
List available resources: View all resource types for a given provider and module
Docker support: Run as a container to avoid direct dependency installation
MCP client integration: Use with MCP clients like Claude desktop via
stdioor HTTP with Server-Sent Events
Supports running the MCP server in a Docker container, with the ability to mount local Pulumi project directories to perform operations on containerized Pulumi projects.
Allows retrieving information about Git-hosted Pulumi component resources from GitHub repositories, accessible through the get-resource and list-resources commands.
Enables programmatic interaction with Pulumi infrastructure as code, allowing operations like retrieving package information, previewing infrastructure changes, deploying stack updates, and retrieving stack outputs without requiring the Pulumi CLI in the client environment.
Pulumi MCP Server
The Pulumi MCP Server enables advanced Infrastructure as Code development capabilities for connected agents.
Features
Available Tools
Tool | Description |
| Browse available cloud resources to discover what infrastructure components can be deployed |
| Explore available provider functions for interacting with cloud resources |
| Get code examples and documentation for specific resources that can be deployed |
| Access examples of provider functions for usage in your Pulumi program |
| Get schema definitions needed to properly set up complex resource properties and types |
| Preview infrastructure changes before deployment, showing what resources will be created, updated, or deleted |
| Deploy infrastructure changes to the cloud, creating and updating resources as defined in your Pulumi program |
| Retrieve deployment outputs like URLs and resource IDs from your infrastructure stacks |
| Sync your Pulumi state with actual cloud resources to detect drift and manual changes |
| Discover, count, and analyze your deployed infrastructure across all cloud providers. |
| Interact with Pulumi Neo for advanced infrastructure tasks |
Available Prompts
Prompt | Description |
| Get step-by-step guidance for deploying already written applications to the cloud with Pulumi, including security and cost optimization tips |
Related MCP server: mcp-perplexity
Installation
Requirements
Pulumi CLI must be installed on the client machine
Docker (optional) - Required only for containerized deployment
Usage with Claude Code
For Claude Code, install the MCP server using:
Usage with Claude Desktop
For Claude Desktop, add the following configuration to your MCP config file:
Usage with VSCode
Create a file called .vscode/mcp.json in your workspace. Add the following section, and the MCP will become accessible to your assistant:
Alternatively, you can add the following to your user configuration and be able to use the MCP server everywhere. You can open the configuration by pressing Ctrl + Shift + P and typing Preferences: Open User Settings (JSON):
Devin
For Devin, you can set up the Pulumi MCP Server by:
Navigating to https://app.devin.ai/settings/mcp-marketplace/setup/pulumi
Providing your Pulumi access token, which can be obtained from the Access tokens section in the sidebar of the Pulumi dashboard
Clicking "Enable"
More about using the MCP server with other popular clients: Pulumi MCP Server Documentation.
Docker Installation
The Pulumi MCP Server can additionally be run as a Docker container, eliminating the need to install Node.js and package dependencies directly on your host machine.
Using the Official Image
Pull the official image built by Docker:
Building Locally
Or build the container with local changes:
Usage With Agents
STDIO Mode
Run the server in basic STDIO configuration:
With Local Project Access
For Pulumi CLI operations that require access to local projects and their files, mount the project directory:
Using with MCP Clients over HTTP
The Pulumi MCP server supports HTTP transport for web-based integrations. Since most MCP clients expect STDIO communication, you can use a transport bridge like supergateway to connect STDIO-based clients to HTTP servers.
Quick Start Script
Use the provided script to build and run the HTTP server:
This script builds the Docker image and starts the container in HTTP mode on port 3000.
Bridge Configuration for Claude Desktop
To connect Claude Desktop (which uses STDIO) to the HTTP server, copy the following configuration:
This configuration:
Runs the MCP bridge in a Docker container
Connects to your HTTP server using
host.docker.internal(Docker's host machine reference)Bridges STDIO ↔ HTTP communication
Handles session management automatically
Environment Variables
Variable | Description | Default | Required |
| Pulumi Cloud access token |
| For resource deployment & insights |
Notes:
When mounting local directories, reference the project as
/app/projectin your MCP tool requestsMount
~/.pulumito preserve Pulumi CLI configuration and credentialsAdd cloud provider credential volumes and environment variables as needed for your deployments
Development
Requirements
Node.js and npm
Pulumi CLI
Build Commands
Command | Description |
| Install dependencies |
| Build the project |
| Run all tests |
| Build using npm |
| Find and fix lint errors |
Quick Start
Clone the repository
Install dependencies:
make ensureBuild the project:
make buildTest the project:
make test
How to Install Locally
For local testing using Claude Code, you can use the provided scripts:
The install script will remove any existing pulumi-mcp-local installation and install the current version from your local directory. Optionally, you can provide a .tgz file created with npm pack to test the packaged version. Run Claude Code and type the /mcp command to see it.
For other MCP clients like Claude Desktop or Windsurf, you can manually configure the local server:
Replace /path/to/your/mcp-server with the absolute path to your local repository directory.
List existing tools
Use MCP Inspector to list the capabilities:
Note: This MCP server is actively evolving with new features being added regularly. While we strive to maintain compatibility, some API changes may occur as we improve it. Please file an issue on GitHub if you encounter bugs or would like to request support for additional Pulumi commands.
License
This project is licensed under the Apache-2.0 License. See the LICENSE file for details.