jenkins
MCP server from ProgrammerAgua/jenkins-mcp-server
claude mcp add --transport stdio programmeragua-jenkins-mcp-server java -jar {your_path}\\mcp-jenkins-server-0.0.1-SNAPSHOT.jar \
--env JENKINS_API_TOKEN="password/token" \
--env JENKINS_API_USERNAME="username" \
--env JENKINS_API_SERVER_URI="jenkins-uri"How to use
This MCP server provides a set of RESTful operations to manage Jenkins jobs via a stable MCP interface. It exposes capabilities such as creating, deleting, enabling/disabling, and renaming jobs; triggering builds, including parameterized builds and stopping running builds; retrieving job, build, and log information; and getting or updating job configurations. You can deploy the server using the Java JAR release and configure it to point at your Jenkins instance using the JENKINS_API_SERVER_URI, JENKINS_API_USERNAME, and JENKINS_API_TOKEN environment variables. Once running, you can interact with the MCP APIs to automate common Jenkins tasks without writing Jenkins API clients from scratch.
How to install
Prerequisites:
- JDK 17+ (or compatible Java runtime)
- Maven 3.6+ (for building the server)
- Jenkins server with Remote Access API enabled
-
Clone the repository: git clone [repository-url] cd jenkins-mcp-server
-
Build the project with Maven: mvn package
-
Locate the produced JAR in the target directory, e.g.: target/mcp-jenkins-server-0.0.1-SNAPSHOT.jar
-
Create a run configuration (example mcp.json) and provide Jenkins connection details: { "mcpServers": { "jenkins-mcp": { "command": "java", "args": [ "-jar", "{your_path}\\mcp-jenkins-server-0.0.1-SNAPSHOT.jar" ], "env": { "JENKINS_API_SERVER_URI": "jenkins-uri", "JENKINS_API_USERNAME": "username", "JENKINS_API_TOKEN": "password/token" } } } }
-
Run the server using your preferred method (see mcp-config above) and ensure it starts successfully. You can then use the MCP client tooling to invoke Jenkins operations exposed by this server.
Additional notes
Tips and notes:
- Ensure Jenkins Remote Access API is enabled and the credentials used have sufficient permissions for the operations you intend to perform.
- The example uses a Windows-style path with backslashes in the JAR argument; adapt the path to your OS and environment as needed.
- If your Jenkins instance uses a self-signed certificate or a custom CA, you may need to configure TLS settings or trust the certificate in your runtime environment.
- For large Jenkins instances, consider enabling pagination or filtering options in API calls if supported by the MCP server.
- Validate environment variables before starting the server to avoid connection errors at runtime.