Provides monitoring and interaction capabilities for Drone CI, including webhook parsing, HMAC signature verification, and management of CI/CD pipeline state.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Drone CI MCP ServerCheck the status of the latest build for the web-app repository"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcp-drone-ci
MCP server scaffold for Drone CI.
Status
This repository currently provides:
a TypeScript project scaffold,
a working Drone HTTP client (read + action endpoints),
a real MCP server entrypoint on
stdio(SDK-based),MCP tool/resource definitions for Drone CI monitoring,
webhook parsing and HMAC signature verification,
optional Drone webhook HTTP receiver with in-memory build-state cache,
basic policy/state modules,
initial unit tests.
Still pending before production use:
webhook event processing to store richer build metadata from payloads,
persistence backend (DB/Redis) for state beyond process memory,
broader integration tests against mock Drone API/webhook payloads.
Implementation Plan
See docs/implementation-plan.md.
Requirements
Node.js 20+
npm 10+
Quick Start
Install dependencies:
npm installReview the required environment variables:
cp .env.example .envThen export the values in your shell or pass them explicitly in your MCP client configuration. This project does not load .env automatically.
3. Build:
npm run buildRun tests:
npm testStart:
npm startRun As MCP (stdio)
npm start launches the MCP server on stdio. Configure your MCP client to spawn:
command:
nodeargs:
dist/index.jsenv:
DRONE_BASE_URL, optional tuning vars (andDRONE_WEBHOOK_SECRETonly if webhook is enabled)
Example MCP config:
{
"mcpServers": {
"drone-ci": {
"command": "node",
"args": ["G:\\projets\\mcp-drone-ci\\dist\\index.js"],
"env": {
"DRONE_BASE_URL": "https://drone.example.com",
"DRONE_TOKEN": "replace-with-drone-token",
"MCP_ENABLE_WRITE_ACTIONS": "false",
"MCP_WEBHOOK_PORT": "0",
"MCP_RECONCILE_INTERVAL_MS": "5000"
}
}
}
}Windows/JetBrains/Codex note:
do not rely on custom parent environment variables such as
DRONE_BASE_URLorDRONE_TOKENbeing inherited automatically by a local stdio MCP process,many MCP stdio launchers only forward a safe subset of environment variables, so
DRONE_*values must usually be set explicitly in the serverenvblock,do not set
DRONE_TOKENto a placeholder like"${DRONE_TOKEN}"in MCPenvif your client does not expand placeholders; otherwise the literal string is sent and Drone authentication fails (401).
Client compatibility note:
MCP tool
inputSchemavalues are intentionally kept permissive to improve compatibility with clients such as JetBrains and Codex.Strict business validation still happens in the tool handlers, so invalid empty strings or non-positive integers are rejected at execution time rather than at MCP discovery/schema time.
drone_pingis available as a minimal no-input diagnostic tool to verify that a client can discover and invoke tools correctly.
Real-time CI Tracking
To enable webhook-driven state cache:
Set
MCP_WEBHOOK_PORTto a non-zero port (for example8080).Set
DRONE_WEBHOOK_SECRETto the shared secret configured in Drone.Configure Drone webhook target to:
http://<host>:<MCP_WEBHOOK_PORT><MCP_WEBHOOK_PATH>default path is
/webhook/drone
Optional fallback polling:
set
MCP_RECONCILE_INTERVAL_MS(for example5000) to periodically refresh active builds from Drone API.
MCP Tools
Read tools:
drone_ping: minimal diagnostic tool returning{ ok: true, server: "mcp-drone-ci" }drone_list_repos: list repositories visible to the Drone tokendrone_list_builds: list build summaries for a repositorydrone_get_build: fetch full details for one builddrone_get_build_logs: fetch one stage/step log stream, with optional truncationdrone_get_cached_build_state: inspect webhook-cached build state
Action tools (only when MCP_ENABLE_WRITE_ACTIONS=true):
drone_restart_builddrone_stop_builddrone_approve_builddrone_decline_build
Build filters supported by drone_list_builds:
ownerandrepoare always requiredoptional
prNumberoptional
sourceBranchoptional
targetBranchoptional
pageandlimit
Numeric inputs:
build identifiers and pagination values are exposed as generic MCP numbers for broad client compatibility
integer, positivity, and max-value checks are enforced by the server when the tool is executed
filtered
drone_list_buildssearches report when the repository scan limit is hit, instead of silently returning a false negative
Example:
{
"name": "drone_list_builds",
"arguments": {
"owner": "leuzeus",
"repo": "gowire",
"prNumber": 510,
"sourceBranch": "S076-gcmp-v2-planning",
"targetBranch": "dev",
"limit": 5
}
}Token Efficiency
This MCP is designed so agents can stay efficient if they use the tools in the intended order:
Use
drone_list_buildsto search.Use
drone_get_buildonly for the specific build you want to inspect in detail.Use
drone_get_build_logswithlimitCharswhen you need failure evidence.
Important behavior:
drone_list_buildsreturns compact build summaries, not full build payloadsthe full build
messageand other verbose fields are reserved fordrone_get_buildMCP JSON responses are serialized compactly to reduce token overhead
Recommended agent patterns:
prefer
owner/repo + prNumberfor PR-centric queriesotherwise use
owner/repo + sourceBranch + targetBranchkeep
limitsmall whenever possibleavoid
drone_list_reposunless cross-repository discovery is explicitly neededavoid broad
drone_list_buildscalls without filters on large repositories
Recommended order of precision:
owner/repo + buildNumberowner/repo + prNumberowner/repo + sourceBranch + targetBranchowner/repo + targetBranch
Environment Variables
Required:
DRONE_BASE_URL: Drone base URL (for examplehttps://drone.example.com)DRONE_TOKEN: Drone API token
Optional:
DRONE_ALLOW_INSECURE_HTTP(defaultfalse, only settruefor trusted internal Drone deployments without TLS)DRONE_TIMEOUT_MS(default10000)DRONE_MAX_RETRIES(default2)MCP_ENABLE_WRITE_ACTIONS(defaultfalse)MCP_RECONCILE_INTERVAL_MS(default0, disabled)MCP_WEBHOOK_PORT(default0, disabled)MCP_WEBHOOK_PATH(default/webhook/drone)DRONE_WEBHOOK_SECRET(required whenMCP_WEBHOOK_PORT > 0)
Security Notes
Do not commit real tokens or webhook secrets.
Keep
.envlocal and use.env.exampleas template only.Use a read-only Drone token by default.
Keep write actions disabled (
MCP_ENABLE_WRITE_ACTIONS=false) until authorization guardrails are in place.
Repository Protection
This repository is configured to enforce:
branch protection on
main(PR required, stale review dismissal),required status check (
test),linear history and no force-push,
signed commits on protected branch,
secret scanning and push protection,
Dependabot security updates.
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.