gocd-mcp
gocd-mcp
这是一个面向 GoCD 的 MCP 服务器。它将 GoCD 的 REST API 暴露为 MCP 工具,因此任何 MCP 客户端(Claude Code、Claude Desktop、Cursor)都可以读取流水线状态并驱动流水线。这里有两个实现,它们在协议层面行为完全一致:任选一种适合你安装方式的即可。
go/— Go 实现。以单个静态二进制文件或 Docker 镜像形式发布。冷启动快,内存占用低。ts/— TypeScript 实现。运行在 Node 上,无任何依赖,因此npx无需构建步骤。
两者返回相同的上下文精简输出:默认对仪表盘进行摘要,行按列组织,响应为紧凑的 JSON。完整的 GoCD 仪表盘跨多条流水线可达数 MB;这些工具会将其裁剪为模型所需的内容。
工具
读取工具(安全):
工具 | 功能 |
| 仪表盘健康状态。无参数 = 摘要; |
| 单个流水线的已暂停 / 已锁定 / 可调度状态 |
| 一次运行:各阶段及每个作业的结果,外加触发信息 |
| 单个流水线的最近运行记录。可选 |
| 一次阶段运行,包含每个作业的状态和代理 |
| 某个阶段的最近运行记录 |
| 两次运行之间的变更:每个 material 的提交 |
| 作业的产物文件,格式为 |
| 单个产物文件,按尾部截断( |
| 构建代理及其状态。可选 |
| 按 uuid 获取单个代理 |
| 已配置的 material。可选 |
| 环境及其流水线/变量计数 |
| 流水线组。可过滤以列出某个组的流水线 |
| 服务器健康消息,按级别计数 |
| GoCD 服务器版本 |
写入工具(操作):
工具 | 功能 |
| 调度一次流水线运行 |
| 暂停流水线 |
| 恢复流水线 |
设置 GOCD_READONLY=1 可隐藏这三个写入工具。大型列表(dashboard、pipeline_groups、materials、environments)会被摘要或可过滤,因此绝不会将原始的 MB 级响应体塞入模型上下文。
Related MCP server: Jenkins MCP Server
配置
两个环境变量,均为必填:
GOCD_BASE_URL=https://gocd.example.com
GOCD_ACCESS_TOKEN=<personal access token>GOCD_BASE_URL 是不带末尾 /go 的主机地址。工具会自行追加 /go/api/...。在 GoCD 中,进入个人资料下的 Personal Access Tokens 创建令牌。
安装
npx (Node >= 18),推荐
零安装,无需构建。这是运行服务器最简单的方式:
claude mcp add gocd -e GOCD_BASE_URL=... -e GOCD_ACCESS_TOKEN=... -- npx -y gocd-mcp已作为 gocd-mcp 发布到 npm,并作为 io.github.Sahilll15/gocd 发布到 MCP Registry,因此能识别 registry 的客户端可以按名称找到它。
Go 二进制
从 Releases 下载预构建的二进制文件,或自行构建:
cd go && go build -o gocd-mcp .注册它:
claude mcp add gocd -e GOCD_BASE_URL=... -e GOCD_ACCESS_TOKEN=... -- /path/to/gocd-mcpDocker
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要在开发期间直接运行 TypeScript 源码(Node >= 22.6,使用类型剥离):
cd ts && node --experimental-strip-types src/server.ts如何选择
它们在功能上完全相同。在本地基准测试中,Go 构建版本的启动速度快约 4 倍(冷启动约 21ms 对约 80ms),内存占用约为 TypeScript 版本的 1/6;每次请求的延迟则基本持平,因为 GoCD 网络往返耗时占主导。对于按会话生成的服务器,推荐使用 Go 二进制或 Docker 镜像;当你想要零安装路径且已安装 Node 时,推荐使用 npx。
目录结构
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 manifestThis server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Governed MCP gateway: one endpoint for your tools, with credential custody and audit log.
GitLab MCP — wraps the GitLab REST API v4 (BYO API key)
Read and write Mission Control state via MCP — projects, tasks, subtasks, templates, status updates.
GitHub MCP — wraps the GitHub public REST API (no auth required for public endpoints)
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables managing Jenkins operations like listing jobs, triggering builds, and checking build statuses through a configurable MCP server.310Apache 2.0
- AlicenseNot gradedqualityDmaintenanceEnables Jenkins CI/CD integration with job management, pipeline monitoring, artifact handling, and batch operations via MCP.494Apache 2.0
- FlicenseNot gradedqualityBmaintenanceEnables AI agents and external systems to programmatically trigger and monitor Jenkins jobs, retrieve build status and logs via MCP standards.
- AlicenseBqualityDmaintenanceEnables automated deployments, environment management, snapshots, and deployment monitoring through DevOps Deploy's REST API.1523MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Sahilll15/gocd-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server