mcpField
G
gocd

gocd

Local
github.com/Sahilll15Cloud & Infra1Updated 9w ago

About gocd

gocd-mcp exposes GoCD's REST API to MCP clients for inspecting and operating pipelines. Its Go and TypeScript implementations provide compact, filtered output to limit dashboard data in model context.

Key features

  1. 01Inspect pipeline and server status
  2. 02Review pipeline runs, stages, and history
  3. 03List agents, materials, and environments
  4. 04Compare runs and retrieve artifacts
  5. 05Trigger, pause, or resume pipelines
  6. 06Compact and filter large responses

Use cases

  1. 01Check pipeline health across a GoCD dashboard
  2. 02Investigate a failed stage or job
  3. 03Compare commits between pipeline runs
  4. 04Operate pipelines while limiting model context

MCP support

Exposes GoCD REST API capabilities as MCP tools, including read operations and pipeline controls. Set GOCD_READONLY=1 to hide the three write tools.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"sahilll15-gocd": {
"command": "npx",
"args": [
"-y",
"gocd-mcp"
],
"env": {
"GOCD_BASE_URL": "<GOCD_BASE_URL>",
"GOCD_ACCESS_TOKEN": "<GOCD_ACCESS_TOKEN>"
}
}
}
}
Run commandnpx -y gocd-mcp
Environment variables to set
GOCD_BASE_URLGoCD base host, e.g. https://gocd.example.com (no trailing /go)
GOCD_ACCESS_TOKENSecretGoCD personal access token

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npmgocd-mcp0.1.2

Tools

19

Saved tool list · updated 2w ago

ParameterTypeRequiredDescription
limitnumberNo
detailbooleanNo
filterstringNo
statusstringNo

Details

From the project 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.com
GOCD_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:

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:

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

Register it:

claude mcp add gocd -e GOCD_BASE_URL=... -e GOCD_ACCESS_TOKEN=... -- /path/to/gocd-mcp
Docker
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):

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

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.