MCP (Model Context Protocol) server for the Dokploy API. 23 modules, 196 tools, full endpoint coverage. TypeScript, ES modules, Node >= 22.
- Entry:
src/index.ts(routes CLI vs MCP server) - Server:
src/server.ts(registers all tools with McpServer) - Tools:
src/tools/{module}.ts-- each module exports tools via factory - Factory:
src/tools/_factory.ts(shared tool builder) - Database helpers:
src/tools/_database.ts(shared across postgres, mysql, mariadb, mongo, redis) - Config:
src/config/resolver.ts(env vars > config file > Dokploy CLI config) - CLI:
src/cli/setup.ts(interactive wizard using @clack/prompts)
- Formatter/linter: Biome (not ESLint/Prettier)
- Single quotes, no semicolons, trailing commas, 2-space indent, 100 char line width
kebab-casefilenames (enforced by Biome)useConst,useTemplate,useImportType,useExportType-- all enforced- No
forEach-- usefor...ofor.map() - No enums -- use const objects or union types
- Max cognitive complexity: 20
- Framework: Vitest
- Tests in
tests/*.test.ts - Coverage: v8 provider, excludes
src/index.tsandsrc/cli/** - Run:
npm testornpm run test:coverage
npm run build # tsc
npm run typecheck # tsc --noEmit
npm run lint # biome check .
npm run lint:fix # biome check --write .
npm test # vitest run
npm run test:coverage # vitest run --coverage
- Runtime:
@modelcontextprotocol/sdk,zod(v4),@clack/prompts - Dev:
@biomejs/biome,vitest,typescript
- Watch for unused imports/variables (Biome catches these, but still)
- API client calls must go through
src/api/client.ts-- no raw fetch - Tool definitions follow the factory pattern -- don't create one-off tool registrations
- No
anyunless truly unavoidable (warn, don't block) - Security: no hardcoded credentials, no secrets in code, no command injection