MCP server for managing Jenkins operations
Project description
Jenkins MCP
MCP server for managing Jenkins operations.
Installation
Installing via Smithery
To install Jenkins MCP for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @kjozsa/jenkins-mcp --client claude
Installing Manually
uvx install jenkins-mcp
Configuration
Add the MCP server using the following JSON configuration snippet:
{
"mcpServers": {
"jenkins-mcp": {
"command": "uvx",
"args": ["jenkins-mcp"],
"env": {
"JENKINS_URL": "https://your-jenkins-server/",
"JENKINS_USERNAME": "your-username",
"JENKINS_PASSWORD": "your-password",
"JENKINS_USE_API_TOKEN": "false"
}
}
}
}
CSRF Crumb Handling
Jenkins implements CSRF protection using "crumbs" - tokens that must be included with POST requests. This MCP server handles CSRF crumbs in two ways:
-
Default Mode: Automatically fetches and includes CSRF crumbs with build requests
- Uses session cookies to maintain the web session
- Handles all the CSRF protection behind the scenes
-
API Token Mode: Uses Jenkins API tokens which are exempt from CSRF protection
- Set
JENKINS_USE_API_TOKEN=true - Set
JENKINS_PASSWORDto your API token instead of password - Works with Jenkins 2.96+ which doesn't require crumbs for API token auth
- Set
You can generate an API token in Jenkins at: User → Configure → API Token → Add new Token
Features
- List Jenkins jobs
- Trigger builds with optional parameters
- Check build status
- CSRF crumb handling for secure API access
Development
# Install dependencies
uv pip install -r requirements.txt
# Run in dev mode with Inspector
mcp dev jenkins_mcp/server.py
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cams_jenkins_mcp-0.1.2.2.tar.gz.
File metadata
- Download URL: cams_jenkins_mcp-0.1.2.2.tar.gz
- Upload date:
- Size: 11.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a4d699b7d5c93f181a1c3589ac49b3a4c6ddc630ce484e9c845ba25b263cdab2
|
|
| MD5 |
c531234782a83441013a7834e9533acb
|
|
| BLAKE2b-256 |
e2d1bc2c041cc4a1a3c80795904b7a7d0f6dc2f6c9be21f1e0dd544a162b0aba
|
File details
Details for the file cams_jenkins_mcp-0.1.2.2-py3-none-any.whl.
File metadata
- Download URL: cams_jenkins_mcp-0.1.2.2-py3-none-any.whl
- Upload date:
- Size: 9.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3a61324cdd5412906652ddb124d92b1230b34956aa0834063151a71a649922ce
|
|
| MD5 |
4a6d625f1d90eef53cc81a00a1d54220
|
|
| BLAKE2b-256 |
c7d6f69b5cb1cda34ed01c6aa2c9d5560b800b647adda65394dcc6858a93dc7a
|