loading…
Search for a command to run...
loading…
A TypeScript-based MCP server scaffold designed for monitoring and interacting with Drone CI environments. It provides tools for webhook parsing, HMAC signature
A TypeScript-based MCP server scaffold designed for monitoring and interacting with Drone CI environments. It provides tools for webhook parsing, HMAC signature verification, and state management for CI/CD pipelines.
MCP server scaffold for Drone CI.
This repository currently provides:
stdio (SDK-based),Still pending before production use:
See docs/implementation-plan.md.
npm install
cp .env.example .env
Then 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 build
npm test
npm start
npm start launches the MCP server on stdio. Configure your MCP client to spawn:
nodedist/index.jsDRONE_BASE_URL, optional tuning vars (and DRONE_WEBHOOK_SECRET only 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:
DRONE_BASE_URL or DRONE_TOKEN being inherited automatically by a local stdio MCP process,DRONE_* values must usually be set explicitly in the server env block,DRONE_TOKEN to a placeholder like "${DRONE_TOKEN}" in MCP env if your client does not expand placeholders; otherwise the literal string is sent and Drone authentication fails (401).Client compatibility note:
inputSchema values are intentionally kept permissive to improve compatibility with clients such as JetBrains and Codex.drone_ping is available as a minimal no-input diagnostic tool to verify that a client can discover and invoke tools correctly.To enable webhook-driven state cache:
MCP_WEBHOOK_PORT to a non-zero port (for example 8080).DRONE_WEBHOOK_SECRET to the shared secret configured in Drone.http://<host>:<MCP_WEBHOOK_PORT><MCP_WEBHOOK_PATH>/webhook/droneOptional fallback polling:
MCP_RECONCILE_INTERVAL_MS (for example 5000) to periodically refresh active builds from Drone API.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 stateAction tools (only when MCP_ENABLE_WRITE_ACTIONS=true):
drone_restart_builddrone_stop_builddrone_approve_builddrone_decline_buildBuild filters supported by drone_list_builds:
owner and repo are always requiredprNumbersourceBranchtargetBranchpage and limitNumeric inputs:
drone_list_builds searches report when the repository scan limit is hit, instead of silently returning a false negativeExample:
{
"name": "drone_list_builds",
"arguments": {
"owner": "leuzeus",
"repo": "gowire",
"prNumber": 510,
"sourceBranch": "S076-gcmp-v2-planning",
"targetBranch": "dev",
"limit": 5
}
}
This MCP is designed so agents can stay efficient if they use the tools in the intended order:
drone_list_builds to search.drone_get_build only for the specific build you want to inspect in detail.drone_get_build_logs with limitChars when you need failure evidence.Important behavior:
drone_list_builds returns compact build summaries, not full build payloadsmessage and other verbose fields are reserved for drone_get_buildRecommended agent patterns:
owner/repo + prNumber for PR-centric queriesowner/repo + sourceBranch + targetBranchlimit small whenever possibledrone_list_repos unless cross-repository discovery is explicitly neededdrone_list_builds calls without filters on large repositoriesRecommended order of precision:
owner/repo + buildNumberowner/repo + prNumberowner/repo + sourceBranch + targetBranchowner/repo + targetBranchRequired:
DRONE_BASE_URL: Drone base URL (for example https://drone.example.com)DRONE_TOKEN: Drone API tokenOptional:
DRONE_ALLOW_INSECURE_HTTP (default false, only set true for trusted internal Drone deployments without TLS)DRONE_TIMEOUT_MS (default 10000)DRONE_MAX_RETRIES (default 2)MCP_ENABLE_WRITE_ACTIONS (default false)MCP_RECONCILE_INTERVAL_MS (default 0, disabled)MCP_WEBHOOK_PORT (default 0, disabled)MCP_WEBHOOK_PATH (default /webhook/drone)DRONE_WEBHOOK_SECRET (required when MCP_WEBHOOK_PORT > 0).env local and use .env.example as template only.MCP_ENABLE_WRITE_ACTIONS=false) until authorization guardrails are in place.This repository is configured to enforce:
main (PR required, stale review dismissal),test),Добавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"drone-ci-mcp-server": {
"command": "npx",
"args": []
}
}
}