jenkins-slack-mcp
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., "@jenkins-slack-mcpTrigger build for job /buildtt on branch main, Slack #deployments"
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.
jenkins-slack-mcp
MCP server to trigger Jenkins builds from any IDE with Slack DM notifications. Auto-discovers all jobs on login — no manual configuration.
Install
npm install -g jenkins-slack-mcpRelated MCP server: jenkins-server-mcp
Register in your IDE
Amazon Q
~/.aws/amazonq/mcp.json:
{
"mcpServers": {
"jenkins-slack": {
"command": "jenkins-slack-mcp",
"args": [],
"disabled": false
}
}
}VS Code
.vscode/mcp.json:
{
"mcpServers": {
"jenkins-slack": { "command": "jenkins-slack-mcp" }
}
}Claude Desktop
~/Library/Application Support/Claude/claude_desktop_config.json (macOS):
{
"mcpServers": {
"jenkins-slack": { "command": "jenkins-slack-mcp" }
}
}Cursor
.cursor/mcp.json:
{
"mcpServers": {
"jenkins-slack": { "command": "jenkins-slack-mcp" }
}
}Without global install
{
"mcpServers": {
"jenkins-slack": {
"command": "npx",
"args": ["-y", "jenkins-slack-mcp"]
}
}
}Flow of Work
┌─────────────────────────────────────────────────────────┐
│ 1. login_jenkins (baseUrl only) │
│ → Opens browser to Jenkins token page │
│ → User copies API token + build trigger token │
│ │
│ 2. login_jenkins (all params) │
│ → Validates credentials │
│ → Auto-discovers ALL jobs from Jenkins │
│ → Stores encrypted at ~/.jenkins-slack-mcp/ │
│ │
│ 3. list_jobs / list_jobs filter="tms" │
│ → Shows jobs in table with status (✅ ❌ ⏸️) │
│ │
│ 4. job_details jobName="my-job" │
│ → Shows all parameters (name, type, default, │
│ choices) in table format │
│ │
│ 5. trigger_build jobName="my-job" params={...} │
│ → Triggers build with params │
│ → Sends Slack DM to you (if configured) │
│ → Posts to channel (if notifyChannel provided) │
└─────────────────────────────────────────────────────────┘Usage
Step 1: Login to Jenkins
First time — just provide the URL, browser opens automatically:
login_jenkins baseUrl="https://jenkins.example.com"→ Browser opens Jenkins → Copy your API token and build trigger token.
Then login with full credentials:
login_jenkins:
baseUrl: https://jenkins.example.com
user: your_username
apiToken: your_api_token
buildToken: your_build_trigger_token→ All jobs auto-discovered!
Step 2: Browse Jobs
list_jobs # all jobs
list_jobs filter="tms" # filter by nameOutput:
# | Job Name | Status |
1 | build-main | ✅ Success |
2 | lib-packages | ✅ Success |
3 | job-constant | ✅ Success |
Step 3: Check Parameters
job_details jobName="tms-docker-build-new"Output:
Parameter | Type | Default | Choices | Description |
BRANCH | String | main | - | Branch to build |
Step 4: Trigger Build
trigger_build jobName="tms-docker-build-new" params={"BRANCH": "feature/xyz"}Step 5 (Optional): Setup Slack DMs
setup_slack:
botToken: xoxb-your-bot-token
userId: U0123456789How to get your Slack User ID:
Open Slack → Click your profile picture
Click "Profile" → Click "..." (more)
Click "Copy Member ID"
How to get bot token:
Go to https://api.slack.com/apps → Your App
OAuth & Permissions → Bot User OAuth Token (starts with
xoxb-)
After setup, every trigger_build sends you a DM automatically.
Available Tools
Tool | Description |
| Login + auto-discover jobs (opens browser for new users) |
| Configure Slack bot token + User ID for DM notifications |
| Check login status + job count |
| All jobs in table format (filterable) |
| Show parameters for a job |
| Trigger build + Slack DM + channel notify |
| Re-fetch jobs from Jenkins |
| Current user details |
| Clear all credentials |
Security
BuildPilot follows OWASP security best practices:
Credential Storage
All credentials (API tokens, Slack tokens) are encrypted at rest using AES-256-GCM
Encryption key is machine-bound (derived from hostname + user identity)
Config file stored with
600permissions (owner-read/write only)Atomic file writes prevent data corruption and race conditions
Network Security
SSRF Protection — Private IPs, loopback, link-local, and cloud metadata endpoints (169.254.169.254) are blocked
TLS enforced — Only HTTP/HTTPS protocols allowed
Request timeouts — All HTTP calls have strict timeouts (10-30s)
Redirect protection — Auth headers stripped on redirects
Input Validation
Build parameter names validated against allowlist (
[a-zA-Z0-9_\-.])Reserved parameter keys (
token,cause,json,submit) are blocked to prevent injectionParameter values capped at 1000 characters
Jenkins URL validated and sanitized before use
OAuth Security
OAuth callback server binds to
127.0.0.1only (not0.0.0.0)CSRF state parameter uses
crypto.randomBytes(32)Timing-safe comparison for state validation
Rate limiting on callback endpoint (max 5 attempts)
Auto-timeout after 2 minutes
All non-callback routes rejected with 404
Error Handling
Error messages sanitized to prevent credential leakage
URLs, auth headers, and tokens are redacted from error output
Error messages truncated to 200 characters
VS Code Extension
See vscode-extension/README.md for the full-featured VS Code extension with:
Inline search, grouped jobs, pin/unpin
Live build summary webview
Stop running builds from history
Slack notifications
Credentials
Stored encrypted at ~/.jenkins-slack-mcp/config.enc (AES-256-GCM, 600 permissions, owner-only).
Author
Available Tools
13 toolsbuild_consoleA
Get console output (last 100 lines) of a specific build or the latest build.
| Name | Required | Description | Default |
|---|---|---|---|
| lines | No | Number of lines from end (default: 100) | |
| jobName | Yes | Jenkins job name | |
| buildNumber | No | Build number (omit for latest) |
build_historyA
Get recent build history for a job. Shows last N builds with status, duration, and timestamps.
| Name | Required | Description | Default |
|---|---|---|---|
| count | No | Number of builds to show (default: 10, max: 25) | |
| jobName | Yes | Jenkins job name |
build_statusA
Get the status of a specific build or the latest build of a job. Shows build number, status, duration, displayName, and description.
| Name | Required | Description | Default |
|---|---|---|---|
| jobName | Yes | Jenkins job name | |
| buildNumber | No | Build number (omit for latest) |
job_detailsA
Get build parameters for a specific Jenkins job in table format.
| Name | Required | Description | Default |
|---|---|---|---|
| jobName | Yes | Jenkins job name (e.g. tms-docker-build-new) |
list_jobsA
List all available Jenkins jobs in table format with status. Supports filtering by name.
| Name | Required | Description | Default |
|---|---|---|---|
| filter | No | Filter jobs by name (e.g. "tms", "optima") |
login_jenkinsB
Login to Jenkins. Opens browser to Jenkins token page for new users. Validates credentials and auto-discovers all jobs.
| Name | Required | Description | Default |
|---|---|---|---|
| user | No | Jenkins username | |
| baseUrl | Yes | Jenkins base URL (e.g. https://jenkins.example.com) | |
| apiToken | No | Jenkins API token (get from Jenkins → User → Configure → API Token) | |
| buildToken | No | Remote build trigger token |
login_slackA
Login to Slack via OAuth. Opens browser for authorization. Requires SLACK_CLIENT_ID and SLACK_CLIENT_SECRET env vars.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
logoutA
Clear all stored credentials and jobs
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
refresh_jobsA
Re-fetch all jobs from Jenkins (use after new jobs are created)
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
statusA
Check current login status for Jenkins and Slack
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
stop_buildB
Stop/cancel a running Jenkins build.
| Name | Required | Description | Default |
|---|---|---|---|
| jobName | Yes | Jenkins job name | |
| buildNumber | No | Build number to stop (omit for latest) |
trigger_buildB
Trigger a Jenkins build with parameters. Sends Slack DM if configured.
| Name | Required | Description | Default |
|---|---|---|---|
| params | No | Build parameters as key-value pairs (e.g. {"BRANCH": "main"}) | |
| jobName | Yes | Jenkins job name | |
| notifyChannel | No | Slack channel to notify (optional, e.g. #deployments) |
whoamiA
Get current Jenkins and Slack user details
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
13 tool updates
v3.0.0- First observed
build_console - First observed
build_history - First observed
build_status - First observed
job_details - First observed
list_jobs - First observed
login_jenkins - First observed
login_slack - First observed
logout - First observed
refresh_jobs - First observed
status - First observed
stop_build - First observed
trigger_build - First observed
whoami
TDQS
Scored across 13 tools
Most tools have clear, distinct purposes (trigger, list, stop, status, console, history). The only minor overlap is between 'status' and 'whoami', which both reveal login state but differ in detail (login check vs. user information).
Tool names follow a consistent snake_case verb_noun pattern (e.g., trigger_build, list_jobs, stop_build). Even the bare verbs (status, whoami, logout) are standard, predictable names for their actions.
13 tools is well within the ideal range for a Jenkins+Slack integration. Each tool covers a distinct aspect of the workflow—authentication, job discovery, build control, and monitoring—without unnecessary bloat.
The tool surface covers the full lifecycle for this domain: login/logout, job listing/details, triggering and stopping builds, status checks, console output, and history. The Slack integration is minimal but purposeful (DM on trigger), and no critical operations are missing.
Related MCP Connectors
Human-authenticated setup for routing GitHub pull requests into the right Slack channel.
From GitHub repo to signed Android or iOS app: add, check, sign, build and download, from chat.
Plan Salesforce deploys, open pull requests and trigger pipelines from your AI client.
Connect AI agents to CloudBees Unify: feature flags, CI/CD, release orchestration, and security
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
- AlicenseBqualityDmaintenanceEnables AI assistants to interact with Jenkins CI/CD servers, including checking build status, triggering builds, and retrieving build logs.8MIT
- AlicenseNot gradedqualityDmaintenanceProvides Jenkins integration with Claude Code, enabling job management, build operations, pipeline stages, and log search via 22 tools.55 npm1MIT
- AlicenseBqualityBmaintenanceEnables AI assistants to inspect and operate a Jenkins instance — discovering jobs, views, nodes, and plugins; reviewing build chains, parameters, last-build status, console output, test reports, and artifacts; and triggering builds, stopping runs, or answering pipeline inputs. It connects over stdio, SSE, or streamable HTTP with optional credentials, read-only mode, and a credential-free health endpoint.311MIT