Connect GitHub Copilot to the CloudBees CI MCP Router

3 minute read

GitHub Copilot is an AI-powered coding assistant that integrates with the CloudBees CI MCP Router through the Jenkins MCP Server plugin, connecting your development environment to CloudBees CI. This enables context-aware code suggestions and automation using real CloudBees CI data, so you can interact with Jenkins resources directly from your IDE or the GitHub Copilot CLI.

Prerequisites

Before you begin, ensure that you have:

  • Set up the CloudBees CI MCP Router, and have a copy of your encoded credentials for HTTP basic authentication.

  • The CloudBees CI MCP Router installed.

  • A GitHub account with access to a GitHub Copilot plan.

  • One of the following, depending on how you intend to connect:

    • The GitHub Copilot CLI.

    • A compatible IDE with the required GitHub Copilot plugins or extensions installed.

Connect GitHub Copilot CLI to the CloudBees CI MCP Router

After completing the prerequisites, connect the GitHub Copilot CLI to the CloudBees CI MCP Router.

Option 1: Connect using the GitHub Copilot CLI command

To connect GitHub Copilot CLI to the CloudBees CI MCP Router using the CLI command:

  1. Open a terminal on the machine where the GitHub Copilot CLI is installed.

  2. Run the following command to add the CloudBees CI MCP Router as an MCP server, including the encoded HTTP basic authentication credentials you generated in Set up the CloudBees CI MCP Router.

    copilot mcp add ci-mcp-router --transport http http://localhost:9000/mcp --header "Authorization: Basic dXNlcm5hbWU6dG9rZW4="(1)
    1 Replace dXNlcm5hbWU6dG9rZW4= with your actual encoded credentials.

Option 2: Connect by editing the configuration file

To connect GitHub Copilot CLI to the CloudBees CI MCP Router by editing the configuration file:

  1. Create or open ~/.config/copilot/mcp.json.

  2. Add your CloudBees CI MCP Router configuration to the file, including the encoded HTTP basic authentication credentials you generated in Set up the CloudBees CI MCP Router.

    { "servers": { "ci-mcp-router": { "type": "http", "url": "http://localhost:9000/mcp", "headers": { "Authorization": "Basic dXNlcm5hbWU6dG9rZW4="(1) } } } }
    1 Replace dXNlcm5hbWU6dG9rZW4= with your actual encoded credentials.
  3. Save the mcp.json file.

Connect GitHub Copilot to the CloudBees CI MCP Router in your IDE

After completing the prerequisites, connect GitHub Copilot to the CloudBees CI MCP Router from your IDE.

To connect GitHub Copilot to the CloudBees CI MCP Router in your IDE:

  1. Open your IDE, launch the GitHub Copilot chat window, and set the chat interface to Agent mode.

  2. Create or open the mcp.json configuration file. The location of this file may vary depending on your IDE. For more information, refer to Extending GitHub Copilot Chat with the Model Context Protocol (MCP).

  3. Add your CloudBees CI MCP Router configuration to the mcp.json file, including the encoded HTTP basic authentication credentials you generated in Set up the CloudBees CI MCP Router.

    { "servers": { "ci-mcp-router": { "type": "http", "url": "http://localhost:9000/mcp", "headers": { "Authorization": "Basic dXNlcm5hbWU6dG9rZW4="(1) } } } }
    1 Replace dXNlcm5hbWU6dG9rZW4= with your actual encoded credentials.
  4. Save the mcp.json file. If properly configured, messages similar to the following are available in the IDE’s log:

    [2025-09-18 16:30:41.064][info] [ci-mcp-router]Starting server ci-mcp-router [2025-09-18 16:30:41.192][info] [ci-mcp-router]Connection state: Running [2025-09-18 16:30:41.214][info] [ci-mcp-router]Discovered 12 tools

Use GitHub Copilot for development tasks

Now that GitHub Copilot is connected to the CloudBees CI MCP Router, you can use the following tools and commands to accelerate your development workflow. For a list of supported Jenkins tools, refer to MCP Server plugin - Available Tools.