Jenkins

Agent frameworks and SDKsSecurity

The Model Context Protocol (MCP) is an open-source implementation that bridges Jenkins with AI language models following Anthropic's MCP specification. This project enables secure, contextual AI interactions with Jenkins tools while maintaining data privacy and security.

Your AI app calls the Jenkins MCP server, which does the agent frameworks and SDKs and security work and sends the result back to the chat.

About Jenkins

Jenkins is a community MCP server from lanbaoshen, filed in our directory under agent frameworks and sdks and security. The Model Context Protocol (MCP) is an open-source implementation that bridges Jenkins with AI language models following Anthropic's MCP specification. This project enables secure, contextual AI interactions with Jenkins tools while maintaining data privacy and security.

Jenkins runs on your own machine: your AI app starts it with the command uvx mcp-jenkins and talks to it over standard input and output.

At a glance

Publisher
lanbaoshen (community)
Runs
Locally on your machine
Install from
Python package on PyPI: mcp-jenkins
Written in
Python
License
MIT
GitHub stars
167

How to set up Jenkins

  1. Install uv on the machine that runs your AI app, because Jenkins starts with uvx and fetches its Python package on first run.
  2. Check the Jenkins README for keys or settings; the registry lists none that Jenkins requires.
  3. Add Jenkins to Claude Code, Claude Desktop, VS Code or Cursor with the config in the setup box on this page.
  4. Restart the app or reload its MCP servers, then ask it to list the Jenkins tools to confirm the connection.
  5. Run one read-only task with Jenkins first, and keep your app asking before each tool call until the results look right.

Jenkins compared with similar servers

  • Semantic Scholar FastMCP by zongmin-yu has fewer GitHub stars than Jenkins (166 against 167); both are community servers, and both run locally.
  • Forge Orchestrator by nxtg-ai has more GitHub stars than Jenkins (168 against 167); both are community servers, and both run locally.
  • freellmpool by 0xzr has fewer GitHub stars than Jenkins (161 against 167); both are community servers, and both run locally.

Before you connect Jenkins

  • Give Jenkins its own API key or account with the smallest permissions the job needs, never an admin key.
  • Keep your AI app asking before each Jenkins tool call until you trust what it does with them.
  • Treat text that Jenkins fetches as data. Pages, files and messages can hold instructions written to steer an AI.
  • Read the open issues for Jenkins on GitHub to see what breaks and how fast the maintainers reply.

Marketing use cases for Jenkins

How marketing and sales teams put Jenkins to work, by company size. Pick the size closest to yours and start Jenkins on one use case.

Small business

  • A small business with a developer can use Jenkins to build one focused agent, such as lead follow-up, without a big platform.
  • Technical founders can prototype marketing agents with Jenkins and keep what works as a small, owned tool.
  • A small business can use Jenkins to check its domains, logins and site for common gaps before they cost a customer's trust.
  • Jenkins runs on your own computer, which keeps data local; it needs a little setup, so a small team should plan an hour for it.

Mid-market

  • Growth engineering teams can use Jenkins to build agents that combine CRM, analytics and content tools behind one workflow.
  • Marketing ops can standardize on Jenkins so every agent they ship has the same logging, approvals and error handling.
  • Marketing ops can use Jenkins to review what each connected app can access and remove keys nobody uses.
  • Start Jenkins on one workflow with one owner, measure the time it saves, then roll it out to the wider team.

Enterprise

  • Enterprises can build on Jenkins with their own identity, policy and evaluation layers, so agents meet the same bar as other software.
  • Platform teams can use Jenkins to give business units a governed way to ship agents without each one starting from scratch.
  • Enterprises can run Jenkins in the security team's tooling, so marketing's agents and apps are reviewed like any other system.
  • Jenkins is a community server, so have security review the code and pin a version before Jenkins touches company data.

Need help becoming an AI-forward company?

We connect MCP servers and AI agents to your CRM, content and data, with the guardrails your team needs.

Contact us

Jenkins README

