Folio Rancher Jenkins MCP How-To
Overview
Jenkins MCP is a Model Context Protocol server that connects your AI assistant (GitHub Copilot, Claude, etc.) directly to Jenkins CI. It allows you to trigger pipelines, read console logs, check build statuses, and more — all from within your IDE chat, using your own Jenkins identity.
Prerequisites
A Jenkins account at jenkins.ci.folio.org
A Jenkins API token (see below)
VS Code with GitHub Copilot or another MCP-compatible AI client
Step 1: Generate Your Jenkins API Token
Log in to https://jenkins.ci.folio.org
Click your username in the top-right corner
Go to Configure
Under API Token, click Add new Token
Give it a name (e.g.
mcp-token) and click GenerateCopy the token — it will not be shown again
Step 2: Generate Your Base64 Credential
Run the following command in your terminal, replacing your_username and your_api_token with your actual values:
echo -n "your_username:your_api_token" | base64Copy the output string — you will use it in the next step.
Step 3: Configure VS Code
Open VS Code settings (Cmd+Shift+P → Open User Settings JSON) and add the following block:
{
"mcp": {
"servers": {
"jenkins-mcp": {
"type": "sse",
"url": "https://jenkins-mcp.ci.folio.org/sse",
"headers": {
"Authorization": "Basic <your_base64_string>"
}
}
}
}
}Replace <your_base64_string> with the value generated in Step 2.
Step 4: Start Using It
Once configured, open GitHub Copilot Chat (or your MCP client) and start interacting with Jenkins naturally.
Available Tools
Tool | What it does | Example prompt |
|---|---|---|
| List all Jenkins jobs, optionally inside a folder | "List all jobs in the |
| Search jobs by name | "Find jobs containing |
| Get full details of a job including last build | "Show me info for the |
| List all parameters a job accepts | "What parameters does |
| Trigger a build with optional parameters | "Trigger |
| List recent builds for a job | "Show the last 5 builds of |
| Get the result of a specific build | "What is the status of build 42 of |
| Read the console log of a build | "Show me the console log of the latest |
| Stop a running build | "Stop build 55 of |
| Check if a triggered build has started | "Is my queued build running yet?" |
Authentication Notes
Every request is made under your own Jenkins identity — builds you trigger appear as triggered by you in Jenkins audit logs.
Your credentials are passed per-request in the
Authorizationheader and are never stored on the server.The server does not hold any shared credentials.
Troubleshooting
Problem | Solution |
|---|---|
| Check that your base64 string is correct. Regenerate it with |
| Your Jenkins account does not have permission to perform that action |
Tool returns an error about a job not found | Verify the exact job name — use |
Console log is cut off | Use the |