@pulumi/mcp-server
OfficialThe @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.
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., "@@pulumi/mcp-server preview my infrastructure changes before deploying"
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.
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:
claude mcp add -s user pulumi -- npx @pulumi/mcp-server@latest stdioUsage with Claude Desktop
For Claude Desktop, add the following configuration to your MCP config file:
{
"mcpServers": {
"pulumi": {
"command": "npx",
"args": ["@pulumi/mcp-server@latest", "stdio"]
}
}
}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:
{
"servers": {
"pulumi": {
"command": "npx",
"args": ["@pulumi/mcp-server@latest", "stdio"]
}
}
}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):
{
"mcp": {
"servers": {
"pulumi": {
"command": "npx",
"args": ["@pulumi/mcp-server@latest", "stdio"]
}
}
}
}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:
docker pull mcp/pulumi:latestBuilding Locally
Or build the container with local changes:
docker build -t pulumi/mcp-server:latest .Usage With Agents
STDIO Mode
Run the server in basic STDIO configuration:
{
"mcpServers": {
"pulumi": {
"command": "docker",
"args": [
"run", "-i", "--rm",
"-e", "PULUMI_ACCESS_TOKEN=your-access-token",
"mcp/pulumi:latest", "stdio"
]
}
}
}With Local Project Access
For Pulumi CLI operations that require access to local projects and their files, mount the project directory:
{
"mcpServers": {
"pulumi": {
"command": "docker",
"args": [
"run", "-i", "--rm",
"-v", "~/projects/my-pulumi-app:/app/project",
"-e", "PULUMI_ACCESS_TOKEN=your-access-token",
"mcp/pulumi:latest", "stdio"
]
}
}
}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:
./scripts/docker-run-http.shThis 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:
{
"mcpServers": {
"pulumi": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"supercorp/supergateway",
"--streamableHttp",
"http://host.docker.internal:3000/mcp"
]
}
}
}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:
# Build the project
npm run build
# Install the MCP server locally for testing
./scripts/install-mcp.sh
# Or install from a packed .tgz file (created with npm pack)
npm pack
./scripts/install-mcp.sh pulumi-mcp-server-0.1.2.tgz
# Remove the local installation
./scripts/uninstall-mcp.shThe 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:
{
"mcpServers": {
"pulumi-mcp-local": {
"command": "node",
"args": ["/path/to/your/mcp-server/dist/index.js", "stdio"]
}
}
}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:
# List tools and their metadata
npm run inspector -- --method tools/list
# List prompts and their metadata
npm run inspector -- --method prompts/listNote: 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.
Available Tools
5 toolspulumi-cli-previewC
Run pulumi preview for a given project and stack
Inputs: workDir (required), stackName.
pulumi-cli-stack-outputC
Get the output value(s) of a given stack
Inputs: workDir (required), outputName, stackName.
pulumi-cli-upC
Run pulumi up for a given project and stack
Inputs: workDir (required), stackName.
pulumi-registry-get-resourceB
Get information about a specific resource from the Pulumi Registry
Inputs: provider (required), resource (required), module.
pulumi-registry-list-resourcesB
List all resource types for a given provider and module
Inputs: provider (required), module.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool has a clearly distinct purpose with no ambiguity: pulumi-cli-preview, pulumi-cli-up, and pulumi-cli-stack-output handle different CLI operations for project/stack management, while pulumi-registry-get-resource and pulumi-registry-list-resources focus on distinct registry lookup tasks. The descriptions reinforce these boundaries, making misselection unlikely.
All tool names follow a consistent pattern: they start with 'pulumi-' followed by a hyphen-separated domain (cli or registry) and a specific action (e.g., preview, up, get-resource). This predictable structure enhances readability and agent usability without any deviations or mixed conventions.
With 5 tools, the count is reasonable and well-scoped for a Pulumi MCP server, covering core CLI operations and registry lookups. It's slightly lean but not insufficient, as each tool earns its place; minor additions like stack management or config tools could enhance it, but it's not a significant gap.
The tool set covers key Pulumi workflows: preview, up, and stack outputs for deployment, plus registry resource lookups. Minor gaps exist, such as missing tools for stack management (e.g., create/delete) or config operations, but agents can likely work around these with the provided tools for basic infrastructure-as-code tasks.
Related MCP Connectors
An MCP server that let you interact with Cycloid.io Internal Development Portal and Platform
Official xCloud MCP: manage servers, sites, WordPress, SSL, backups and deploys from any MCP client.
Related MCP Servers
- AlicenseCqualityDmaintenanceEasily find MCP servers using our MCP registry. Search with natural language.16MIT
- AlicenseNot gradedqualityDmaintenanceMCP Server for the Perplexity API.24 PyPI66MIT
- MIT
- AlicenseNot gradedqualityBmaintenanceOfficial MCP server for configuring Litmus instances.13MIT