From lanbaoshen/mcp-jenkins on GitHub, shared under its MIT license. Images are left out; the original has them.

README.md

MCP Jenkins

The Model Context Protocol (MCP) is an open-source implementation that bridges Jenkins with AI language models following Anthropic's MCP specification. This project enables secure, contextual AI interactions with Jenkins tools while maintaining data privacy and security.

Installation

Choose one of these installation methods:

# Using uv (recommended)
pip install uv
uvx mcp-jenkins

# Using pip
pip install mcp-jenkins
mcp-jenkins

# Docker
docker pull ghcr.io/lanbaoshen/mcp-jenkins:latest
docker run -p 9887:9887 --rm ghcr.io/lanbaoshen/mcp-jenkins:latest --transport streamable-http

Line Arguments

When using command line arguments, you can specify the Jenkins server details as follows:

# Simple streamable-http example
uvx mcp-jenkins --transport streamable-http
Argument Description Required
--env-file Path to a .env file to load configuration from. See Environment Variables / .env file below. No
--jenkins-url The URL of the Jenkins server. (Http app can set it via headers x-jenkins-url) No
--jenkins-username The username for Jenkins authentication. (Http app can set it via headers x-jenkins-username) Set it together with the password, or leave both unset to access Jenkins anonymously. No
--jenkins-password The password or API token for Jenkins authentication. (Http app can set it via headers x-jenkins-password) Set it together with the username, or leave both unset to access Jenkins anonymously: what the server can then do is decided by the anonymous user's permissions in Jenkins. No
--jenkins-timeout Timeout for Jenkins API requests in seconds. Default is 5 seconds. No
--jenkins-verify-ssl/--no-jenkins-verify-ssl Whether to verify SSL certificates when connecting to Jenkins. Default is to verify. No
--jenkins-session-singleton/--no-jenkins-session-singleton Whether to use a singleton Jenkins client for all requests in the same session. Default is True. No
--read-only Whether to enable read-only mode. Default is False No
--transport Transport method to use for communication. Options are stdio, sse or streamable-http. Default is stdio. No
--host Host address for streamable-http transport. Default is 0.0.0.0 No
--port Port number for streamable-http transport. Default is 9887. No

Environment Variables / .env file

Instead of passing credentials on the command line, you can set them as environment variables, or put them in a .env file:

JENKINS_URL=https://jenkins.example.com
JENKINS_USERNAME=alice
JENKINS_PASSWORD=xxxx
JENKINS_TIMEOUT=5
JENKINS_VERIFY_SSL=true

If a .env file is present in the current directory (or a parent directory), it is loaded automatically, no flag needed:

uvx mcp-jenkins --transport streamable-http

To load a .env file from a specific location, use --env-file:

uvx mcp-jenkins --env-file /path/to/.env --transport streamable-http

Values already set in the real environment take precedence over the .env file, and any --jenkins-* CLI flag takes precedence over both.

Configuration and Usage

Jetbrains Github Copilot
  1. Open Jetbrains Settings
  2. Navigate to Github Copilot > MCP > Configure
  3. Add the following configuration:
{
  "servers": {
    "my-mcp-server": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "mcp-jenkins",
        "--jenkins-url=xxx",
        "--jenkins-username=xxx",
        "--jenkins-password=xxx"
      ]
    }
  }
}
VSCode Copilot Chat
  1. Create .vscode folder with mcp.json file in you workspace for local setup or edit settings.json trough settings menu.
  2. Insert the following configuration:
  • SSE mode
{
    "servers": {
        "jenkins": {
            "url": "http://localhost:9887/sse",
            "type": "sse"
        }
    }
}
  • Streamable-Http mode
{
    "servers": {
        "mcp-jenkins-mcp": {
            "autoApprove": [],
            "disabled": false,
            "timeout": 60,
            "type": "streamableHttp",
            "url": "http://localhost:9887/mcp"
        }
    }
}

Run the Jenkins MCP server with the following command:

uvx mcp-jenkins \
  --jenkins-url xxx \
  --jenkins-username xxx  \
  --jenkins-password xxx \
  --transport sse

