# Pulumi MCP

> Pulumi connects your agent directly to your infrastructure state. Use this MCP to list organizations, manage stacks (create, delete), track deployment history, inspect outputs like IPs and URLs, and add tags—all via natural conversation.

## Overview
- **Category:** loved-by-devs
- **Price:** Free
- **Tags:** infrastructure-as-code, cloud-deployment, automation, stack-management, cloud-native, api-integration

## Description

You can connect your agent to Pulumi and take full control of your cloud infrastructure from a chat window. Instead of logging into the console to check status or grab an endpoint URL, you just ask for it. Your AI client acts like a dedicated DevOps engineer right in your chat interface, giving you immediate visibility into everything. Need to know which stacks exist? You can list them instantly. Did the last deployment succeed? Check the history and see exactly what changed. The power of Vinkius makes this possible; your agent accesses this full catalog of infrastructure tools so you don't have to switch context or copy-paste commands anymore.

## Tools

### create_stack
This tool creates a new, isolated instance of your infrastructure program for testing or staging environments.

### delete_stack
It permanently deletes an entire stack and all resources associated with it. Use this with caution.

### get_current_user
This tool verifies your identity by retrieving the GitHub login, email, and avatar URL for API logging purposes.

### get_deployment
Retrieves specific details about a single deployment using its version number and stack name.

### get_organization
Fetches high-level information and settings for an entire Pulumi organization by its slug.

### get_stack_outputs
This tool collects all values your program exported during the last deployment, such as URLs or resource IDs.

### get_stack
Provides detailed information about a specific stack, including its status and core configuration.

### list_deployments
You can see the complete history of deployments for a stack, tracking who ran it and if it succeeded or failed.

### list_stack_tags
Lists all key-value metadata labels currently applied to a specific stack.

### list_stacks
Retrieves a list of every isolated stack within your Pulumi organization, showing their last update time and resource count.

### set_stack_tag
This tool applies or updates organizational tags (like setting the environment to 'production') on any given stack.

## Prompt Examples

**Prompt:** 
```
Show me all stacks in my organization.
```

**Response:** 
```
I found 6 stacks in your organization: 'my-infra/dev' (last updated 2h ago, 24 resources), 'my-infra/staging' (last updated yesterday, 24 resources), 'my-infra/prod' (last updated 3 days ago, 24 resources), 'networking/prod' (last updated last week, 8 resources), 'database/dev' and 'database/prod' (both created but never updated).
```

**Prompt:** 
```
What was the result of the latest deployment to my-infra/prod?
```

**Response:** 
```
The latest deployment (v12) to my-infra/prod succeeded 3 days ago. It created 2 resources (new S3 bucket and CloudFront distribution), updated 1 resource (EC2 instance type changed) and left 21 unchanged. The deployment took 4 minutes and was triggered by user alice.
```

**Prompt:** 
```
Show me the exported outputs from the prod stack.
```

**Response:** 
```
The prod stack exports the following outputs: `api_url: https://api.example.com`, `cdn_url: https://cdn.example.com`, `db_endpoint: postgres://db.example.com:5432`, `s3_bucket_arn: arn:aws:s3:::my-prod-bucket` and `vpc_id: vpc-0abc123`. Would you like details on any of these?
```

## Capabilities

### View infrastructure structure
The MCP allows you to list all stacks within an organization, giving you a quick map of your deployed environments.

### Audit deployment history
You can review the full stack update history for any project, seeing which resources changed and who triggered the deployment.

### Retrieve live resource details
Get specific information about a stack or organization, such as member lists or key configuration settings.

### Access exported outputs
Fetch critical values from the latest deployment, including API URLs, IP addresses, and resource IDs needed for other services.

### Manage stack metadata
Set or list custom tags on stacks (like environment=prod or team=platform) to keep your infrastructure organized and searchable.

## Use Cases

### Debugging a failed deployment
A developer notices an endpoint is down. They ask their agent to list_deployments for the 'api' stack, find the failure version, and then use get_stack_outputs to see what resources were provisioned right before the crash.

### Onboarding a new team member
A platform architect needs to show a new hire all available environments. They simply ask the agent to list_stacks, which returns every stack name and its last update time without needing manual navigation through project folders.

### Preparing for compliance audit
The ops engineer must prove that all production stacks are correctly tagged. They use list_stack_tags to confirm tags like 'environment=prod' and then set_stack_tag if any critical tag is missing.

### Finding a database connection string
A backend developer needs the DB endpoint for staging. Instead of querying the console, they ask the agent to get_stack_outputs on the 'staging' stack and instantly receive the required `db_endpoint`.

## Benefits

- Stop jumping between tabs. You can list all stacks or audit deployment history instantly by asking your agent, eliminating manual dashboard checks.
- Never lose an endpoint URL again. Use the MCP to get_stack_outputs and pull critical IPs, URLs, and connection strings from any successful deployment in one go.
- Keep track of who did what and when. Reviewing the full stack update history via list_deployments gives you a non-repudiable audit trail for compliance or debugging.
- Better organization means better governance. You can use set_stack_tag to apply mandatory metadata (like cost centers) across dozens of environments at once.
- Get context fast. Instead of digging into documentation, simply ask the MCP to get_organization details and immediately understand your infrastructure scope.

## How It Works

The bottom line is you get to manage complex cloud operations using simple conversation instead of clicking through multiple dashboards.

1. First, subscribe to the Pulumi MCP on Vinkius and enter your Pulumi Access Token.
2. Second, prompt your agent with a natural language request (e.g., 'Show me all dev stacks in the finance project').
3. Third, your AI client executes the necessary tool calls and returns structured data—like stack names or deployment status—directly into the chat.

## Frequently Asked Questions

**How do I check if my Pulumi stack is configured correctly using the Pulumi MCP?**
You use list_stack_tags to see what metadata labels are applied. You can also get_organization details to verify settings at the top level.

**Can I find out which user ran a specific deployment on my stack using Pulumi MCP?**
Yes, list_deployments shows the full history for your stack and includes the name of the user who triggered each deployment event.

**What is the difference between get_stack and get_organization in the Pulumi MCP?**
get_organization provides details about the top-level container (the whole company setup), while get_stack gives you granular info on one isolated environment within that organization.

**Does the Pulumi MCP let me create a new infrastructure stack?**
Yes, the create_stack tool allows your agent to provision a brand-new, isolated instance of your infrastructure program for testing or staging use.

**How do I retrieve exposed URLs from my deployed services using Pulumi MCP?**
You call get_stack_outputs. This tool collects all values the code exported during deployment, including IPs and external-facing URLs.