Connect Goose to the CloudBees CI MCP Router

3 minute read

Goose is an AI-powered command-line interface (CLI) tool that integrates with the CloudBees CI MCP Router through the 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 development environment.

Prerequisites

Before you begin, ensure that you have:

Connect Goose

After completing the prerequisites, connect Goose to the CloudBees CI MCP Router using the authentication method you configured.

Connect with OAuth

With OAuth, you do not need to pass credentials to the command line. You sign in once, and the CloudBees CI MCP Router handles the rest.

To connect Goose to the CloudBees CI MCP Router:

  1. Open a terminal on the machine where Goose is installed.

  2. Run the goose configure command to start the interactive configuration process:

    ┌ goose-configure │ ◇ What would you like to configure? │ Add Extension │ ◇ What type of extension would you like to add? │ Remote Extension (Streamable HTTP) │ ◇ What would you like to call this extension? │ CloudBees CI MCP Router(1) │ ◇ What is the Streaming HTTP endpoint URI? │ <router-url>(2) │ ◇ Please set the timeout for this tool (in secs): │ 300(3) │ ◇ Enter a description for this extension: │ CloudBees CI MCP Router for Jenkins │ ◇ Would you like to add custom headers? │ No │ └ Added CloudBees CI MCP Router extension
    ▼
    1 You can name the extension whatever you prefer.
    2 Replace <router-url> with the MCP endpoint of your CloudBees CI MCP Router: http://localhost:9000/mcp for a local Docker deployment, or https://<cluster-domain>/mcp-router/mcp for a Helm deployment.
    3 The default timeout is 300 seconds. You can adjust this value as needed.
  3. Start Goose:

    goose session
    ▼

    A browser launches with an approval prompt. After you approve, Goose reuses the session for later requests.

Connect with an API token

Authenticating with an API token will be deprecated in the future. For new deployments, CloudBees recommends that you use OAuth, which authenticates each request individually rather than relying on a shared token.

To connect Goose to the CloudBees CI MCP Router:

  1. Open a terminal on the machine where Goose is installed.

  2. Run the goose configure command to start the interactive configuration process:

    ┌ goose-configure │ ◇ What would you like to configure? │ Add Extension │ ◇ What type of extension would you like to add? │ Remote Extension (Streamable HTTP) │ ◇ What would you like to call this extension? │ CloudBees CI MCP Router(1) │ ◇ What is the Streaming HTTP endpoint URI? │ http://localhost:9000/mcp │ ◇ Please set the timeout for this tool (in secs): │ 300(2) │ ◇ Enter a description for this extension: │ CloudBees CI MCP Router for Jenkins │ ◇ Would you like to add custom headers? │ Yes │ ◇ Header name: │ Authorization │ ◇ Header value: │ Basic dXNlcm5hbWU6dG9rZW4=(3) │ ◇ Add another header? │ No │ └ Added CloudBees CI MCP Router extension
    ▼
    1 You can name the extension whatever you prefer.
    2 The default timeout is 300 seconds. You can adjust this value as needed.
    3 Replace dXNlcm5hbWU6dG9rZW4= with your actual encoded credentials.

    Passing the encoded credential directly in this command leaves it in your shell history, and storing it as plain text in your MCP configuration file leaves it exposed to any process that can read that file.

    Goose has no confirmed way to reference an environment variable in this field. Treat this configuration file as sensitive, keep it out of version control, and rotate the credential if it’s ever exposed.

  3. Start Goose:

    goose session
    ▼

    Goose connects using the credentials you provided.

Use Goose for development tasks

Now that Goose 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 tools, refer to CloudBees CI MCP Router tool reference.