Exposed MCP Resources
Relevant source files
The following files were used as context for generating this wiki page:
- internal/server-plugins/app/domain/application.entity.go
- internal/server-plugins/core/domain/entities.go
- internal/server-plugins/deployment/domain/deployment.entity.go
- internal/server-plugin/domain/server-plugin.go
- internal/server-plugins/app/plugin.go
- internal/server-plugins/core/plugin.go
- internal/server-plugins/onboarding/plugin.go
- README.md
The Dokku MCP server exposes Dokku's management capabilities to AI agents through the Model Context Protocol (MCP). This is achieved via a plugin-based architecture where different modules of the server expose specific functionalities as Resources, Tools, and Prompts. This system allows an LLM to discover, understand, and interact with the Dokku instance in a standardized way.
The architecture is designed to be modular and extensible. Each feature set, such as application management or core system queries, is encapsulated within its own plugin. These plugins are registered dynamically, and their capabilities are exposed to the MCP client based on the server's configuration and the installed Dokku plugins.
Sources: README.md:5-8, internal/server-plugin/domain/server-plugin.go:8-15
Plugin Architecture
The server's functionality is organized into plugins that conform to a set of interfaces. A ServerPlugin is the base unit, providing metadata like ID, name, and description. Plugins can then implement provider interfaces to expose different types of capabilities.
ResourceProvider: Exposes read-only data endpoints (Resources).ToolProvider: Exposes callable functions that perform actions (Tools).PromptProvider: Exposes pre-defined prompt templates for the LLM.
Sources: internal/server-plugin/domain/server-plugin.go:8-27
This diagram illustrates the relationship between the plugin interfaces.
Core MCP Components
The MCP specification is implemented through three main capability types exposed by plugins.
Resources
Resources are read-only data structures identified by a URI. They are analogous to a GET request in a REST API, providing clients with information about the state of the system.
| URI | Plugin | Description |
|---|---|---|
dokku://onboarding/quickstart | onboarding | A markdown guide for getting started with the server's capabilities. |
dokku://onboarding/capabilities | onboarding | A JSON index of all available tools, resources, and prompts. |
dokku://onboarding/intent-map | onboarding | A JSON map of common user intents to specific tools. |
dokku://apps/list | apps | A JSON list of all Dokku applications and their status. |
dokku://core/server/info | core | Comprehensive JSON data about the server, including status, plugins, and config. |
dokku://core/plugins | core | A JSON list of all installed Dokku plugins. |
dokku://domains/report | domain | A JSON report of all configured domains in Dokku. |
Sources: internal/server-plugins/onboarding/plugin.go:34-54, internal/server-plugins/app/plugin.go:62-69, internal/server-plugins/core/plugin.go:76-95, internal/server-plugins/domain/plugin.go:37-44
Tools
Tools are functions that can be called by the MCP client to perform actions or mutations on the server. They are defined with a name, description, and a schema for their parameters.
The diagram below shows the sequence of a create_app tool call.
Prompts
Prompts are pre-defined templates that guide an LLM in performing complex tasks. They typically consist of a user message that instructs the model on what information to gather and how to reason about it.
An example is the app_doctor prompt, which helps diagnose application health.
Sources: internal/server-plugins/app/plugin.go:88-95, internal/server-plugins/app/plugin.go:338-359
Exposed Capabilities by Plugin
Onboarding Plugin
The onboarding plugin is designed to make the server's capabilities discoverable to an LLM. It does not depend on any Dokku plugin and is always active.
dokku://onboarding/quickstart: A markdown document that provides a high-level overview of available tools and common workflows.dokku://onboarding/capabilities: A JSON resource that programmatically lists all active tools, resources, and prompts. This allows an agent to discover what it can do.dokku://onboarding/intent-map: A JSON resource that maps generic user intents (e.g., "deploy", "scale") to the specific tools available on the server.
The Intent Map helps the LLM translate natural language goals into concrete tool calls.
| Intent | Synonyms | Tool | Parameters |
|---|---|---|---|
deploy | release, ship, publish | deploy_app | app_name, repo_url, git_ref |
scale | autoscale, increase instances | scale_app | app_name, process_type, instances |
status | health, state, check app | get_app_status | app_name |
configure | set env, secrets | configure_app | app_name, config |
create | new app, provision | create_app | name, buildpack |
Sources: internal/server-plugins/onboarding/plugin.go:29-138
Core Plugin
The core plugin provides access to server-wide information and functionality.
- Resource
dokku://core/server/info: This is a comprehensive endpoint that aggregates data from multiple Dokku commands to provide a complete snapshot of the server's state. - Resource
dokku://core/plugins: Lists all installed Dokku plugins, their versions, and status (enabled/disabled). - Tool
get_server_logs: An optional tool (enabled byexpose_server_logs: true) that returns recent logs from the MCP server's in-memory ring buffer.
The following diagram shows the data aggregation process for the server/info resource.
App Plugin
The apps plugin is the most extensive, providing full lifecycle management for applications.
- Resource
dokku://apps/list: Returns a JSON array of all applications, including their name, state, and deployment status. - Tools: A suite of tools for managing applications.
| Tool | Description | Key Parameters |
|---|---|---|
create_app | Create a new Dokku application. | name (required), buildpack |
deploy_app | Deploy an application from a Git repository. | app_name (required), repo_url (required), git_ref |
scale_app | Scale application processes. | app_name (required), instances (required), process_type |
configure_app | Set environment variables for an application. | app_name (required), config (required, object) |
get_app_status | Get comprehensive status for a single application. | app_name (required) |
- Prompt
app_doctor: A diagnostic prompt that guides the LLM to check an application's status, logs, and configuration to identify problems.
Sources: internal/server-plugins/app/plugin.go:57-359
Core Domain Entities
The system is built around a few core domain entities that are manipulated and exposed by the plugins.
This diagram shows the relationship between an Application and its Deployments, along with the standalone System Status entity.
Sources: internal/server-plugins/app/domain/application.entity.go:21-34, internal/server-plugins/deployment/domain/deployment.entity.go:21-31, internal/server-plugins/core/domain/entities.go:10-16
Conclusion
The Dokku MCP server exposes a rich set of resources, tools, and prompts through a modular plugin architecture. This allows AI agents to perform complex management tasks on a Dokku instance, from simple status checks to full application deployment and scaling. The onboarding plugin ensures these capabilities are discoverable, while plugins like core and apps provide the concrete functionality, creating a powerful and extensible platform for AI-driven PaaS management.
Sources: README.md:5-8, internal/server-plugin/domain/server-plugin.go