SuperAPI AI Directory

woodpecker-ci-mcp

Drive a self-hosted Woodpecker CI: read failing step logs, restart, cancel or approve pipelines, and manage secrets, registries, crons, agents and the queue.

Open website

About this tool

woodpecker-ci-mcp is a Model Context Protocol (MCP) server used to connect to and drive Woodpecker CI—a lightweight, container-native CI engine. It enables MCP clients such as Claude Code, Claude Desktop, and Codex to see which pipelines failed, read the build logs of failed steps, and take corresponding action: restart, cancel runaway builds, approve blocked pipelines, rotate secrets, fix crons, and more. Irreversible operations are first handed to a human for confirmation, and write tools can be disabled entirely.

Main capabilities

This server covers the complete API of Woodpecker 3.18.0, rather than only the read-only portion, providing 71 tools in total, including repositories, pipelines, logs, secrets, registries, crons, organizations, users, agents, forges, queues, and log levels.

71 tools are an upper bound rather than a lower bound: setting WOODPECKER_ALLOW_TOOLS=essential registers only a curated set of 8 tools (list_repositories, get_repository, list_pipelines, get_pipeline, get_step_logs, trigger_pipeline, restart_pipeline, cancel_pipeline); a model choosing the correct tool from 8 tools is far more reliable than from 71.

Logs are returned as text. Woodpecker returns step output as an array of base64-encoded chunks with line numbers. get_step_logs decodes and reorders them, reports the step exit code, and by default returns the end of the log—failed steps usually explain the reason in the last few lines.

Agent tokens are not passed to the model. GET /agents returns each agent's token in plaintext, and that token is enough to connect a machine to the server and receive pipeline workloads with secrets. When agents are listed through this server, they are redacted. create_agent still returns the token (this is the only way to obtain it) and explains its nature.

It understands the nuances of this API. For example, /version and /healthz are outside the /api prefix, GET /api/version returns the Web UI rather than a 404; a repository that exists in the forge is a 404 here until it is activated; perPage over 50 is silently truncated; cron schedules have five fields rather than six; a secret without an event list is rejected.

Usage

A Woodpecker personal access token is required (obtained in "CLI and API" in user settings). This token has no scopes and has the full permissions of the account.

WOODPECKER_URL is the server root address rather than the API root address: it should be https://woodpecker.example.com,而不是 https://woodpecker.example.com/api。两者均可接受(后缀会被裁剪)。

Please use https://。在纯 Under http, the token is transmitted unencrypted; unless the host is local, the server will output a warning. For self-signed certificates, it is recommended to use a suitable internal CA rather than WOODPECKER_INSECURE_TLS.

When not configured, the server will still start and list the tools (for registry and inspector introspection); but every call will fail and return setup instructions instead of accessing the API. get_server_info works without a token, so when none of the other tools work, it should be called first: if it responds, then WOODPECKER_URL is correct and the problem is the token.

Administrator-only tools: Woodpecker inherits repository and organization permissions from the forge, and reserves users, agents, forges, queues, and log levels for instance administrators. These tools are registered for everyone, but accounts without permission will receive 403; get_current_user can report which type of account the token belongs to, and WOODPECKER_DENY_TOOLS is the clean way to stop offering these tools entirely.

Choosing which tools to load

WOODPECKER_ALLOW_TOOLS and WOODPECKER_DENY_TOOLS accept comma-separated tool names; a trailing * matches the entire series. essential is a curated preset.

With 71 tools, this is not an optional choice. Every visible tool consumes context on every request, and a server that offers both delete_forge and get_step_logs should not be pointed at production CI before narrowing the scope first.

An entry that matches no tools will cause startup to abort and point out that entry, so a typo will not silently hide a tool. Filtered tools are not registered at all, so they do not exist in tools/list and are not visible to tools/call.

If multiple such servers are running at the same time, mcp-hub is another option—its /hub endpoint replaces each server's tools with six meta-tools.

