# Dokku MCP for AI Agents AI Agent Connect

> Dokku lets you manage your self-hosted apps and container infrastructure directly through your AI agent. You can scale processes, check logs, and update environment variables without jumping between terminal tabs or SSH sessions. It puts your private cloud under your agent's control.

## Overview
- **Category:** loved-by-devs
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_4l81eUQDUiIsTQzod0jOLzrGv5gyZbaFCGJYUggR/ai-agent-connect
- **Tags:** container-orchestration, paas, self-hosted, deployment, server-management, environment-variables, log-streaming

## Description

Dokku connects your private infrastructure to your AI client so you can manage self-hosted applications without the overhead of a big cloud provider. Instead of hunting through terminal commands or multiple dashboards, you just tell your agent what needs to happen. If you need to see why a worker is hanging, you can ask for the logs. If you need to push a new API key, you can tell your agent to update the environment variables. It handles the heavy lifting of container orchestration while you stay in the flow of your actual work. Since Vinkius hosts this Connector, you can jump straight into managing your cluster from Claude or Cursor. It's about having your infrastructure react to your instructions in real-time, whether you're scaling up for a traffic spike or running a one-off database migration.

## Tools

### create_app
Provisions a new app boundary and sets up the necessary reverse-proxy hooks. Use it to prepare your infrastructure for a new codebase.

### destroy_app
Instantly shuts down running containers and removes DNS routing records. It completely deallocates an app from your host.

### get_logs
Streams stdout and stderr logs directly to your chat window. It's the fastest way to check for node backtraces or SQL errors.

### list_apps
Shows all self-hosted Git-push apps currently deployed on your host. It helps you keep track of what's running across your cluster.

### list_config
Extracts the environment variables and runtime inputs for a specific app. It's useful for checking SQL credentials or API tokens.

### ps_restart
Bounces your application containers to apply updates. It ensures zero downtime if you have multiple replicas running.

### ps_scale
Adjusts the number of replicas for your web or worker containers. You can spin them up or down based on traffic demand.

### set_config
Injects new environment variables into your running app. It triggers a rolling deployment so your changes take effect immediately.

### unset_config
Removes stale credentials or variables from your application config. It helps you keep your environment clean and secure.

### run_command
Launches a temporary container to run one-off tasks like database migrations. It keeps your production environment safe from manual errors.

## Prompt Examples

**Prompt:** 
```
List all apps on my Dokku host
```

**Response:** 
```
I found 3 apps: 'api-server', 'frontend-web', and 'worker-queue'. All containers are active and managed by the local Docker engine. Would you like to see the config for any of these?
```

**Prompt:** 
```
Scale the 'web' process of app 'api-server' to 3 replicas
```

**Response:** 
```
Scaling request sent! Dokku is now spooling up 3 replicas for the 'web' process of 'api-server'. I will notify you once the internal load balancer has updated the routing.
```

**Prompt:** 
```
Get the last 50 lines of logs for 'frontend-web'
```

**Response:** 
```
Retrieving logs for 'frontend-web'...

```text
[2026-07-10 16:05:21] ERROR: Database connection failed
[2026-07-10 16:05:22] Traceback (most recent call last):
  File "app.py", line 42, in get_data
    db.connect()
ConnectionError: Could not connect to host
```
The logs show a persistent connection error to the SQL database.
```

## Capabilities

### Scale web and worker replicas
Adjust the number of active containers for your web or background worker processes.

### Stream live application logs
Pull real-time stdout and stderr logs directly into your chat interface.

### Inject and remove environment variables
Update sensitive keys and runtime configurations without manual file editing.

### Run one-off commands in isolated containers
Execute database migrations or scripts in ephemeral containers away from production traffic.

### List all managed applications
Get a full overview of every self-hosted app currently deployed on your host.

### Provision new app boundaries
Set up new app environments and reverse-proxy hooks for new codebases.

### Remove old apps and DNS records
Deallocate apps and clean up associated DNS routing and container volumes.

## Use Cases

### Debugging a crashing worker
A developer needs to find out why a background task is failing. They ask the agent to pull the logs for the worker app using `get_logs` to see the stack trace.

### Handling a sudden traffic spike
A founder notices a surge in users. They tell the agent to use `ps_scale` to increase the web container count to 5 replicas to keep the site snappy.

### Rotating production API keys
An admin needs to swap out an expired token. They ask the agent to use `set_config` to update the variable and restart the app automatically.

### Running a safe database migration
A dev needs to update the schema. They ask the agent to use `run_command` to execute a specific rake task in an ephemeral container.

## Benefits

- Scale your infrastructure instantly using `ps_scale` to handle traffic spikes without manual CLI work.
- Debug crashes faster by using `get_logs` to see real-time errors without needing to SSH into your host.
- Update sensitive keys quickly with `set_config` to trigger rolling deployments that don't take your app offline.
- Run safe migrations using `run_command` to execute database scripts in isolated containers away from your web traffic.
- Manage your entire fleet at a glance with `list_apps` to see every active deployment in one simple list.
- Audit your environment variables with `list_config` to ensure all your secrets and runtime inputs are correct.

## How It Works

The bottom line is it turns your private PaaS into a conversational command center.

1. Subscribe to the Dokku MCP on Vinkius.
2. Provide your Dokku Host URL and API Token.
3. Start giving your agent commands to manage your apps.

## Frequently Asked Questions

**Can the Dokku MCP manage my self-hosted apps?**
Yes, it lets your agent list, scale, and restart your apps. It's a way to manage your own PaaS without the constant manual terminal work.

**How do I use Dokku MCP to check my app logs?**
You just ask your agent to show the logs for a specific app. It will pull the recent output from your containers so you can see errors immediately.

**Can Dokku MCP help with database migrations?**
Yes, it can run one-off commands in isolated containers. This is perfect for running migrations safely without affecting your live web traffic.

**Will Dokku MCP cause downtime when I update my app?**
No, it uses rolling deployments. When you update environment variables, it manages the container restart to keep your app online.

**Is Dokku MCP good for scaling my web traffic?**
It's great for that. You can tell your agent to increase the number of replicas for your web processes to handle more users instantly.

**How does Dokku MCP handle my environment variables?**
It can pull your current variables or inject new ones. This makes it easy to rotate secrets or change runtime settings on the fly.

**Can my agent scale my Dokku processes automatically?**
Yes. Use the 'ps_scale' tool. You can specify the application name and the target replica count for processes like 'web' or 'worker'. The agent will manipulate the explicit counts within your Dokku cluster instantly.

**How do I update environment variables via chat?**
Use the 'set_config' tool. Provide the app name, key, and value. The agent will inject the pair into the Docker environment mapping, which typically triggers a rolling deployment to apply the new configuration safely.

**Can I run database migrations through the agent?**
Absolutely. Use the 'run_command' tool. It boots an ephemeral isolated container cloning your production image, allowing you to run maintenance commands like 'rake db:migrate' or custom scripts without affecting live traffic.