Kiro 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.
Connect Kiro
After completing the prerequisites, connect Kiro to the CloudBees CI MCP Router using the authentication method you configured.
-
Connect with OAuth (recommended)
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 Kiro to the CloudBees CI MCP Router:
-
Open a terminal on the machine where Kiro is installed.
-
Run the following command to add CloudBees CI MCP Router to Kiro:
kiro-cli mcp add --name ci-mcp-router --url <router-url>(1)1 Replace <router-url>with the MCP endpoint of your CloudBees CI MCP Router:http://localhost:9000/mcpfor a local Docker deployment, orhttps://<cluster-domain>/mcp-router/mcpfor a Helm deployment. -
Start Kiro:
kiro-cliKiro detects that the
ci-mcp-routerserver requires OAuth and prompts you to authenticate. -
Press Ctrl+y to authenticate. Kiro copies an OAuth approval URL to your clipboard.
-
Paste the URL into your browser and approve access. After you approve, Kiro 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 Kiro to the CloudBees CI MCP Router:
-
Open a terminal on the machine where Kiro is installed.
-
Run the following command to add CloudBees CI MCP Router to Kiro:
kiro-cli mcp add --name ci-mcp-router --url <router-url>(1)1 Replace <router-url>with the MCP endpoint of your CloudBees CI MCP Router:http://localhost:9000/mcpfor a local Docker deployment, orhttps://<cluster-domain>/mcp-router/mcpfor a Helm deployment. -
Open the
mcp.jsonconfiguration file the command created. For more information, refer to Kiro MCP configuration. -
Add a
headersentry to theci-mcp-routerserver, including the encoded HTTP basic authentication credentials you generated in Authenticate with an API token.The kiro-cli mcp addcommand does not provide an option to set headers, so you must add this field manually.1 This is the same <router-url>you specified in thekiro-cli mcp addcommand.2 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.
Kiro lets you reference an environment variable in the
headersvalue instead of the literal credential. Refer to Kiro MCP configuration for details. -
Save the
mcp.jsonfile. -
Start Kiro:
kiro-cliKiro connects using the credentials you provided.
Use Kiro for development tasks
Now that Kiro 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.