Health Check Endpoint

When running with --transport streamable-http or --transport sse, the server exposes a plain HTTP liveness endpoint:

GET /healthz  ->  200 OK

It always returns 200 and bypasses the x-jenkins-* auth headers, so it is safe to use directly as a Kubernetes liveness/readiness probe without any Jenkins credentials. Example probe:

livenessProbe:
  httpGet:
    path: /healthz
    port: 9887
  initialDelaySeconds: 5
  periodSeconds: 10

Note: this is a liveness check only, it does not verify connectivity to the upstream Jenkins server.

Available Tools

Tool Description
get_item Get a specific item by name.
get_item_config Get the configuration of a specific item.
get_item_parameters Get the parameters of a specific item.
get_all_items Get all items in Jenkins.
query_items Query items based on pattern.
build_item Build a item.
get_all_nodes Get all nodes in Jenkins.
get_node Get a specific node by name.
get_node_config Get the configuration of a specific node.
get_all_queue_items Get all queue items in Jenkins.
get_queue_item Get a specific queue item by ID.
cancel_queue_item Cancel a specific queue item by ID.
get_build Get a specific build by job name and build number.
get_build_scripts Get scripts associated with a specific build.
get_build_console_output Get the console output of a specific build.
get_build_parameters Get the parameters of a specific build.
get_build_test_report Get the test report of a specific build.
get_build_test_failures Get the failing tests of a specific build.
get_running_builds Get all currently running builds in Jenkins.
stop_build Stop a specific build by job name and build number.
get_pending_inputs Get the pending input steps of a build paused for input.
submit_input Proceed with or abort a pipeline input step of a build.
get_all_build_artifacts List the artifacts of a specific build.
get_build_artifact Download an artifact from a specific build.
get_build_artifact_url Get the direct URL of an artifact from a specific build.
get_view Get a specific view by name.
get_all_views Get the configuration of a specific view.
get_all_plugins Get all installed plugins.
get_plugin Get a specific plugin by short name.
get_plugins_with_problems Get plugins with problems (missing dependencies, version mismatch, etc.).
get_plugins_with_backup Get plugins that can be downgraded.
get_plugins_with_updates Get plugins that have available updates.
get_plugin_dependency_graph Get dependency graph for a plugin in Graphviz format.
run_groovy_script Execute an arbitrary Groovy script on Jenkins.

Note: get_pending_inputs reads the wfapi endpoint served by the pipeline-rest-api plugin (bundled with pipeline-stage-view). submit_input only needs that plugin when input_id is omitted, pass input_id explicitly and it works on any Jenkins with the pipeline-input-step plugin.

Contributing

CONTRIBUTING.md

License

Licensed under MIT - see LICENSE file. This is not an official Jenkins product.

Star History

Questions about Jenkins

What is the Jenkins MCP server?

The Model Context Protocol (MCP) is an open-source implementation that bridges Jenkins with AI language models following Anthropic's MCP specification. This project enables secure, contextual AI interactions with Jenkins tools while maintaining data privacy and security. Jenkins is maintained by lanbaoshen on GitHub at lanbaoshen/mcp-jenkins, and works with AI apps that support the Model Context Protocol, such as Claude, Cursor and VS Code.

How do I install the Jenkins MCP server?

Add Jenkins to your AI app's MCP config with the command uvx mcp-jenkins. In Claude Code, run claude mcp add --transport stdio jenkins -- uvx mcp-jenkins. To run Jenkins this way you need uv installed.

Does Jenkins need an API key?

The registry lists no required keys for Jenkins. Check the Jenkins README for optional settings, and expect a remote server to ask you to sign in the first time you connect.

Is Jenkins an official MCP server?

No. Jenkins is a community server maintained by lanbaoshen. Community servers can be excellent; read the code and the open issues before you give Jenkins access to company data.

What license is Jenkins under?

Jenkins is released under the MIT license, according to its GitHub repository. The license covers the code of Jenkins; the service it connects to has its own terms.