Jenkins MCP Server
Provides tools for managing Jenkins CI/CD servers, including job management (create, delete, copy, configure), build operations (trigger, log, stop, delete builds), pipeline and folder operations, node/agent management, view management, credentials management, plugin management, and system administration (restart, quiet-down, Groovy script execution).
Click on "Install 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 MCP Servertrigger a build for the 'myapp-pipeline' job"
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 MCP Server
MCP server for Jenkins CI/CD operations ā 53 tools for job management, builds, pipelines, nodes, credentials, plugins, and more.
A comprehensive Model Context Protocol (MCP) server that exposes the full Jenkins REST API as AI-ready tools. Connect your AI assistant (Cursor, Claude Desktop, or any MCP client) to manage Jenkins servers through natural language.
Author: Pawan Gunjkar (pawangunjkar@gmail.com)
š„ Install
Option 1: PyPI / uvx (Recommended)
uvx pawangunjkar-jenkins-mcpCursor / Claude Desktop ā add to .cursor/mcp.json:
{
"mcpServers": {
"jenkins": {
"command": "uvx",
"args": ["pawangunjkar-jenkins-mcp"],
"env": {
"JENKINS_URL": "http://localhost:8080",
"JENKINS_USERNAME": "admin",
"JENKINS_API_TOKEN": "your-api-token"
}
}
}
}Option 2: Smithery
npx -y @smithery/cli install jenkins-mcp --client cursorOption 3: Clone from GitHub
git clone https://github.com/Pawangunjkar/jenkins-mcp.git
cd jenkins-mcp
uv sync
uv run server.pySee PUBLISHING.md for full publishing steps.
Related MCP server: Jenkins MCP Server
⨠Features
š 53 tools across 10 categories ā full Jenkins API coverage
š Secure authentication ā API token-based auth with CSRF crumb handling
š¾ Credential caching ā auto-connect from env vars or cached credentials
š Folder support ā navigate and manage jobs in nested folder structures
š Pipeline support ā view stages, replay builds, and inspect pipeline runs
š§© Plugin management ā list, install, and inspect plugins
š„ļø Node management ā monitor agents, executors, and system health
šÆ Zero configuration ā just set env vars and run
š Quick Start
Prerequisites
Python 3.10+
uv package manager
Jenkins server with API access enabled
1. Clone & Install
cd jenkins-mcp
uv sync2. Configure Jenkins Credentials
Option A: Environment Variables (Recommended)
# Copy and edit the example file
cp .env.example .env
# Set your Jenkins details
JENKINS_URL=http://localhost:8080
JENKINS_USERNAME=admin
JENKINS_API_TOKEN=your-api-token-hereOption B: Connect via chat
Just start the server and use the jenkins_connect tool:
jenkins_connect(url="http://localhost:8080", username="admin", api_token="your-token")3. Generate a Jenkins API Token
Log in to Jenkins
Click your username ā Configure
Under API Token ā Add new Token
Give it a name ā Click Generate
Copy the token value
4. Run the Server
# For Cursor / Claude Desktop (stdio transport)
uv run server.py
# For testing with MCP Inspector
uv run mcp dev server.pyš ļø Tool Reference (53 Tools)
Category 1: Connection & Authentication (4 tools)
Tool | Description |
| Connect to a Jenkins server (URL + username + API token) |
| Disconnect the current session |
| Show connection status and Jenkins system overview |
| Save Jenkins credentials to disk cache for future use |
Category 2: Job Management (10 tools)
Tool | Description |
| List all jobs (with optional folder path) |
| Get detailed job info (config, health, parameters, builds) |
| Create a new job from XML config |
| Delete a job permanently |
| Copy/clone an existing job to a new name |
| Rename a job |
| Enable a disabled job |
| Disable a job (prevents new builds) |
| Get job's config.xml |
| Update job's config.xml |
Category 3: Build Operations (8 tools)
Tool | Description |
| Trigger a build (with optional JSON parameters) |
| Get build details (result, duration, artifacts) |
| Get build console output/log |
| Abort/stop a running build |
| Delete a specific build from history |
| Get last build info for a job |
| Get last successful build info |
| Get last failed build info |
Category 4: Build Queue (3 tools)
Tool | Description |
| List all items in the build queue |
| Get details of a specific queue item |
| Cancel/remove an item from the queue |
Category 5: Node/Agent Management (6 tools)
Tool | Description |
| List all nodes/agents with status |
| Get detailed node information |
| Bring a node back online |
| Take a node offline (with reason) |
| Get node's log output |
| Show executor status across all nodes |
Category 6: View Management (5 tools)
Tool | Description |
| List all views |
| Get view details and its jobs |
| Create a new view |
| Delete a view |
| Add a job to a view |
Category 7: Credentials Management (4 tools)
Tool | Description |
| List stored Jenkins credentials |
| Get credential details (secrets masked) |
| Create a credential (username/password, secret text, SSH key) |
| Delete a credential |
Category 8: Plugin Management (4 tools)
Tool | Description |
| List all installed plugins with version |
| Get details and dependencies of a plugin |
| Install a plugin (with optional version) |
| Search available plugins from Update Center |
Category 9: Pipeline & Folder Operations (4 tools)
Tool | Description |
| List jobs inside a folder |
| Create a new folder |
| Get pipeline stage details and status |
| Replay a pipeline build with modified script |
Category 10: System & Administration (5 tools)
Tool | Description |
| Get Jenkins version, system stats, and overview |
| Restart Jenkins (safe or immediate) |
| Put Jenkins in quiet-down mode (no new builds) |
| Cancel quiet-down mode |
| Execute a Groovy script on Jenkins Script Console |
āļø Configuration
Environment Variables
Variable | Required | Default | Description |
| Yes | ā | Jenkins server URL (e.g., |
| Yes |
| Jenkins username |
| Yes | ā | Jenkins API token |
| No |
| Set to |
| No |
| Request timeout in seconds |
| No |
| Credential cache directory |
Cursor Integration
Add to your Cursor MCP settings (.cursor/mcp.json):
{
"mcpServers": {
"jenkins": {
"command": "uvx",
"args": ["pawangunjkar-jenkins-mcp"],
"env": {
"JENKINS_URL": "http://localhost:8080",
"JENKINS_USERNAME": "admin",
"JENKINS_API_TOKEN": "your-api-token"
}
}
}
}Claude Desktop Integration
Add to your Claude Desktop config (claude_desktop_config.json):
{
"mcpServers": {
"jenkins": {
"command": "uvx",
"args": ["pawangunjkar-jenkins-mcp"],
"env": {
"JENKINS_URL": "http://localhost:8080",
"JENKINS_USERNAME": "admin",
"JENKINS_API_TOKEN": "your-api-token"
}
}
}
}š” Example Usage
Managing Jobs
"List all Jenkins jobs"
ā jenkins_list_jobs()
"Show me details about the 'deploy-prod' job"
ā jenkins_get_job(job_name="deploy-prod")
"Create a copy of 'deploy-prod' called 'deploy-staging'"
ā jenkins_copy_job(source_job="deploy-prod", new_name="deploy-staging")
"Disable the test job while we fix the flaky tests"
ā jenkins_disable_job(job_name="test-suite")Building & Monitoring
"Build the deploy pipeline with BRANCH=main"
ā jenkins_build(job_name="deploy-prod", parameters='{"BRANCH": "main"}')
"Show me the console output of the last build"
ā jenkins_get_build_log(job_name="deploy-prod")
"Stop build #42 ā it's hanging"
ā jenkins_stop_build(job_name="deploy-prod", build_number=42)
"Show me the pipeline stages for the last build"
ā jenkins_get_pipeline_stages(job_name="deploy-prod")System Administration
"What's the status of all Jenkins nodes?"
ā jenkins_list_nodes()
"Take node 'agent-1' offline for maintenance"
ā jenkins_disable_node(node_name="agent-1", reason="Scheduled maintenance")
"List all installed plugins"
ā jenkins_list_plugins()
"Restart Jenkins safely after builds complete"
ā jenkins_restart(safe=True)
"Run a Groovy script to list all users"
ā jenkins_run_groovy_script(script="Jenkins.instance.securityRealm.getAllUsers().each { println it.id }")š Project Structure
jenkins-mcp/
āāā server.py # Main MCP server ā 53 tool definitions
āāā jenkins_client.py # Jenkins REST API client (HTTP, auth, CSRF)
āāā credential_store.py # Credential caching (env vars, memory, file)
āāā pyproject.toml # Project metadata & dependencies
āāā .env.example # Example environment variables
āāā .gitignore # Python gitignore
āāā LICENSE # MIT license
āāā README.md # This fileš Security Notes
API tokens are stored in
~/.jenkins-mcp-cache/credentials.jsonwith restrictive file permissions (600)Never commit
.envfiles or credentials to version controlUse API tokens (not passwords) for authentication ā tokens can be revoked individually
The server supports SSL verification ā only disable for self-signed certs in development
š License
MIT License ā see LICENSE for details.
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 Servers
- AlicenseBqualityFmaintenanceA Model Context Protocol server that enables AI assistants to interact with Jenkins CI/CD servers, providing tools to check build statuses, trigger builds, and retrieve build logs.315MIT
- Alicense-quality-maintenanceA Model Context Protocol (MCP) server that enables AI tools like chatbots to interact with and control Jenkins, allowing users to trigger jobs, check build statuses, and perform other Jenkins operations through natural language.
- AlicenseBqualityDmaintenanceA server that enables interaction with Jenkins CI/CD pipelines from any compatible MCP client (like Claude Desktop), allowing users to manage jobs, builds, coverage reports, and other Jenkins functionality through natural language.1127MIT
- AlicenseBqualityDmaintenanceEnables comprehensive Jenkins automation through MCP interface, allowing users to manage builds, jobs, artifacts, and queues with natural language commands. Supports build triggering, monitoring, artifact retrieval, and system status checks with automatic CSRF protection and authentication.14122MIT
Related MCP Connectors
Free public MCP for AI agents ā 193 tools, 44 workflows. No API key.
Security-first WordPress MCP server. 129 tools for Claude, ChatGPT, Gemini. Free on wp.org.
Hosted MCP with 91 agent tools: X, domains, SEO, Maps, Trends, Search, YouTube, TikTok, and more.
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/Pawangunjkar/jenkins-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server