nd-dokploy-mcp
v1.6.1
Published
MCP Server for Dokploy API
Maintainers
Readme
Dokploy MCP Server
Dokploy MCP Server exposes Dokploy functionalities as tools consumable via the Model Context Protocol (MCP). It allows MCP-compatible clients (e.g., AI models, other applications) to interact with your Dokploy server programmatically.
This server features a consolidated architecture with only 4 powerful tools that cover all 67+ Dokploy API operations, providing a clean and efficient interface for infrastructure management.
✨ Key Features
- 🚀 Consolidated Architecture: 4 powerful tools covering all Dokploy operations
- 🔒 Project Locking: Lock MCP instances to specific projects for multi-tenant setups
- 🎯 Tool Filtering: Load only the tools you need for specialized MCP instances
- ⚡ Bun Optimized: Built and optimized for the high-performance Bun runtime
- 🌐 Multi-Transport: Support for both stdio and HTTP transport modes
🛠️ Getting Started
Requirements
- Node.js >= v18.0.0 (or Docker)
- Cursor, VS Code, Claude Desktop, or another MCP Client
- A running Dokploy server instance
Install in Cursor
Go to: Settings -> Cursor Settings -> MCP -> Add new global MCP server
Add this to your Cursor ~/.cursor/mcp.json file. You may also install in a specific project by creating .cursor/mcp.json in your project folder. See Cursor MCP docs for more info.
{
"mcpServers": {
"dokploy-mcp": {
"command": "bunx",
"args": ["-y", "nd-dokploy-mcp"],
"env": {
"DOKPLOY_URL": "https://your-dokploy-server.com/api",
"DOKPLOY_API_KEY": "your-dokploy-api-token"
}
}
}
}{
"mcpServers": {
"dokploy-mcp": {
"command": "npx",
"args": ["-y", "nd-dokploy-mcp"],
"env": {
"DOKPLOY_URL": "https://your-dokploy-server.com/api",
"DOKPLOY_API_KEY": "your-dokploy-api-token"
}
}
}
}{
"mcpServers": {
"dokploy-mcp": {
"command": "deno",
"args": ["run", "--allow-env", "--allow-net", "npm:nd-dokploy-mcp"],
"env": {
"DOKPLOY_URL": "https://your-dokploy-server.com/api",
"DOKPLOY_API_KEY": "your-dokploy-api-token"
}
}
}
}Install in Windsurf
Add this to your Windsurf MCP config file. See Windsurf MCP docs for more info.
{
"mcpServers": {
"dokploy-mcp": {
"command": "bunx",
"args": ["-y", "nd-dokploy-mcp"],
"env": {
"DOKPLOY_URL": "https://your-dokploy-server.com/api",
"DOKPLOY_API_KEY": "your-dokploy-api-token"
}
}
}
}Install in VS Code
Add this to your VS Code MCP config file. See VS Code MCP docs for more info.
{
"servers": {
"dokploy-mcp": {
"command": "bunx",
"args": ["-y", "nd-dokploy-mcp"],
"env": {
"DOKPLOY_URL": "https://your-dokploy-server.com/api",
"DOKPLOY_API_KEY": "your-dokploy-api-token"
}
}
}
}{
"servers": {
"dokploy-mcp": {
"command": "npx",
"args": ["-y", "nd-dokploy-mcp"],
"env": {
"DOKPLOY_URL": "https://your-dokploy-server.com/api",
"DOKPLOY_API_KEY": "your-dokploy-api-token"
}
}
}
}Install in Zed
Add this to your Zed settings.json. See Zed Context Server docs for more info.
{
"context_servers": {
"dokploy-mcp": {
"command": {
"path": "npx",
"args": ["-y", "nd-dokploy-mcp"]
},
"settings": {
"DOKPLOY_URL": "https://your-dokploy-server.com/api",
"DOKPLOY_API_KEY": "your-dokploy-api-token"
}
}
}
}Install in Claude Desktop
Add this to your Claude Desktop claude_desktop_config.json file. See Claude Desktop MCP docs for more info.
{
"mcpServers": {
"dokploy-mcp": {
"command": "bunx",
"args": ["-y", "nd-dokploy-mcp"],
"env": {
"DOKPLOY_URL": "https://your-dokploy-server.com/api",
"DOKPLOY_API_KEY": "your-dokploy-api-token"
}
}
}
}Install in BoltAI
Open the "Settings" page of the app, navigate to "Plugins," and enter the following JSON:
{
"mcpServers": {
"dokploy-mcp": {
"command": "bunx",
"args": ["-y", "nd-dokploy-mcp"],
"env": {
"DOKPLOY_URL": "https://your-dokploy-server.com/api",
"DOKPLOY_API_KEY": "your-dokploy-api-token"
}
}
}
}Using Docker
The Docker container supports both stdio and HTTP transport modes, making it flexible for different deployment scenarios.
Build the Docker Image:
git clone https://github.com/Dokploy/mcp.git cd dokploy-mcp docker build -t dokploy-mcp .Manual Docker Commands:
Stdio Mode (for MCP clients):
docker run -it --rm \ -e DOKPLOY_URL=https://your-dokploy-server.com/api \ -e DOKPLOY_API_KEY=your_token_here \ dokploy-mcpHTTP Mode (for web applications):
docker run -it --rm \ -p 8080:3000 \ -e MCP_TRANSPORT=http \ -e DOKPLOY_URL=https://your-dokploy-server.com/api \ -e DOKPLOY_API_KEY=your_token_here \ dokploy-mcpDocker Compose:
Use the provided
docker-compose.ymlfor production deployments:# Start HTTP service docker-compose up -d dokploy-mcp-http # View logs docker-compose logs -f dokploy-mcp-httpMCP Client Configuration:
For stdio mode (Claude Desktop, VS Code, etc.):
{ "mcpServers": { "dokploy-mcp": { "command": "docker", "args": [ "run", "-i", "--rm", "-e", "DOKPLOY_URL=https://your-dokploy-server.com/api", "-e", "DOKPLOY_API_KEY=your_token_here", "dokploy-mcp" ] } } }For HTTP mode (web applications):
Start the HTTP server first, then configure your client to connect to
http://localhost:3000/mcp.
Install in Windows
The configuration on Windows is slightly different compared to Linux or macOS. Use cmd as the command wrapper:
{
"mcpServers": {
"dokploy-mcp": {
"command": "cmd",
"args": ["/c", "bunx", "-y", "nd-dokploy-mcp"],
"env": {
"DOKPLOY_URL": "https://your-dokploy-server.com/api",
"DOKPLOY_API_KEY": "your-dokploy-api-token"
}
}
}
}Environment Variables
Required
DOKPLOY_URL: Your Dokploy server API URL (required)DOKPLOY_API_KEY: Your Dokploy API authentication token (required)
Optional - Advanced Configuration
DOKPLOY_ENABLED_TOOLS: Comma-separated list of consolidated tools to enable (e.g.,dokploy_application,dokploy_postgres). If not set or empty, all tools will be loaded. Available tools:dokploy_application,dokploy_postgres,dokploy_mysql,dokploy_project.DOKPLOY_LOCKED_PROJECT_ID: Lock the MCP instance to a specific project ID. When set, all operations will be restricted to this project, and the server will validate the project exists on startup. Any attempts to access different projects will be rejected.
🚀 Transport Modes
This MCP server supports multiple transport modes to suit different use cases:
Stdio Mode (Default)
The default mode uses stdio for direct process communication, ideal for desktop applications and command-line usage.
# Run with stdio (default)
bunx -y nd-dokploy-mcp
# or
bun run start:stdioHTTP Mode (Streamable HTTP + Legacy SSE)
Modern HTTP mode exposes the server via HTTP/HTTPS supporting both modern and legacy protocols for maximum compatibility:
- Streamable HTTP (MCP 2025-03-26) - Modern protocol with session management
- Legacy SSE (MCP 2024-11-05) - Backwards compatibility for older clients
# Run with HTTP mode
bun run start:http
# or
bunx -y nd-dokploy-mcp --http
# or via environment variable
MCP_TRANSPORT=http bunx -y nd-dokploy-mcpModern Streamable HTTP Endpoints:
- POST /mcp - Client-to-server requests
- GET /mcp - Server-to-client notifications
- DELETE /mcp - Session termination
- GET /health - Health check endpoint
Legacy SSE Endpoints (Backwards Compatibility):
- GET /sse - SSE stream initialization
- POST /messages - Client message posting
Configuration:
- Internal port:
3000(fixed) - External port: configurable via
EXTERNAL_PORT(default:3000) - Supports both modern Streamable HTTP (MCP 2025-03-26) and legacy SSE (MCP 2024-11-05)
- Session management with automatic cleanup for both transport types
Client Compatibility:
Modern clients automatically use the Streamable HTTP endpoints, while legacy clients can connect using the SSE endpoints. The server handles both protocols simultaneously, ensuring compatibility with:
- Modern MCP clients (Claude Desktop, Cline, etc.) → Use
/mcpendpoints - Legacy MCP clients → Use
/sseand/messagesendpoints - Custom integrations → Choose the appropriate protocol for your needs
For detailed transport mode documentation and client examples, refer to the configuration examples above.
📚 Available Tools
This MCP server provides 4 consolidated tools that cover all 67+ Dokploy API operations with a clean, unified interface:
🗂️ dokploy_project (6 actions)
Project Management Operations:
list- List all projectsget- Get specific project detailscreate- Create new projectupdate- Update project configurationremove- Delete projectduplicate- Duplicate project with services
🚀 dokploy_application (35 actions)
Application & Domain Management:
Core Application Operations:
create,get,update,deletedeploy,redeploy,start,stop,reloadmove,markRunning,cancelDeployment,cleanQueues
Git Provider Integration:
saveGithubProvider,saveGitlabProvider,saveBitbucketProvidersaveGiteaProvider,saveGitProvider,disconnectGitProvider
Configuration Management:
saveBuildType,saveDockerProvider,saveEnvironmentreadAppMonitoring,readTraefikConfig,updateTraefikConfigrefreshToken
Domain Management:
domainCreate,domainGet,domainUpdate,domainDeletedomainByApplicationId,domainByComposeId,domainGenerateDomaindomainValidate,domainCanGenerateTraefikMeDomains
🐘 dokploy_postgres (13 actions)
PostgreSQL Database Management:
create,get,update,remove,movedeploy,start,stop,reload,rebuildchangeStatus,saveExternalPort,saveEnvironment
🐬 dokploy_mysql (13 actions)
MySQL Database Management:
create,get,update,remove,movedeploy,start,stop,reload,rebuildchangeStatus,saveExternalPort,saveEnvironment
🔧 Tool Architecture
Each consolidated tool follows this pattern:
{
"tool": "dokploy_application",
"action": "deploy",
"params": {
"applicationId": "app-123",
"title": "Production deployment",
"description": "Deploying v1.0.0"
}
}Tool Annotations:
All tools include semantic annotations (destructiveHint, idempotentHint, openWorldHint) to help MCP clients understand their behavior and safety characteristics.
For detailed schemas, parameters, and usage examples, see TOOLS.md.
⚙️ Advanced Configuration
Tool Filtering
You can control which tools are loaded by the MCP server using the DOKPLOY_ENABLED_TOOLS environment variable. This is useful for creating specialized MCP instances that only handle specific operations.
Example: Only load application and PostgreSQL tools
{
"mcpServers": {
"dokploy-mcp": {
"command": "npx",
"args": ["-y", "nd-dokploy-mcp"],
"env": {
"DOKPLOY_URL": "https://your-dokploy-server.com/api",
"DOKPLOY_API_KEY": "your-dokploy-api-token",
"DOKPLOY_ENABLED_TOOLS": "dokploy_application,dokploy_postgres"
}
}
}
}Available consolidated tool names:
dokploy_application- Application and domain managementdokploy_postgres- PostgreSQL database managementdokploy_mysql- MySQL database managementdokploy_project- Project management
If DOKPLOY_ENABLED_TOOLS is not set or is empty, all tools will be loaded.
Project Locking
You can lock an MCP instance to a specific project using the DOKPLOY_LOCKED_PROJECT_ID environment variable. This ensures that all operations are restricted to a single project, providing isolation and security.
Example: Lock to a specific project
{
"mcpServers": {
"dokploy-mcp-project-a": {
"command": "npx",
"args": ["-y", "nd-dokploy-mcp"],
"env": {
"DOKPLOY_URL": "https://your-dokploy-server.com/api",
"DOKPLOY_API_KEY": "your-dokploy-api-token",
"DOKPLOY_LOCKED_PROJECT_ID": "project-a-id"
}
}
}
}When project locking is enabled:
- The server validates the project exists on startup and fails if the project is not found
- All operations are restricted to the locked project
- Attempts to access different projects are automatically rejected with an error
- Environment IDs are validated to ensure they belong to the locked project
- The
projectIdparameter is automatically injected into operations when not provided
Use cases:
- Multi-tenant setups: Run multiple MCP instances, each locked to a different project/tenant
- Security: Prevent accidental operations on wrong projects
- Isolation: Create dedicated MCP instances for different teams or environments
Combining tool filtering and project locking:
{
"mcpServers": {
"dokploy-mcp-team-backend": {
"command": "npx",
"args": ["-y", "nd-dokploy-mcp"],
"env": {
"DOKPLOY_URL": "https://your-dokploy-server.com/api",
"DOKPLOY_API_KEY": "your-dokploy-api-token",
"DOKPLOY_ENABLED_TOOLS": "dokploy_application,dokploy_postgres",
"DOKPLOY_LOCKED_PROJECT_ID": "backend-project-id"
}
}
}
}This configuration creates an MCP instance that only loads application and PostgreSQL tools and restricts all operations to the backend project.
🏗️ Architecture
Built with @modelcontextprotocol/sdk, TypeScript, and Zod for type-safe schema validation:
- 4 Consolidated Tools covering all 67+ operations for projects, applications, domains, PostgreSQL, and MySQL
- Bun Optimized: High-performance runtime with optimized builds
- Multiple Transports: Stdio (default) and HTTP (Streamable HTTP + legacy SSE)
- Multiple Git Providers: GitHub, GitLab, Bitbucket, Gitea, custom Git
- Project Locking: Built-in isolation for multi-tenant setups
- Tool Filtering: Selective loading for specialized MCP instances
- Robust Error Handling: Centralized API client with retry logic
- Type Safety: Full TypeScript support with Zod schema validation
- Tool Annotations: Semantic hints for MCP client behavior understanding
🔧 Development
Clone the project and install dependencies:
git clone https://github.com/Dokploy/mcp.git
cd dokploy-mcp
bun installBuild:
bun run buildLocal Configuration Example
{
"mcpServers": {
"dokploy-mcp": {
"command": "bunx",
"args": ["tsx", "/path/to/dokploy-mcp/src/index.ts"],
"env": {
"DOKPLOY_URL": "https://your-dokploy-server.com/api",
"DOKPLOY_API_KEY": "your-dokploy-api-token"
}
}
}
}Testing with MCP Inspector
npx -y @modelcontextprotocol/inspector bunx nd-dokploy-mcpDocumentation
- TOOLS.md - Complete tool reference with schemas and examples
- CONTRIBUTING.md - Contributing guidelines
🔧 Troubleshooting
MCP Client Errors
Try adding
@latestto the package name.Use Bun for the best performance:
bunx -y nd-dokploy-mcp@latestFor Node.js environments:
npx -y nd-dokploy-mcp@latestVerify your
DOKPLOY_URLandDOKPLOY_API_KEYenvironment variables are correctly set.For consolidated tools, make sure to use the new format:
{ "tool": "dokploy_application", "action": "deploy", "params": { "applicationId": "your-app-id" } }
🤝 Contributing
We welcome contributions! If you'd like to contribute to the Dokploy MCP Server, please check out our Contributing Guide.
🆘 Support
If you encounter any issues, have questions, or want to suggest a feature, please open an issue in our GitHub repository.
📄 License
This project is licensed under the Apache License.
