Connects to Drone CI/CD instances via personal access token and exposes 47 operations across the full platform surface. You get repo management (enable, disable, sync), build control (list, restart, cancel, promote, rollback), cron job scheduling, secret storage, and approval workflows for gated deployments. Useful when you want to query build status, trigger deployments, or manage CI configuration without leaving your chat interface. Supports both stdio for local MCP clients and SSE over HTTP for remote access. Requires DRONE_SERVER and DRONE_TOKEN environment variables pointed at your Drone instance.
A Model Context Protocol (MCP) server for interacting with Drone CI/CD. This server provides tools and resources to query build information, repositories, and more from your Drone instance.
go mod tidy
go build -o drone-mcp-server .
Set the following environment variables:
export DRONE_SERVER=https://drone.example.com
export DRONE_TOKEN=your_drone_token
# Optional: For SSE transport authentication
export MCP_AUTH_TOKEN=your_sse_auth_token
The DRONE_TOKEN should be a personal access token with appropriate permissions to read repositories and builds.
SSE Authentication: When using SSE transport, you can optionally set MCP_AUTH_TOKEN to require Bearer token authentication. Clients must include Authorization: Bearer <token> header in their requests. If not set, SSE endpoints will be publicly accessible (use with caution in production).
Add the server to your MCP client configuration (e.g., Claude Desktop):
{
"mcpServers": {
"drone": {
"command": "/path/to/drone-mcp-server",
"env": {
"DRONE_SERVER": "https://drone.example.com",
"DRONE_TOKEN": "your_token"
}
}
}
}
You can run the server directly for testing:
# Stdio mode (default)
./drone-mcp-server
# SSE HTTP mode
./drone-mcp-server --sse --host localhost --port 8080
Stdio mode (default): Communicates via stdin/stdout using the MCP protocol. Suitable for local integration with MCP clients.
SSE HTTP mode: Uses Server-Sent Events (SSE) over HTTP. Suitable for remote access or testing.
# Without authentication (public access)
./drone-mcp-server --sse --host 0.0.0.0 --port 8080
# With authentication (recommended for production)
export MCP_AUTH_TOKEN=your-secret-token
./drone-mcp-server --sse --host 0.0.0.0 --port 8080
The server will be available at http://localhost:8080/ for SSE connections.
Authentication: If MCP_AUTH_TOKEN is set, clients must include the header:
Authorization: Bearer your-secret-token
list_reposLists all repositories in your Drone instance.
get_repoGet repository details.
Arguments:
owner (string): Repository ownerrepo (string): Repository nameenable_repoEnable a repository.
Arguments:
owner (string): Repository ownerrepo (string): Repository namedisable_repoDisable a repository.
Arguments:
owner (string): Repository ownerrepo (string): Repository namerepair_repoRepair a repository.
Arguments:
owner (string): Repository ownerrepo (string): Repository namechown_repoChange repository ownership.
Arguments:
owner (string): Repository ownerrepo (string): Repository namesync_reposSynchronize repository list.
list_incompleteList repositories with incomplete builds.
list_buildsLists builds for a specific repository.
Arguments:
owner (string): Repository ownerrepo (string): Repository nameget_buildGet detailed information about a specific build.
Arguments:
owner (string): Repository ownerrepo (string): Repository namebuild (number): Build numberget_build_lastGet the last build for a repository (optionally by branch).
Arguments:
owner (string): Repository ownerrepo (string): Repository namebranch (string, optional): Branch nameget_build_logsGet logs for a specific build stage and step.
Arguments:
owner (string): Repository ownerrepo (string): Repository namebuild (number): Build numberstage (number): Stage numberstep (number): Step numberrestart_buildRestart a build (optionally with parameters).
Arguments:
owner (string): Repository ownerrepo (string): Repository namebuild (number): Build numberparams (object, optional): Build parameterscancel_buildCancel a running build.
Arguments:
owner (string): Repository ownerrepo (string): Repository namebuild (number): Build numberpromote_buildPromote a build to a target environment.
Arguments:
owner (string): Repository ownerrepo (string): Repository namebuild (number): Build numbertarget (string): Target environmentparams (object, optional): Promotion parametersrollback_buildRollback a deployment to a previous build.
Arguments:
owner (string): Repository ownerrepo (string): Repository namebuild (number): Build numbertarget (string): Target environmentparams (object, optional): Rollback parametersapprove_buildApprove a build stage (for gated deployments).
Arguments:
owner (string): Repository ownerrepo (string): Repository namebuild (number): Build numberstage (number): Stage numberdecline_buildDecline a build stage (for gated deployments).
Arguments:
owner (string): Repository ownerrepo (string): Repository namebuild (number): Build numberstage (number): Stage numbercreate_buildCreate a new build from a commit or branch.
Arguments:
owner (string): Repository ownerrepo (string): Repository namecommit (string, optional): Commit SHAbranch (string, optional): Branch nameparams (object, optional): Build parameterslist_cronsList cron jobs for a repository.
Arguments:
owner (string): Repository ownerrepo (string): Repository nameget_cronGet cron job details.
Arguments:
owner (string): Repository ownerrepo (string): Repository namecron (string): Cron job namecreate_cronCreate a new cron job.
Arguments:
owner (string): Repository ownerrepo (string): Repository namename (string): Cron job nameexpr (string): Cron expressionbranch (string): Branch namedisable (boolean, optional): Disable the cron jobdelete_cronDelete a cron job.
Arguments:
owner (string): Repository ownerrepo (string): Repository namecron (string): Cron job nameexecute_cronExecute a cron job immediately.
Arguments:
owner (string): Repository ownerrepo (string): Repository namecron (string): Cron job namelist_secretsList repository secrets.
Arguments:
owner (string): Repository ownerrepo (string): Repository nameget_secretGet repository secret details.
Arguments:
owner (string): Repository ownerrepo (string): Repository namename (string): Secret namecreate_secretCreate a repository secret.
Arguments:
owner (string): Repository ownerrepo (string): Repository namename (string): Secret namevalue (string): Secret valuepull_request (boolean, optional): Allow in pull requestspull_request_push (boolean, optional): Allow in pull request push eventsupdate_secretUpdate a repository secret.
Arguments:
owner (string): Repository ownerrepo (string): Repository namename (string): Secret namevalue (string): Secret valuepull_request (boolean, optional): Allow in pull requestspull_request_push (boolean, optional): Allow in pull request push eventsdelete_secretDelete a repository secret.
Arguments:
owner (string): Repository ownerrepo (string): Repository namename (string): Secret namelist_org_secretsList organization secrets.
Arguments:
namespace (string): Organization namespaceget_org_secretGet organization secret details.
Arguments:
namespace (string): Organization namespacename (string): Secret namecreate_org_secretCreate an organization secret.
Arguments:
namespace (string): Organization namespacename (string): Secret namevalue (string): Secret valuepull_request (boolean, optional): Allow in pull requestspull_request_push (boolean, optional): Allow in pull request push eventsupdate_org_secretUpdate an organization secret.
Arguments:
namespace (string): Organization namespacename (string): Secret namevalue (string): Secret valuepull_request (boolean, optional): Allow in pull requestspull_request_push (boolean, optional): Allow in pull request push eventsdelete_org_secretDelete an organization secret.
Arguments:
namespace (string): Organization namespacename (string): Secret nameget_selfGet current authenticated user.
list_usersList all users.
get_userGet user details.
Arguments:
login (string): User login namecreate_userCreate a new user.
Arguments:
login (string): User login nameemail (string, optional): User emailadmin (boolean, optional): Admin privilegesactive (boolean, optional): Active statustoken (string, optional): User tokenupdate_userUpdate a user.
Arguments:
login (string): User login nameadmin (boolean, optional): Admin privilegesactive (boolean, optional): Active statusdelete_userDelete a user.
Arguments:
login (string): User login namelist_templatesList templates (optionally by namespace).
Arguments:
namespace (string, optional): Template namespaceget_templateGet template details and data.
Arguments:
namespace (string): Template namespacename (string): Template namecreate_templateCreate a new template.
Arguments:
namespace (string): Template namespacename (string): Template namedata (string): Template data (YAML)update_templateUpdate a template.
Arguments:
namespace (string): Template namespacename (string): Template namedata (string): Template data (YAML)delete_templateDelete a template.
Arguments:
namespace (string): Template namespacename (string): Template nameAccess build details via resource URI: drone://builds/{owner}/{repo}/{build}
Example:
Read resource: drone://builds/owner1/repo1/123
A multi-architecture Docker image is available on GitHub Container Registry:
# Pull the latest image
docker pull ghcr.io/yusiwen/drone-mcp-server:latest
# Run in stdio mode (for MCP clients)
docker run -e DRONE_SERVER=https://drone.example.com \
-e DRONE_TOKEN=your_token \
ghcr.io/yusiwen/drone-mcp-server
# Run in SSE mode with custom port
docker run -e DRONE_SERVER=https://drone.example.com \
-e DRONE_TOKEN=your_token \
-p 8080:8080 \
ghcr.io/yusiwen/drone-mcp-server --sse --host 0.0.0.0
# Run with SSE authentication
docker run -e DRONE_SERVER=https://drone.example.com \
-e DRONE_TOKEN=your_token \
-e MCP_AUTH_TOKEN=your_sse_token \
-p 8080:8080 \
ghcr.io/yusiwen/drone-mcp-server --sse --host 0.0.0.0
version: '3.8'
services:
drone-mcp-server:
image: ghcr.io/yusiwen/drone-mcp-server:latest
environment:
DRONE_SERVER: https://drone.example.com
DRONE_TOKEN: ${DRONE_TOKEN}
MCP_AUTH_TOKEN: ${MCP_AUTH_TOKEN:-}
ports:
- "8080:8080"
command: ["--sse", "--host", "0.0.0.0"]
restart: unless-stopped
Pre-built binaries are available for Linux (x64, arm64), macOS (x64, arm64), and Windows (x64) in the GitHub Releases.
The binary includes version information:
./drone-mcp-server --version
Output example:
drone-mcp-server
Version: v1.0.0
Commit: abc123
Build date: 2024-01-01T00:00:00Z
Go version: go1.25.1
.
├── main.go # Main entry point, handles command line arguments and server startup
├── tool/ # Tool handlers module
│ ├── build.go # Build-related tools (list_builds, get_build, restart_build, etc.)
│ ├── repo.go # Repository-related tools (list_repos, enable_repo, disable_repo, etc.)
│ ├── resource.go # Resource handling (drone://builds/...)
│ ├── cron.go # Cron job management tools
│ ├── secret.go # Secret management tools
│ ├── user.go # User management tools
│ └── template.go # Template management tools
├── test_env.sh # Test script (uses environment variables)
├── test_mcp.go # MCP integration test
└── README.md
go build -o drone-mcp-server .
Set environment variables and run the server:
export DRONE_SERVER=...
export DRONE_TOKEN=...
./drone-mcp-server
MIT
makafeli/n8n-workflow-builder
danishashko/make-mcp
lukisch/n8n-manager-mcp
io.github.us-all/airflow
io.github.infoinlet-marketplace/mcp-workflow