### Example: starting an HTTP server programmatically Source: https://github.com/dokploy/mcp/blob/main/_autodocs/api-reference/http-server.md Shows how to start the HTTP server programmatically by importing main and calling it, with error handling and process exit on failure. ```typescript import { main } from "./http-server.js"; main().catch((error) => { console.error("fatal", error); process.exit(1); }); // server listening on :3000 — GET /health, /mcp, /sse, /messages ``` -------------------------------- ### main() Source: https://github.com/dokploy/mcp/blob/main/_autodocs/api-reference/http-server.md Starts the HTTP server and never returns. It creates a Hono app, registers routes, and starts listening on port 3000. ```APIDOC ## main() ### Description Starts the HTTP server and never returns. It creates a Hono app, registers routes, and starts listening on port 3000. ### Method N/A (function) ### Endpoint N/A ### Parameters None ### Request Example N/A ### Response #### Success Response - **Returns**: A promise that resolves only when the process terminates. #### Response Example N/A ### Error Handling - Errors are caught by the caller; the function itself does not throw. ``` -------------------------------- ### Clone and install dependencies Source: https://github.com/dokploy/mcp/blob/main/README.md Clones the repository, changes into the project directory, and installs dependencies with pnpm. ```bash git clone https://github.com/Dokploy/mcp.git cd mcp pnpm install ``` -------------------------------- ### redis-start Source: https://github.com/dokploy/mcp/blob/main/_autodocs/api-reference/tools-databases.md Starts a Redis instance. ```APIDOC ## POST /redis.start ### Description Starts a Redis instance. ### Method POST ### Endpoint /redis.start ### Parameters #### Request Body - **redisId** (string) - Required - The ID of the Redis instance. ``` -------------------------------- ### postgres-start Source: https://github.com/dokploy/mcp/blob/main/_autodocs/api-reference/tools-databases.md Starts a PostgreSQL database instance. ```APIDOC ## POST /postgres.start ### Description Starts a PostgreSQL database instance. ### Method POST ### Endpoint /postgres.start ### Parameters #### Request Body - **postgresId** (string) - Required - The ID of the PostgreSQL database. ``` -------------------------------- ### POST /mysql.start Source: https://github.com/dokploy/mcp/blob/main/_autodocs/api-reference/tools-databases.md Starts a MySQL instance. ```APIDOC ## POST /mysql.start ### Description Starts a MySQL instance. ### Method POST ### Endpoint /mysql.start ### Parameters #### Path Parameters - **mysqlId** (string) - Required - The ID of the MySQL instance. ### Response #### Success Response (200) - **success** (boolean) - Indicates if the operation was successful. #### Response Example { "success": true } ``` -------------------------------- ### compose-start Source: https://github.com/dokploy/mcp/blob/main/TOOLS.md Starts a compose application. ```APIDOC ## POST compose-start ### Description Starts a compose application. ### Method POST ### Endpoint compose-start ### Parameters #### Request Body - **composeId** (string) - Required ``` -------------------------------- ### POST /libsql.start Source: https://github.com/dokploy/mcp/blob/main/_autodocs/api-reference/tools-databases.md Starts a libsql database. ```APIDOC ## POST /libsql.start ### Description Starts a libsql database. ### Method POST ### Endpoint /libsql.start ### Parameters #### Request Body - **libsqlId** (string) - Required - The ID of the libsql database. ``` -------------------------------- ### POST /mariadb.start Source: https://github.com/dokploy/mcp/blob/main/_autodocs/api-reference/tools-databases.md Starts a MariaDB database. ```APIDOC ## POST /mariadb.start ### Description Starts a MariaDB database. ### Method POST ### Endpoint /mariadb.start ### Parameters #### Request Body - **mariadbId** (string) - Required - The ID of the MariaDB database. ``` -------------------------------- ### Docker Compose: Start and Log HTTP Service Source: https://github.com/dokploy/mcp/blob/main/README.md Use the provided docker-compose.yml for production deployments. Start the HTTP service and view its logs. ```bash # Start HTTP service docker-compose up -d dokploy-mcp-http # View logs docker-compose logs -f dokploy-mcp-http ``` -------------------------------- ### POST /application.start Source: https://github.com/dokploy/mcp/blob/main/_autodocs/api-reference/tools-core.md Starts an application by its ID. This endpoint is used to start a stopped application. ```APIDOC ## POST /application.start ### Description Starts an application by its ID. ### Method POST ### Endpoint /application.start ### Parameters #### Request Body - **applicationId** (string) - Required - The ID of the application to start. ### Request Example { "applicationId": "string" } ### Response #### Success Response (200) No response body is documented. #### Response Example {} ``` -------------------------------- ### POST /mongo.start Source: https://github.com/dokploy/mcp/blob/main/_autodocs/api-reference/tools-databases.md Starts a MongoDB instance. ```APIDOC ## POST /mongo.start ### Description Starts a MongoDB instance. ### Method POST ### Endpoint /mongo.start ### Parameters #### Path Parameters - **mongoId** (string) - Required - The ID of the MongoDB instance. ### Response #### Success Response (200) - **success** (boolean) - Indicates if the operation was successful. #### Response Example { "success": true } ``` -------------------------------- ### application-start Source: https://github.com/dokploy/mcp/blob/main/TOOLS.md Starts an application by its ID. ```APIDOC ## POST /application-start ### Description Starts an application. ### Method POST ### Endpoint /application-start ### Parameters #### Request Body - **applicationId** (string) - Required - The ID of the application. ``` -------------------------------- ### POST /compose.start Source: https://github.com/dokploy/mcp/blob/main/_autodocs/api-reference/tools-deploy.md Starts a compose service. ```APIDOC ## POST /compose.start ### Description Starts a compose service. ### Method POST ### Endpoint /compose.start ### Parameters #### Request Body - **composeId** (string) - Required - The ID of the compose service. ### Request Example { "composeId": "..." } ### Response #### Success Response (200) - **success** (boolean) - Indicates success. #### Response Example { "success": true } ``` -------------------------------- ### Complete output shape example Source: https://github.com/dokploy/mcp/blob/main/_autodocs/api-reference/utils-logger.md Complete output shape example: calling error with metadata produces a JSON line with the context.service set to the provided context and the metadata merged into context. ```ts const logger = createLogger("AxiosClient"); logger.error("Network error - Request failed", { method: "GET", url: "/project.all" }); // {"level":"error","message":"Network error - Request failed", // "timestamp":"2026-01-01T00:00:00.000Z", // "context":{"service":"AxiosClient","method":"GET","url":"/project.all"}} ``` -------------------------------- ### GET /previewDeployment.all Source: https://github.com/dokploy/mcp/blob/main/_autodocs/api-reference/tools-deploy.md Lists all preview deployments for an application. ```APIDOC ## GET /previewDeployment.all ### Description Lists all preview deployments for an application. ### Method GET ### Endpoint /previewDeployment.all ### Parameters #### Query Parameters - **applicationId** (string) - Required - The ID of the application. ``` -------------------------------- ### GET /overview.services Source: https://github.com/dokploy/mcp/blob/main/_autodocs/api-reference/tools-advanced.md Provides an overview of services. ```APIDOC ## GET /overview.services ### Description Provides an overview of services. ### Method GET ### Endpoint /overview.services ### Parameters None ### Response No response schema documented. ``` -------------------------------- ### GET /overview.backups Source: https://github.com/dokploy/mcp/blob/main/_autodocs/api-reference/tools-advanced.md Provides an overview of backups. ```APIDOC ## GET /overview.backups ### Description Provides an overview of backups. ### Method GET ### Endpoint /overview.backups ### Parameters None ### Response No response schema documented. ``` -------------------------------- ### GET /gitProvider.getAll Source: https://github.com/dokploy/mcp/blob/main/_autodocs/api-reference/tools-git.md Retrieves all Git providers. ```APIDOC ## GET /gitProvider.getAll ### Description Retrieves all Git providers. ### Method GET ### Endpoint /gitProvider.getAll ### Parameters None ### Response #### Success Response (200) - **providers** (array) - List of Git providers. #### Response Example { "providers": [] } ``` -------------------------------- ### GET /health response Source: https://github.com/dokploy/mcp/blob/main/_autodocs/endpoints.md Example JSON response from the GET /health endpoint, returning status 'ok' and an ISO-8601 UTC timestamp. ```json { "status": "ok", "timestamp": "2026-01-01T00:00:00.000Z" } ``` -------------------------------- ### POST /application.deployNginxQuickstart Source: https://github.com/dokploy/mcp/blob/main/_autodocs/api-reference/tools-core.md Deploys an Nginx quickstart application. Requires an environment ID, with optional server ID. ```APIDOC ## POST /application.deployNginxQuickstart ### Description Deploys an Nginx quickstart application. ### Method POST ### Endpoint /application.deployNginxQuickstart ### Parameters #### Request Body - **environmentId** (string) - Required - The ID of the environment. - **serverId** (string) - Optional - The ID of the server. ### Response No response schema documented. ``` -------------------------------- ### GET /overview.domains Source: https://github.com/dokploy/mcp/blob/main/_autodocs/api-reference/tools-advanced.md Provides an overview of domains. ```APIDOC ## GET /overview.domains ### Description Provides an overview of domains. ### Method GET ### Endpoint /overview.domains ### Parameters None ### Response No response schema documented. ``` -------------------------------- ### Remove tags from a preset with DOKPLOY_DISABLED_TAGS Source: https://github.com/dokploy/mcp/blob/main/README.md Removes categories from a preset by setting DOKPLOY_DISABLED_TAGS. This example starts with the 'core' preset and disables the 'postgres' and 'redis' tags. ```bash DOKPLOY_TOOL_PRESET=core DOKPLOY_DISABLED_TAGS=postgres,redis ``` -------------------------------- ### Find a tool by name and inspect its input schema Source: https://github.com/dokploy/mcp/blob/main/_autodocs/api-reference/generated-tools.md Finds a tool by name 'application-one' and logs its method and path (GET /application.one), then parses an example input with zod validation. ```TypeScript import { generatedTools } from "./generated/tools.js"; const tool = generatedTools.find((t) => t.name === "application-one")!; console.log(tool.method, tool.path); // GET /application.one const parsed = tool.schema.parse({ applicationId: "x" }); // zod validation ``` -------------------------------- ### settings-setupGPU Source: https://github.com/dokploy/mcp/blob/main/_autodocs/api-reference/tools-settings.md Sets up GPU on a server. ```APIDOC ## POST /settings.setupGPU ### Description Sets up GPU on a server. ### Method POST ### Endpoint /settings.setupGPU ### Parameters #### Query Parameters - **serverId** (string) - Optional - The server ID. ### Response #### Success Response (200) No response schema documented. ``` -------------------------------- ### GET /compose.getDefaultCommand Source: https://github.com/dokploy/mcp/blob/main/_autodocs/api-reference/tools-deploy.md Gets the default command for a compose service. ```APIDOC ## GET /compose.getDefaultCommand ### Description Gets the default command for a compose service. ### Method GET ### Endpoint /compose.getDefaultCommand ### Parameters #### Query Parameters - **composeId** (string) - Required - The ID of the compose service. ### Response #### Success Response (200) - **command** (string) - The default command. #### Response Example { "command": "npm start" } ``` -------------------------------- ### server-setup Source: https://github.com/dokploy/mcp/blob/main/_autodocs/api-reference/tools-infrastructure.md Sets up a server by ID. Requires serverId. ```APIDOC ## POST /server.setup ### Description Sets up a server by ID. ### Method POST ### Endpoint /server.setup ### Parameters #### Query Parameters - **serverId** (string) - Required - The ID of the server. ### Response #### Success Response (200) - **success** (boolean) - Indicates if the setup was successful. #### Response Example { "success": true } ``` -------------------------------- ### GET /compose.getTags Source: https://github.com/dokploy/mcp/blob/main/_autodocs/api-reference/tools-deploy.md Gets tags for compose services. No required parameters. ```APIDOC ## GET /compose.getTags ### Description Gets tags for compose services. ### Method GET ### Endpoint /compose.getTags ### Parameters #### Query Parameters - **baseUrl** (string) - Optional - Base URL. ### Response #### Success Response (200) - **tags** (array) - List of tags. #### Response Example { "tags": [] } ``` -------------------------------- ### GET /compose.getConvertedCompose Source: https://github.com/dokploy/mcp/blob/main/_autodocs/api-reference/tools-deploy.md Gets the converted compose file for a compose service. ```APIDOC ## GET /compose.getConvertedCompose ### Description Gets the converted compose file for a compose service. ### Method GET ### Endpoint /compose.getConvertedCompose ### Parameters #### Query Parameters - **composeId** (string) - Required - The ID of the compose service. ### Response #### Success Response (200) - **composeFile** (string) - The converted compose file content. #### Response Example { "composeFile": "version: '3'\nservices: ..." } ``` -------------------------------- ### Run @dokploy/mcp with environment variables Source: https://github.com/dokploy/mcp/blob/main/_autodocs/configuration.md Startup configuration checklist to run with a reduced toolset and redaction disabled. Configuration failures (missing DOKPLOY_URL/DOKPLOY_API_KEY, malformed DOKPLOY_CUSTOM_HEADERS) surface as thrown Errors at import time. ```bash export DOKPLOY_URL=https://dokploy.example.com export DOKPLOY_API_KEY=dp_xxxxxxxx export DOKPLOY_TOOL_PRESET=deploy export DOKPLOY_DISABLED_TAGS=domain export DOKPLOY_REDACT_ENV=false npx -y @dokploy/mcp ``` -------------------------------- ### GET /project.allForPermissions Source: https://github.com/dokploy/mcp/blob/main/_autodocs/api-reference/tools-core.md Retrieves all projects for permission checks. This endpoint is used to get projects for permission validation. ```APIDOC ## GET /project.allForPermissions ### Description Retrieves all projects for permission checks. ### Method GET ### Endpoint /project.allForPermissions ### Parameters None ### Request Example GET /project.allForPermissions ### Response #### Success Response (200) No response body is documented. #### Response Example {} ``` -------------------------------- ### ResponseFormatter.error basic and with details example Source: https://github.com/dokploy/mcp/blob/main/_autodocs/api-reference/utils-responseFormatter.md Example of calling ResponseFormatter.error without details and with details, showing the resulting payloads. ```typescript import { ResponseFormatter } from "./utils/responseFormatter.js"; const bare = ResponseFormatter.error("something went wrong"); // JSON.parse(bare.content[0].text) => { success: false, error: "something went wrong" } // bare.isError === true const withDetails = ResponseFormatter.error("failed", "timeout after 30s"); // => { success: false, error: "failed", details: "timeout after 30s" } ``` -------------------------------- ### ResponseFormatter.success with null data example Source: https://github.com/dokploy/mcp/blob/main/_autodocs/api-reference/utils-responseFormatter.md Example showing that passing null as data omits the data key from the payload. ```typescript const result = ResponseFormatter.success("done", null); const payload = JSON.parse(result.content[0].text); console.log(payload.hasOwnProperty("data")); // false ``` -------------------------------- ### Install in Windows: cmd wrapper Source: https://github.com/dokploy/mcp/blob/main/README.md Windows configuration uses `cmd` as the command wrapper instead of `npx` directly. Add this to your MCP client configuration. ```json { "mcpServers": { "dokploy-mcp": { "command": "cmd", "args": ["/c", "npx", "-y", "@dokploy/mcp"], "env": { "DOKPLOY_URL": "https://your-dokploy-server.com", "DOKPLOY_API_KEY": "your-dokploy-api-token" } } } } ``` -------------------------------- ### ResponseFormatter.success basic example Source: https://github.com/dokploy/mcp/blob/main/_autodocs/api-reference/utils-responseFormatter.md Example of calling ResponseFormatter.success with a message and data object, then parsing the returned text content. ```typescript import { ResponseFormatter } from "./utils/responseFormatter.js"; const result = ResponseFormatter.success("application-one completed successfully", { applicationId: "abc", status: "running", }); const payload = JSON.parse(result.content[0].text); console.log(payload.success); // true, result.isError === undefined ``` -------------------------------- ### Example usage with Cloudflare Access Source: https://github.com/dokploy/mcp/blob/main/_autodocs/api-reference/utils-clientConfig.md Shows how to use parseCustomHeaders with the Cloudflare Access headers from .env.example. Also demonstrates that reserved headers like x-api-key are rejected with an error. ```typescript import { parseCustomHeaders } from "./utils/clientConfig.js"; const headers = parseCustomHeaders( JSON.stringify({ "CF-Access-Client-Id": "your-client-id.access", "CF-Access-Client-Secret": "your-client-secret", }), ); // => { "CF-Access-Client-Id": "your-client-id.access", "CF-Access-Client-Secret": "your-client-secret" } try { parseCustomHeaders(JSON.stringify({ "x-api-key": "override" })); } catch (error) { // Error: Environment variable DOKPLOY_CUSTOM_HEADERS cannot override reserved headers... } ``` -------------------------------- ### createLogger usage example Source: https://github.com/dokploy/mcp/blob/main/_autodocs/api-reference/utils-logger.md Example usage of createLogger with a custom context and metadata. The output is a single-line JSON object written to stderr. ```ts import { createLogger } from "./utils/logger.js"; const logger = createLogger("MCP-Entry"); logger.info("server running", { port: 3000 }); // stderr: {"level":"info","message":"server running","timestamp":"...","context":{"service":"MCP-Entry","port":3000}} ``` -------------------------------- ### Build the project Source: https://github.com/dokploy/mcp/blob/main/README.md Builds the project after dependencies are installed. ```bash pnpm build ``` -------------------------------- ### server-create Source: https://github.com/dokploy/mcp/blob/main/_autodocs/api-reference/tools-infrastructure.md Creates a new server. Requires name, description, ipAddress, port, username, sshKeyId, and serverType, with optional enableDockerCleanup. ```APIDOC ## POST /server.create ### Description Creates a new server. ### Method POST ### Endpoint /server.create ### Parameters #### Query Parameters - **name** (string) - Required - The name of the server. - **description** (string or null) - Required - The description of the server. - **ipAddress** (string) - Required - The IP address of the server. - **port** (number) - Required - The port for SSH. - **username** (string) - Required - The SSH username. - **sshKeyId** (string or null) - Required - The ID of the SSH key. - **serverType** (enum: "deploy" or "build") - Required - The type of server. - **enableDockerCleanup** (boolean) - Optional - Whether to enable Docker cleanup. ### Response #### Success Response (200) - **server** (object) - The created server. #### Response Example { "server": {} } ``` -------------------------------- ### Success response payload example Source: https://github.com/dokploy/mcp/blob/main/_autodocs/api-reference/handler.md Example of the success payload returned by ResponseFormatter.success. The message uses the tool name and the data field contains the raw Dokploy API response body. ```json { "success": true, "message": "application-one completed successfully", "data": { "...": "raw Dokploy API response" } } ``` -------------------------------- ### GET /tag.all Source: https://github.com/dokploy/mcp/blob/main/_autodocs/api-reference/tools-operations.md Retrieves all tags. ```APIDOC ## GET /tag.all ### Description Retrieves all tags. ### Method GET ### Endpoint /tag.all ### Parameters None. ``` -------------------------------- ### server-setupMonitoring Source: https://github.com/dokploy/mcp/blob/main/_autodocs/api-reference/tools-infrastructure.md Sets up monitoring for a server. Requires serverId, with optional metricsConfig. ```APIDOC ## POST /server.setupMonitoring ### Description Sets up monitoring for a server. ### Method POST ### Endpoint /server.setupMonitoring ### Parameters #### Query Parameters - **serverId** (string) - Required - The ID of the server. - **metricsConfig** (object) - Optional - The metrics configuration. ### Response #### Success Response (200) - **success** (boolean) - Indicates if the setup was successful. #### Response Example { "success": true } ``` -------------------------------- ### settings-getUpdateData Source: https://github.com/dokploy/mcp/blob/main/_autodocs/api-reference/tools-settings.md Gets update data. ```APIDOC ## POST /settings.getUpdateData ### Description Gets update data. ### Method POST ### Endpoint /settings.getUpdateData ### Parameters None ### Response #### Success Response (200) No response schema documented. ``` -------------------------------- ### settings-getReleaseTag Source: https://github.com/dokploy/mcp/blob/main/_autodocs/api-reference/tools-settings.md Gets the release tag. ```APIDOC ## GET /settings.getReleaseTag ### Description Gets the release tag. ### Method GET ### Endpoint /settings.getReleaseTag ### Parameters None ### Response #### Success Response (200) No response schema documented. ``` -------------------------------- ### POST /application.create Source: https://github.com/dokploy/mcp/blob/main/_autodocs/api-reference/tools-core.md Creates a new application. Requires a name and environment ID, with optional parameters for app name, description, server ID, and source type. ```APIDOC ## POST /application.create ### Description Creates a new application. ### Method POST ### Endpoint /application.create ### Parameters #### Request Body - **name** (string) - Required - The name of the application. - **environmentId** (string) - Required - The ID of the environment. - **appName** (string) - Optional - The application name. - **description** (string) - Optional - Description of the application. - **serverId** (string) - Optional - The ID of the server. - **sourceType** (string) - Optional - The source type. ### Response No response schema documented. ``` -------------------------------- ### createServer() Source: https://github.com/dokploy/mcp/blob/main/_autodocs/api-reference/server.md Creates an MCP server instance with the name 'dokploy' and version '2.0.0'. It filters tools based on configuration, registers each tool with its schema and handler, and overrides the tools/list handler to serve draft-2020-12 JSON Schemas. The server is not connected to a transport; callers must connect it. ```APIDOC ## createServer() ### Description Creates an MCP server instance with the name 'dokploy' and version '2.0.0'. It filters tools based on configuration, registers each tool with its schema and handler, and overrides the tools/list handler to serve draft-2020-12 JSON Schemas. The server is not connected to a transport; callers must connect it. ### Method Function ### Endpoint N/A (SDK function) ### Parameters No parameters. ### Returns `McpServer` (from `@modelcontextprotocol/sdk/server/mcp.js`) with the `name`/`version` above. ### Behavior 1. Filters `generatedTools` through `getEnabledTools()` (preset / enabled-tags / disabled-tags). 2. Calls `server.tool(name, description, schema.shape, annotations, handler)` for each tool. 3. Replaces the SDK's built-in `tools/list` handling with one that serves pre-converted draft 2020-12 schemas. 4. Does not connect to a transport; callers do `server.connect(transport)`. ### Usage Example (stdio) ```ts import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"; import { createServer } from "./server.js"; const server = createServer(); const transport = new StdioServerTransport(); await server.connect(transport); ``` ### Usage Example (SSE with error handling) ```ts import { SSEServerTransport } from "@modelcontextprotocol/sdk/server/sse.js"; import { createServer } from "./server.js"; const server = createServer(); const transport = new SSEServerTransport("/messages", res); server.connect(transport).catch((error) => { server.onerror?.(error); // SDK surface for transport failures process.exit(1); }); ``` ### Throws `createServer()` itself does not throw; configuration errors are raised earlier, at import time by `getClientConfig()`. ``` -------------------------------- ### settings-getOpenApiDocument Source: https://github.com/dokploy/mcp/blob/main/_autodocs/api-reference/tools-settings.md Gets the OpenAPI document. ```APIDOC ## GET /settings.getOpenApiDocument ### Description Gets the OpenAPI document. ### Method GET ### Endpoint /settings.getOpenApiDocument ### Parameters None ### Response #### Success Response (200) No response schema documented. ``` -------------------------------- ### admin-setupMonitoring Source: https://github.com/dokploy/mcp/blob/main/_autodocs/api-reference/tools-advanced.md Tool for setting up monitoring. It accepts a complex input schema for metrics configuration including server and container settings. ```APIDOC ## admin-setupMonitoring ### Description Tool for setting up monitoring. It accepts a complex input schema for metrics configuration including server and container settings. ### Input Schema ```ts z.object({ "metricsConfig": z.object({ "server": z.object({ "refreshRate": z.number().gte(2), "port": z.number().gte(1), "token": z.string(), "urlCallback": z.string().url(), "retentionDays": z.number().gte(1), "cronJob": z.string().min(1), "thresholds": z.object({ "cpu": z.number().gte(0), "memory": z.number().gte(0) }) }), "containers": z.object({ "refreshRate": z.number().gte(2), "services": z.object({ "include": z.array(z.string()).optional(), "exclude": z.array(z.string()).optional() }) }) }) }) ``` ``` -------------------------------- ### settings-getIp Source: https://github.com/dokploy/mcp/blob/main/_autodocs/api-reference/tools-settings.md Gets the IP address. ```APIDOC ## GET /settings.getIp ### Description Gets the IP address. ### Method GET ### Endpoint /settings.getIp ### Parameters None ### Response #### Success Response (200) No response schema documented. ``` -------------------------------- ### admin-setupMonitoring Source: https://github.com/dokploy/mcp/blob/main/_autodocs/api-reference/tools-advanced.md Sets up monitoring for the admin. Accepts an optional metrics configuration. ```APIDOC ## POST /admin.setupMonitoring ### Description Sets up monitoring for the admin. ### Method POST ### Endpoint /admin.setupMonitoring ### Parameters #### Request Body - **metricsConfig** (object) - Optional - Metrics configuration ### Response #### Success Response (200) No response body documented. ``` -------------------------------- ### settings-getDokployVersion Source: https://github.com/dokploy/mcp/blob/main/_autodocs/api-reference/tools-settings.md Gets the Dokploy version. ```APIDOC ## GET /settings.getDokployVersion ### Description Gets the Dokploy version. ### Method GET ### Endpoint /settings.getDokployVersion ### Parameters None ### Response #### Success Response (200) No response schema documented. ``` -------------------------------- ### Install Dokploy MCP in Cursor with Bun Source: https://github.com/dokploy/mcp/blob/main/README.md Alternative Cursor configuration using Bun as the runtime. Uses bunx instead of npx to launch the Dokploy MCP server. ```json { "mcpServers": { "dokploy-mcp": { "command": "bunx", "args": ["-y", "@dokploy/mcp"], "env": { "DOKPLOY_URL": "https://your-dokploy-server.com", "DOKPLOY_API_KEY": "your-dokploy-api-token" } } } } ``` -------------------------------- ### main() function implementation Source: https://github.com/dokploy/mcp/blob/main/_autodocs/api-reference/http-server.md Creates a Hono app, initializes transport registries, and starts the server. The actual route registration is omitted in the source. ```typescript export async function main() { const app = new Hono<{ Bindings: HttpBindings }>(); const transports = { streamable: {} as Record, sse: {} as Record, }; // ... route registration (GET /health, POST/GET/DELETE /mcp, GET /sse, POST /messages) ... serve({ fetch: app.fetch, port: PORT }, () => { logger.info(...); }); } ``` -------------------------------- ### Inspect a tool before registration Source: https://github.com/dokploy/mcp/blob/main/_autodocs/api-reference/types.md Example of finding a tool by name and logging its method, path, and schema shape. The comment shows expected output: POST /application.deploy and ZodString for the applicationId schema. ```typescript import { generatedTools } from "./generated/tools.js"; const deploy = generatedTools.find((t) => t.name === "application-deploy")!; console.log(deploy.method, deploy.path); // POST /application.deploy console.log(deploy.schema.shape.applicationId); // ZodString — input validation schema ``` -------------------------------- ### createServer() implementation Source: https://github.com/dokploy/mcp/blob/main/_autodocs/api-reference/server.md Creates an McpServer with name 'dokploy' and version '2.0.0', filters tools via getEnabledTools(), registers each tool with server.tool(), and overrides the tools/list handler to return pre-converted draft-2020-12 JSON schemas. Takes no arguments; configuration comes from environment variables. Does not connect to a transport. ```typescript export function createServer() { const server = new McpServer({ name: "dokploy", version: "2.0.0", }); const tools = getEnabledTools(); for (const tool of tools) { server.tool( tool.name, tool.description, tool.schema.shape, tool.annotations ?? {}, createHandler(tool), ); } const toolList = tools.map((tool) => ({ name: tool.name, description: tool.description, inputSchema: toDraft2020_12JsonSchema(tool.schema), annotations: tool.annotations, })); server.server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: toolList, })); return server; } ``` -------------------------------- ### compose-getTags Source: https://github.com/dokploy/mcp/blob/main/TOOLS.md Gets tags for compose templates. ```APIDOC ## GET compose-getTags ### Description Gets tags for compose templates. ### Method GET ### Endpoint compose-getTags ### Parameters #### Query Parameters - **baseUrl** (string) - Optional ``` -------------------------------- ### project-create Source: https://github.com/dokploy/mcp/blob/main/TOOLS.md Creates a new project with optional description and environment variables. ```APIDOC ## POST project-create ### Description Creates a new project with optional description and environment variables. ### Method POST ### Endpoint project-create ### Parameters #### Query Parameters - **name** (string) - Required - The name of the project. - **description** (string) - Optional - Description of the project. - **env** (string) - Optional - Environment variables for the project. ### Response #### Success Response (200) Returns the created project. ``` -------------------------------- ### GET /stripe.getInvoices Source: https://github.com/dokploy/mcp/blob/main/_autodocs/api-reference/tools-operations.md Retrieves the list of invoices. ```APIDOC ## GET /stripe.getInvoices ### Description Retrieves the list of invoices. ### Method GET ### Endpoint /stripe.getInvoices ### Parameters None. ``` -------------------------------- ### Install Dokploy MCP in Cursor with Deno Source: https://github.com/dokploy/mcp/blob/main/README.md Alternative Cursor configuration using Deno as the runtime. Uses deno run with --allow-env and --allow-net flags to execute the npm package. ```json { "mcpServers": { "dokploy-mcp": { "command": "deno", "args": ["run", "--allow-env", "--allow-net", "npm:@dokploy/mcp"], "env": { "DOKPLOY_URL": "https://your-dokploy-server.com", "DOKPLOY_API_KEY": "your-dokploy-api-token" } } } } ``` -------------------------------- ### GET /stripe.getBillingStatus Source: https://github.com/dokploy/mcp/blob/main/_autodocs/api-reference/tools-operations.md Retrieves the billing status. ```APIDOC ## GET /stripe.getBillingStatus ### Description Retrieves the billing status. ### Method GET ### Endpoint /stripe.getBillingStatus ### Parameters None. ``` -------------------------------- ### GET /stripe.canCreateMoreServers Source: https://github.com/dokploy/mcp/blob/main/_autodocs/api-reference/tools-operations.md Checks if more servers can be created. ```APIDOC ## GET /stripe.canCreateMoreServers ### Description Checks if more servers can be created. ### Method GET ### Endpoint /stripe.canCreateMoreServers ### Parameters None. ``` -------------------------------- ### POST /libsql.create Source: https://github.com/dokploy/mcp/blob/main/_autodocs/api-reference/tools-databases.md Creates a new libsql database. ```APIDOC ## POST /libsql.create ### Description Creates a new libsql database. ### Method POST ### Endpoint /libsql.create ### Parameters #### Request Body - **name** (string) - Required - The name of the database. - **appName** (string) - Required - The application name. - **environmentId** (string) - Required - The environment ID. - **description** (string or null) - Required - Description of the database. - **databaseUser** (string) - Required - The database user. - **databasePassword** (string) - Required - The database password. - **sqldNode** (enum: primary, replica) - Required - The SQLD node type. - **sqldPrimaryUrl** (string or null) - Required - The primary URL. - **serverId** (string or null) - Required - The server ID. - **dockerImage** (string) - Optional - Docker image. - **enableNamespaces** (boolean) - Optional - Enable namespaces. ``` -------------------------------- ### settings-getWebServerSettings Source: https://github.com/dokploy/mcp/blob/main/_autodocs/api-reference/tools-settings.md Gets web server settings. ```APIDOC ## GET /settings.getWebServerSettings ### Description Gets web server settings. ### Method GET ### Endpoint /settings.getWebServerSettings ### Parameters None ### Response #### Success Response (200) No response schema documented. ``` -------------------------------- ### Build Docker Image Source: https://github.com/dokploy/mcp/blob/main/README.md Clone the repository and build the Docker image for the Dokploy MCP server. ```bash git clone https://github.com/Dokploy/mcp.git cd mcp docker build -t dokploy-mcp . ``` -------------------------------- ### settings-getTraefikPorts Source: https://github.com/dokploy/mcp/blob/main/_autodocs/api-reference/tools-settings.md Gets Traefik ports for a server. ```APIDOC ## GET /settings.getTraefikPorts ### Description Gets Traefik ports for a server. ### Method GET ### Endpoint /settings.getTraefikPorts ### Parameters #### Query Parameters - **serverId** (string) - Optional - The server ID. ### Response #### Success Response (200) No response schema documented. ``` -------------------------------- ### settings-getLogCleanupStatus Source: https://github.com/dokploy/mcp/blob/main/_autodocs/api-reference/tools-settings.md Gets the log cleanup status. ```APIDOC ## GET /settings.getLogCleanupStatus ### Description Gets the log cleanup status. ### Method GET ### Endpoint /settings.getLogCleanupStatus ### Parameters None ### Response #### Success Response (200) No response schema documented. ``` -------------------------------- ### POST /postgres.create Source: https://github.com/dokploy/mcp/blob/main/_autodocs/api-reference/tools-databases.md Creates a new PostgreSQL database instance. ```APIDOC ## POST /postgres.create ### Description Creates a new PostgreSQL database instance. ### Method POST ### Endpoint /postgres.create ### Parameters #### Request Body - **name** (string) - Required - Name of the database. - **databaseName** (string) - Required - Database name. - **databaseUser** (string) - Required - Database user. - **databasePassword** (string) - Required - Database password. - **environmentId** (string) - Required - ID of the environment. - **appName** (string) - Optional - Application name. - **dockerImage** (string) - Optional - Docker image to use. - **description** (string) - Optional - Description of the database. - **serverId** (string) - Optional - ID of the server. ### Response #### Success Response (200) - **success** (boolean) - Indicates if the operation was successful. #### Response Example { "success": true } ``` -------------------------------- ### POST /environment.create Source: https://github.com/dokploy/mcp/blob/main/_autodocs/api-reference/tools-deploy.md Creates a new environment. ```APIDOC ## POST /environment.create ### Description Creates a new environment. ### Method POST ### Endpoint /environment.create ### Parameters #### Request Body - **name** (string) - Required - The environment name. - **projectId** (string) - Required - The ID of the project. - **description** (string) - Optional - Description of the environment. ### Response #### Success Response (200) - **environment** (object) - The created environment object. #### Response Example { "environment": {} } ``` -------------------------------- ### settings-getDokployCloudIps Source: https://github.com/dokploy/mcp/blob/main/_autodocs/api-reference/tools-settings.md Gets Dokploy Cloud IPs. ```APIDOC ## GET /settings.getDokployCloudIps ### Description Gets Dokploy Cloud IPs. ### Method GET ### Endpoint /settings.getDokployCloudIps ### Parameters None ### Response #### Success Response (200) No response schema documented. ``` -------------------------------- ### settings-getDockerDiskUsage Source: https://github.com/dokploy/mcp/blob/main/_autodocs/api-reference/tools-settings.md Gets Docker disk usage. ```APIDOC ## GET /settings.getDockerDiskUsage ### Description Gets Docker disk usage. ### Method GET ### Endpoint /settings.getDockerDiskUsage ### Parameters None ### Response #### Success Response (200) No response schema documented. ``` -------------------------------- ### GET /mariadb.search Source: https://github.com/dokploy/mcp/blob/main/_autodocs/api-reference/tools-databases.md Searches for MariaDB databases. ```APIDOC ## GET /mariadb.search ### Description Searches for MariaDB databases. ### Method GET ### Endpoint /mariadb.search ### Parameters #### Query Parameters - **q** (string) - Optional - Search query. - **name** (string) - Optional - Name filter. - **appName** (string) - Optional - Application name filter. - **description** (string) - Optional - Description filter. - **projectId** (string) - Optional - Project ID filter. - **environmentId** (string) - Optional - Environment ID filter. - **limit** (number) - Optional - Limit results. - **offset** (number) - Optional - Offset results. ``` -------------------------------- ### Install Dokploy MCP in Cursor Source: https://github.com/dokploy/mcp/blob/main/README.md Configure the Dokploy MCP server in Cursor by adding this to ~/.cursor/mcp.json or .cursor/mcp.json in a project. Requires DOKPLOY_URL and DOKPLOY_API_KEY environment variables. ```json { "mcpServers": { "dokploy-mcp": { "command": "npx", "args": ["-y", "@dokploy/mcp"], "env": { "DOKPLOY_URL": "https://your-dokploy-server.com", "DOKPLOY_API_KEY": "your-dokploy-api-token" } } } } ``` -------------------------------- ### POST /mounts.create Source: https://github.com/dokploy/mcp/blob/main/_autodocs/api-reference/tools-deploy.md Creates a new mount. ```APIDOC ## POST /mounts.create ### Description Creates a new mount. ### Method POST ### Endpoint /mounts.create ### Parameters #### Request Body - **type** (enum) - Required - Mount type: bind, volume, file. - **mountPath** (string) - Required - The mount path. - **serviceId** (string) - Required - The service ID. - **hostPath** (string) - Optional - Host path for bind mounts. - **volumeName** (string) - Optional - Volume name for volume mounts. - **content** (string) - Optional - Content for file mounts. - **filePath** (string) - Optional - File path for file mounts. - **serviceType** (string) - Optional - Service type. ### Response #### Success Response (200) - **mount** (object) - The created mount object. #### Response Example { "mount": {} } ``` -------------------------------- ### GET /sshKey.all Source: https://github.com/dokploy/mcp/blob/main/_autodocs/api-reference/tools-git.md Lists all SSH keys. ```APIDOC ## GET /sshKey.all ### Description Lists all SSH keys. ### Method GET ### Endpoint /sshKey.all ### Parameters None ### Response #### Success Response (200) - Returns an array of SSH keys. #### Response Example [ { "id": "string", "name": "string" } ] ``` -------------------------------- ### POST /bitbucket.create Source: https://github.com/dokploy/mcp/blob/main/_autodocs/api-reference/tools-git.md Creates a new Bitbucket provider with authentication details and optional configuration. ```APIDOC ## POST /bitbucket.create ### Description Creates a new Bitbucket provider with authentication details and optional configuration. ### Method POST ### Endpoint /bitbucket.create ### Parameters #### Request Body - **authId** (string) - Required - Authentication identifier. - **name** (string) - Required - Name of the provider. - **bitbucketId** (string) - Optional - Bitbucket identifier. - **bitbucketUsername** (string) - Optional - Bitbucket username. - **bitbucketEmail** (string) - Optional - Bitbucket email. - **appPassword** (string) - Optional - App password. - **apiToken** (string) - Optional - API token. - **bitbucketWorkspaceName** (string) - Optional - Workspace name. - **gitProviderId** (string) - Optional - Git provider identifier. ### Request Example { "authId": "string", "name": "string" } ### Response #### Success Response (200) - **provider** (object) - The created Bitbucket provider. #### Response Example { "provider": {} } ``` -------------------------------- ### GET /registry.all Source: https://github.com/dokploy/mcp/blob/main/_autodocs/api-reference/tools-git.md Lists all container registries. ```APIDOC ## GET /registry.all ### Description Lists all container registries. ### Method GET ### Endpoint /registry.all ### Parameters None ### Response #### Success Response (200) - Returns an array of registries. #### Response Example [ { "id": "string", "name": "string", "url": "string" } ] ``` -------------------------------- ### GET /gitlab.gitlabProviders Source: https://github.com/dokploy/mcp/blob/main/_autodocs/api-reference/tools-git.md Lists all GitLab providers. ```APIDOC ## GET /gitlab.gitlabProviders ### Description Lists all GitLab providers. ### Method GET ### Endpoint /gitlab.gitlabProviders ### Parameters None ### Response #### Success Response (200) - **providers** (array) - List of GitLab providers. #### Response Example { "providers": [] } ``` -------------------------------- ### docker-startContainer Source: https://github.com/dokploy/mcp/blob/main/_autodocs/api-reference/tools-infrastructure.md Starts a container. Requires container ID. ```APIDOC ## POST /docker.startContainer ### Description Starts a container. ### Method POST ### Endpoint /docker.startContainer ### Parameters #### Query Parameters - **containerId** (string) - Required - Container ID - **serverId** (string) - Optional - Server ID ### Response #### Success Response (200) - No response schema documented. ``` -------------------------------- ### GET /github.githubProviders Source: https://github.com/dokploy/mcp/blob/main/_autodocs/api-reference/tools-git.md Lists all GitHub providers. ```APIDOC ## GET /github.githubProviders ### Description Lists all GitHub providers. ### Method GET ### Endpoint /github.githubProviders ### Parameters None ### Response #### Success Response (200) - **providers** (array) - List of GitHub providers. #### Response Example { "providers": [] } ``` -------------------------------- ### GET /gitea.giteaProviders Source: https://github.com/dokploy/mcp/blob/main/_autodocs/api-reference/tools-git.md Lists all Gitea providers. ```APIDOC ## GET /gitea.giteaProviders ### Description Lists all Gitea providers. ### Method GET ### Endpoint /gitea.giteaProviders ### Parameters None ### Response #### Success Response (200) - **providers** (array) - List of Gitea providers. #### Response Example { "providers": [] } ``` -------------------------------- ### POST /postgres.deploy Source: https://github.com/dokploy/mcp/blob/main/_autodocs/api-reference/tools-databases.md Deploys a PostgreSQL instance. ```APIDOC ## POST /postgres.deploy ### Description Deploys a PostgreSQL instance. ### Method POST ### Endpoint /postgres.deploy ### Parameters #### Path Parameters - **postgresId** (string) - Required - The ID of the PostgreSQL instance. ### Response #### Success Response (200) - **success** (boolean) - Indicates if the operation was successful. #### Response Example { "success": true } ``` -------------------------------- ### POST /mysql.create Source: https://github.com/dokploy/mcp/blob/main/_autodocs/api-reference/tools-databases.md Creates a new MySQL database instance. ```APIDOC ## POST /mysql.create ### Description Creates a new MySQL database instance. ### Method POST ### Endpoint /mysql.create ### Parameters #### Request Body - **name** (string) - Required - Name of the database. - **environmentId** (string) - Required - ID of the environment. - **databaseName** (string) - Required - Database name. - **databaseUser** (string) - Required - Database user. - **databasePassword** (string) - Required - Database password. - **appName** (string) - Optional - Application name. - **dockerImage** (string) - Optional - Docker image to use. - **description** (string) - Optional - Description of the database. - **databaseRootPassword** (string) - Optional - Root password for the database. - **serverId** (string) - Optional - ID of the server. ### Response #### Success Response (200) - **success** (boolean) - Indicates if the operation was successful. #### Response Example { "success": true } ```