Gocd

io.github.Sahilll15由 GitHub 账号 Sahilll15 发布v0.1.2更新于 Oct 24, 2026

MCP server for GoCD: dashboard, pipelines, artifacts, agents. Context-lean output.

概览

AI 生成的概览

让助手读取 GoCD 的流水线、阶段、代理和制品状态,并可触发、暂停或恢复流水线。

可以做什么
把 GoCD 的 REST API 封装为 MCP 工具。读取类工具覆盖仪表盘、流水线状态、单次运行与历史、阶段运行与历史、两次运行对比、制品、代理、材料、环境、流水线分组、服务器健康与版本。三个写入类工具可调度流水线运行、暂停流水线或恢复流水线。输出经过汇总并按列组织,保持精简。
适用场景
当助手需要查看 GoCD 服务器上的持续交付状态时使用,例如排查流水线失败原因、对比两次运行或读取构建制品。也适合在聊天客户端中触发或暂停流水线。
运行要求
以 stdio 方式在本地运行,可用 Node 18 及以上版本的 npx、Go 二进制文件或 Docker 镜像。需要 GOCD_BASE_URL(裸主机名,末尾不带 /go)和 GOCD_ACCESS_TOKEN(在用户资料中创建的 GoCD 个人访问令牌)。需要能访问 GoCD 服务器的网络。
安装前请注意
GOCD_ACCESS_TOKEN 是机密,拥有该 GoCD 账号的全部权限。写入类工具 gocd_trigger_pipeline、gocd_pause_pipeline 和 gocd_unpause_pipeline 会改变服务器状态;设置 GOCD_READONLY=1 可隐藏它们。制品内容和流水线数据会发送给模型提供方。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Gocd,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

gocd-mcp

An MCP server for GoCD. It exposes GoCD's REST API as MCP tools so any MCP client (Claude Code, Claude Desktop, Cursor) can read pipeline state and drive pipelines. Two implementations live here and behave identically on the wire: pick whichever fits how you want to install it.

  • go/ — Go implementation. Ships as a single static binary or a Docker image. Fast cold start, low memory.
  • ts/ — TypeScript implementation. Runs on Node with no dependencies, so npx needs no build step.

Both return the same context-lean output: the dashboard is summarized by default, rows are column-oriented, and responses are compact JSON. A full GoCD dashboard is several MB across many pipelines; these tools trim it to what the model needs.

Tools

Read tools (safe):

ToolWhat it does
gocd_dashboardDashboard health. No args = summary; filter/status/detail drill down
gocd_pipeline_statusPaused / locked / schedulable for one pipeline
gocd_pipeline_instanceOne run: stages with per-job result, plus trigger
gocd_pipeline_historyRecent runs for one pipeline. Optional limit
gocd_stage_instanceOne stage run with per-job state and agent
gocd_stage_historyRecent runs of one stage
gocd_compareWhat changed between two runs: commits per material
gocd_list_artifactsA job's artifact files as [path, url]
gocd_get_artifactOne artifact file, tail-capped (cap_kb) to stay context-lean
gocd_list_agentsBuild agents and state. Optional filter, limit
gocd_get_agentOne agent by uuid
gocd_materialsConfigured materials. Optional filter
gocd_environmentsEnvironments and their pipeline/var counts
gocd_pipeline_groupsPipeline groups. Filter to list a group's pipelines
gocd_server_healthServer health messages, counted by level
gocd_versionGoCD server version

Write tools (operate):

ToolWhat it does
gocd_trigger_pipelineSchedule a pipeline run
gocd_pause_pipelinePause a pipeline
gocd_unpause_pipelineResume a pipeline

Set GOCD_READONLY=1 to hide the three write tools. Large listings (dashboard, pipeline_groups, materials, environments) are summarized or filterable so they never dump the raw multi-MB body into the model's context.

Configuration

Two environment variables, both required:

GOCD_BASE_URL=https://gocd.example.comGOCD_ACCESS_TOKEN=<personal access token>

GOCD_BASE_URL is the bare host, without a trailing /go. The tools append /go/api/... themselves. Create the token in GoCD under your profile, Personal Access Tokens.

Install

npx (Node >= 18), recommended

Zero install, nothing to build. This is the simplest way to run the server:

bash
claude mcp add gocd -e GOCD_BASE_URL=... -e GOCD_ACCESS_TOKEN=... -- npx -y gocd-mcp

Published on npm as gocd-mcp and on the MCP Registry as io.github.Sahilll15/gocd, so registry-aware clients can find it by name.

Go binary

Download a prebuilt binary from Releases, or build it:

bash
cd go && go build -o gocd-mcp .

Register it:

bash
claude mcp add gocd -e GOCD_BASE_URL=... -e GOCD_ACCESS_TOKEN=... -- /path/to/gocd-mcp

Docker

bash
claude mcp add gocd -e GOCD_BASE_URL=... -e GOCD_ACCESS_TOKEN=... \  -- docker run -i --rm -e GOCD_BASE_URL -e GOCD_ACCESS_TOKEN ghcr.io/sahilll15/gocd-mcp

To run the TypeScript source directly during development (Node >= 22.6, uses type-stripping):

bash
cd ts && node --experimental-strip-types src/server.ts

Which one

They are functionally identical. In a local benchmark the Go build started about 4x faster (~21ms vs ~80ms cold start) and used about 6x less memory; per-request latency was a tie because the GoCD network round-trip dominates. Prefer the Go binary or Docker image for a spawned-per-session server; prefer npx when you want the zero-install path and already have Node.

Layout

gocd-mcp/├── go/            Go implementation (main.go, internal/gocd)├── ts/            TypeScript implementation (src/server.ts source; publishes as compiled dist/server.js)├── Dockerfile     builds the Go binary into a distroless image├── .goreleaser.yaml + .github/workflows/release.yml   prebuilt binaries + ghcr image on tag└── server.json    MCP Registry manifest

来源:README.md,提交 c03fa4f

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.1.2最新Sep 16, 2026

评分

已满足适用检查项的 40%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

    请在仓库或注册中心条目中声明许可证。