If Woodpecker can only be resolved through the host's split DNS, add --dns <resolver>: the container will not inherit the host's resolver configuration, and the public answer for an internal name is usually an address that cannot respond.

Via mcp-hub: clients that cannot spawn local processes (ChatGPT connectors, Web version of Claude, Cursor, LibreChat) can access woodpecker-ci-mcp via mcp-hub: a single container serves multiple stdio MCP servers over Streamable HTTP, providing OAuth 2.1 login behind a single password, and offering long-lived tokens for clients that cannot use OAuth.

Tool descriptions

Read tools are always registered. 🛡 marks tools that require an instance administrator; 👤 marks tools that first ask a human via MCP elicitation, falling back to a two-call confirm_token when the client cannot display a dialog.

Every tool declares an outputSchema and returns structuredContent alongside the text block, so clients can use results without parsing text. Seventeen tools that previously answered with sentences (such as "Pipeline 12 was cancelled.") now also return fields. get_step_logs keeps the rendered header plus logs in text, and describes the exit code, line count, and output as fields.

Tools that report pushed content carry untrusted: true and source: "woodpecker" fields; branch names, commit messages, pipeline titles, and build logs—the raw stdout of arbitrary containers—are written by anyone who can push.

Woodpecker objects are described as open objects with top-level keys constructed by this server. The upstream Go model changes what is serialized between versions, and the SDK validates each result against its schema before the result is emitted.

Coverage

Pipelines and logs; secrets, registries, and cron (scope selects repository, organization, or global level); account, organization, and instance administration.

What is deliberately not exposed

POST / DELETE /user/token: these return and rotate the personal access token of the account this server authenticates as.

POST /hook: the forge webhook endpoint. Calling it means forging push events. trigger_pipeline is the more honest version.

/debug/pprof/*: nine Go profiling data endpoints. Heap dumps do not belong in a model context.

/stream/events and /stream/logs: server-sent event streams are not suitable for request/response tools. Poll get_pipeline instead.

Badge endpoints: they return SVG and XML for embedding, not information.

Operations requiring human confirmation

Twenty-four operations ask a human. All delete_*, plus move_repository, chown_repository, the whole-instance repair_repository, create_forge, update_forge, pause_queue and approve_pipeline — and six more only in the upgrade direction.

In clients that support MCP elicitation, this is a real dialog that the model cannot answer on the user's behalf. In clients that do not, the first call returns a short-lived token bound to those exact parameters, and only the second call carrying it will execute. Either way, approval for one repository is not approval for another, and approval for one tool is not approval for another. ELICITATION=false deliberately takes the fallback path; it never removes the guardrail.

Security notes

Agent tokens are redacted on read. create_agent is a necessary exception.

Secret values and image registry passwords are never returned, and not because the server hides them: Woodpecker strips them from every response, including the response returned immediately after creation.

Build logs, commit messages and pipeline metadata are marked as untrusted data. Confirmation prompts never quote anything from the API.

Error bodies are truncated, HTML error pages are discarded, and every response has a byte cap while streaming. Log output has its own smaller budget and states when it has been truncated.

WOODPECKER_READ_ONLY=true does not register write tools at all, and WOODPECKER_DENY_TOOLS trims more finely along the same lines.

Tokens are deleted from process.env immediately after reading, are never sent to redirect targets, and are never echoed into error messages.

The full guide, tool reference and security notes are at woodpecker-ci-mcp.ni-c.de (source in docs/).

When to use it

Suitable for teams that need to involve AI assistants in theday-to-day operations of Woodpecker CI: troubleshooting failed builds, quickly restarting or cancelling pipelines, managing secrets and cron, viewing pipeline status, and so on. Through mcp-hub, clients without local process capability can also connect.

Limitations

Requires a valid Woodpecker personal access token with full account privileges. Admin-only tools return 403 for non-admins. Some operations require human confirmation, and fall back to confirm_token when the client does not support dialogs. User token management, forge webhooks, profiling, event streams and badge endpoints are not exposed. Free or paid status is not currently provided. The project uses the MIT license, author Willi Thiel.