Skip to content

feat: add compose stack tools#23

Open
ismailtrm wants to merge 2 commits intoDokploy:mainfrom
ismailtrm:feat/compose-tools
Open

feat: add compose stack tools#23
ismailtrm wants to merge 2 commits intoDokploy:mainfrom
ismailtrm:feat/compose-tools

Conversation

@ismailtrm
Copy link

@ismailtrm ismailtrm commented Mar 7, 2026

Closes #18.

I needed to manage compose stacks via MCP for my own project and ended up implementing these tools locally. When I saw issue #18 I figured it was worth contributing back.

Compose stacks had zero MCP support — no way to inspect, deploy, or manage them without going to the UI. This adds the missing tools:

Tool Endpoint
compose-one GET /compose.one
compose-deploy POST /compose.deploy
compose-redeploy POST /compose.redeploy
compose-start POST /compose.start
compose-stop POST /compose.stop
compose-cleanQueues POST /compose.cleanQueues

Tested against a live Dokploy instance — compose-cleanQueues was especially handy for clearing a stuck deployment queue.

@andradehenrique let me know if anything needs adjusting!

Adds 6 tools for managing Docker Compose stacks in Dokploy:
- compose-one: fetch compose stack details
- compose-deploy: trigger a deployment
- compose-redeploy: redeploy (pull latest + restart)
- compose-start: start a stopped stack
- compose-stop: stop a running stack
- compose-cleanQueues: clear stuck deployment queues

Compose stacks are a first-class resource type in Dokploy alongside
Applications, but were previously missing from the MCP server.
Copilot AI review requested due to automatic review settings March 7, 2026 07:20
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds 6 new MCP tools for managing Docker Compose stacks in the Dokploy MCP Server, filling a gap where compose stacks — a core Dokploy resource type — had no MCP tool coverage.

Changes:

  • Added 6 compose tool implementations (composeOne, composeDeploy, composeRedeploy, composeStart, composeStop, composeCleanQueues) following the established createTool + Zod schema pattern
  • Added barrel export file (compose/index.ts) and registered compose tools in the central allTools array
  • All tools use a consistent single-parameter composeId schema with appropriate MCP annotations

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
src/mcp/tools/index.ts Imports composeTools and spreads them into allTools
src/mcp/tools/compose/index.ts Barrel file exporting all 6 compose tools
src/mcp/tools/compose/composeOne.ts GET tool to retrieve compose stack details
src/mcp/tools/compose/composeDeploy.ts POST tool to trigger a compose stack deployment
src/mcp/tools/compose/composeRedeploy.ts POST tool to redeploy (pull + restart) a compose stack
src/mcp/tools/compose/composeStart.ts POST tool to start a stopped compose stack
src/mcp/tools/compose/composeStop.ts POST tool to stop a running compose stack
src/mcp/tools/compose/composeCleanQueues.ts POST tool to clear stuck deployment queues

@ismailtrm
Copy link
Author

Fixed the .min(1) validation on all 6 composeId fields and added readOnlyHint: true to composeOne — good catches.

For the README/TOOLS.md update: happy to add it if you'd like, just let me know. Wasn't sure if those are manually maintained or generated on your end.

@ismailtrm
Copy link
Author

Just noticed PR #1 by @Macawls covers this too and has been open since June 2025. I hadn't seen it when I checked the issue — #18 had no assignee so I went ahead.

Their PR has more tools (compose-create, compose-update, compose-remove, compose-saveEnvironment, compose-reload), ours adds compose-redeploy and compose-cleanQueues which they're missing. The two could be merged into one.

@andradehenrique — happy to close this and let #1 take priority, expand ours to include the missing tools, or whatever works best for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: Add Compose Management Tools

2 participants