GoCD MCP Server
Provides tools for interacting with the GoCD continuous delivery platform, enabling AI assistants to manage pipelines, stages, and jobs, check status, trigger builds, and analyze job failures.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@GoCD MCP Serveranalyze why the build-and-test pipeline failed"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
GoCD MCP Server
An MCP (Model Context Protocol) server that provides tools for interacting with GoCD, a continuous delivery platform, through AI assistants.
It exposes the GoCD REST API as MCP tools, so an assistant can query and manage pipelines, stages, and jobs.
Available Tools
Pipeline Management
list_pipelines- Browse all pipelines with their groups and pause statusget_pipeline_status- Check if a pipeline is running, paused, or lockedget_pipeline_history- View recent pipeline runs and their resultsget_pipeline_instance- Get detailed information about a specific pipeline runtrigger_pipeline- Manually start a pipeline runpause_pipeline/unpause_pipeline- Control pipeline scheduling
Stage Operations
get_stage_instance- View stage details including all jobs and their statustrigger_stage- Manually trigger or retry a stagecancel_stage- Stop a running stage
Job Analysis
parse_gocd_url- Extract pipeline/stage/job info from GoCD URLsanalyze_job_failures- Get failure analysis including test results and console logsget_job_history- View job execution historyget_job_instance- Check job status and detailsget_job_console- Read build logs and error outputlist_job_artifacts- Browse artifacts produced by a jobget_job_artifact- Download specific artifact filesparse_junit_xml- Extract structured test results from JUnit XML reports
Example Queries
"Get all errors for this job ": parses the URL, then analyzes failures
"Show me why the build failed": finds test failures and build errors
"List all pipelines": browse available pipelines
"Trigger the deployment stage": run a stage manually
GoCD API Compatibility
This MCP server integrates with the GoCD REST API and is compatible with GoCD 19.8.0 and later.
The server uses the following GoCD API versions:
v1 - Pipeline status, history, instances, jobs
v2 - Stage triggering
v3 - Stage instances and cancellation
v4 - Dashboard and pipeline groups
For detailed API documentation, refer to the GoCD API Reference.
Development
npm run dev: Run in development mode with tsxnpm run build: Compile TypeScript to JavaScriptnpm run format: Format code with Prettiernpm run inspect: Open the MCP inspector for testing (start the server separately first)
The server will listen on the configured host and port (default: http://0.0.0.0:3000).
Configuration
Set the following environment variables on the server:
GOCD_SERVER_URL: The URL of your GoCD server (e.g.,https://gocd.example.com)MCP_HOST: Host to bind the MCP server to (default:0.0.0.0)MCP_PORT: Port for the MCP server to listen on (default:3000)
You can create a .env file in the project root:
GOCD_SERVER_URL=https://your-gocd-server.com
MCP_HOST=0.0.0.0
MCP_PORT=3000Note: Each user provides their own GoCD API token when authenticating. The server holds no shared token.
Debug Logging
Enable debug output using the DEBUG environment variable:
# Enable all debug logs
DEBUG=gocd-mcp:* npm run dev
# Enable specific namespaces
DEBUG=gocd-mcp:tools,gocd-mcp:client npm run dev
# With Docker
docker run -d -e DEBUG=gocd-mcp:* --env-file=.env -p 3000:3000 gocd-mcpAvailable namespaces:
gocd-mcp:server- Server startup and shutdowngocd-mcp:http- HTTP requests to the MCP endpointgocd-mcp:session- MCP session lifecyclegocd-mcp:tools- Tool calls and dispatchgocd-mcp:client- GoCD API requests
Deployment
The repository includes a Dockerfile. Create your .env, then:
docker build -t gocd-mcp .
docker run -d --env-file=.env -p <YOUR_LOCAL_PORT>:<MCP_PORT> gocd-mcp
# With debug logging enabled
docker run -d -e DEBUG=gocd-mcp:* --env-file=.env -p <YOUR_LOCAL_PORT>:<MCP_PORT> gocd-mcpTesting
npm testTesting with MCP Inspector
Start the server:
npm run devOpen the inspector:
npm run inspectIn the inspector UI, connect to:
http://localhost:3000/mcpAdd header:
Authorization: Bearer YOUR_GOCD_API_TOKEN
Connecting GoCD MCP to your AI
The server communicates via HTTP and exposes the MCP protocol at the /mcp endpoint. Users authenticate by providing their GoCD API token as a Bearer token.
Claude Code
claude mcp add --transport http gocd-mcp https://api.example.com/mcp --header "Authorization: Bearer your-gocd-token"GitHub Copilot (VS Code)
Add this server to your Copilot settings:
Open VS Code Settings (JSON)
Add the MCP server configuration:
{
"github.copilot.chat.mcp.servers": {
"gocd": {
"url": "https://your-mcp-server-domain.com/mcp",
"headers": {
"Authorization": "Bearer YOUR_GOCD_API_TOKEN"
}
}
}
}Important:
Replace
https://your-mcp-server-domain.comwith the actual URL where your GoCD MCP server is hosted (e.g.,http://localhost:3000for local development)Replace
YOUR_GOCD_API_TOKENwith your personal GoCD API token (generate from GoCD: User Menu > Personal Access Tokens)Each user provides their own GoCD API token for authentication
Troubleshooting
"Server not initialized" Error
This error occurs when the MCP session was never established. To fix:
Ensure the server is running (
npm run dev)Disconnect and reconnect in your MCP client
Verify you're connecting to the correct endpoint:
http://localhost:3000/mcpMake sure you've included the
Authorizationheader with your Bearer token
Authentication Failed
If you receive an "UNAUTHORIZED" error:
Verify your GoCD API token is valid
Check the token has the necessary permissions in GoCD
Ensure the Authorization header is formatted as
Bearer YOUR_TOKENGenerate a new token from GoCD (User Menu > Personal Access Tokens)
Connection Refused
If you cannot connect to the server:
Check the server is running:
curl http://localhost:3000/healthVerify
MCP_HOSTandMCP_PORTin your.envfileCheck for port conflicts, port 3000 must be free
If hosting remotely, ensure firewall rules allow the connection
GoCD API Errors
If you receive errors from the GoCD API:
Verify
GOCD_SERVER_URLis correct in your.envfileEnsure the GoCD server is accessible from the MCP server
Check your GoCD server version is 19.8.0 or later
Verify the pipeline/stage/job names are correct
Requirements
Node.js >= 24.0.0
Author
Rushi Vishavadia
This server cannot be deployed
Maintenance
Related MCP Connectors
The Buildkite MCP server exposes Buildkite product data (pipelines, builds, jobs, and test data) to AI tools, editors, and agents through the Model Context Protocol. It provides capabilities including pipeline creation and management, build monitoring with specialized tools like 'wait_for_build', efficient log querying using Apache Parquet conversion and caching, and OAuth-based authentication for both read-write and read-only access to Buildkite's REST API.
Plan Salesforce deploys, open pull requests and trigger pipelines from your AI client.
The Cortex MCP server provides read-only access to real-time engineering context from the Cortex developer portal, allowing AI coding assistants to answer natural language questions about your organization's catalog (microservices, libraries, domains, teams, infrastructure), scorecards (engineering standards and best practices), initiatives (goals and deadlines), and Engineering Intelligence metrics. It includes tools for querying documentation, tracking personal entities, and accessing AI-assisted insights across the entire Cortex ecosystem.
Direct access to Cypress tests results and accessibility reports in your AI workflow.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with Jenkins CI/CD systems for build management, job monitoring, console log analysis, and debugging through natural language commands.2MIT
- AlicenseNot gradedqualityNot gradedmaintenanceEnables AI agents to monitor and debug GitLab CI/CD pipelines by providing tools to list pipelines, retrieve job logs, and analyze failure root causes. It features automated error pattern extraction and failure analysis to streamline pipeline troubleshooting.-
- AlicenseNot gradedqualityCmaintenanceProvides Jenkins CI/CD integration for AI assistants through the Model Context Protocol, enabling job management, build control, and system administration via natural language commands.1MIT
- AlicenseBqualityDmaintenanceEnables AI assistants to interact with Jenkins CI/CD servers, including checking build status, triggering builds, and retrieving build logs.8MIT