TutorialsLast Updated Dec 2, 202615 min read

Getting started with Kiro and CircleCI

Roger Winter

Content Marketing Manager

AI coding assistants like Kiro are transforming how you write software. They can generate entire functions, explain complex code, and help you move faster than ever. But there’s a catch: AI-generated code isn’t always correct. It can introduce subtle bugs, security vulnerabilities, or break existing functionality in ways that aren’t immediately obvious.

That’s where continuous integration comes in. CI acts as your safety net, automatically running tests, validating configurations, and catching problems before they reach production. When you’re moving fast with AI assistance, having an automated system that verifies every change becomes essential, not optional.

The good news? Setting up CI takes just a few minutes, and once it’s in place, you get an extra layer of confidence in every AI-assisted change you make. Even better, you can connect your AI assistant directly to your CI system, so you can check build status, investigate failures, and trigger pipelines without ever leaving your IDE.

That’s what we’re building in this guide. By connecting Kiro with CircleCI’s MCP server, you’ll create a workflow where AI helps you write code and CI validates it, all working together seamlessly.

Note: Coming from Amazon Q Developer? AWS has stopped new Q Developer signups, and its IDE plugins reach end of support on April 30, 2027. AWS names Kiro as the successor. If you set up CircleCI in Amazon Q before, you’ll add it to Kiro the same way as everyone else, in the steps below.

Before you start

You’ll need a few things ready:

  • A CircleCI account (the free tier works perfectly for this).
  • A GitHub account.
  • Kiro installed (macOS, Windows, or Linux). The Kiro Free plan works for this tutorial: it includes 50 credits a month, and you can sign in with GitHub, Google, or an AWS Builder ID.
  • The CircleCI CLI, version 1.18 or newer (installation is covered below).
  • Node.js 22 or newer, only if you want Kiro to run the demo project’s tests on your machine (optional).

What makes Kiro different

Kiro is an agentic IDE from AWS, built on the same foundation as VS Code, so the editor, extensions, and keyboard shortcuts will feel familiar. It goes well beyond simple code completion. It understands your codebase, can explain complex code, generate tests, run commands in your terminal, and work through multi-step tasks on its own.

What makes Kiro particularly interesting for CI/CD workflows is its support for MCP, the Model Context Protocol. MCP lets you extend Kiro’s capabilities by connecting it to external services. Once connected, Kiro can interact with those services as naturally as it reads your code. In our case, we’ll connect it to CircleCI so Kiro can fetch build logs, trigger pipelines, and analyze test failures on your behalf.

Kiro shows the dataforge-demo project in the explorer, with phone.js open and the chat panel on the right.

Finding your way around Kiro

If you’re new to Kiro, the next sections provide a quick orientation.

Opening the chat panel

The chat panel opens on the right side of the window. This is where you have conversations with Kiro about your code, ask questions, and issue commands. If you close it, run Kiro: Open Chat from the Command Palette, or use the Open chat shortcut shown on Kiro’s welcome screen (Shift+Cmd+L on a Mac).

The pickers under the chat input set the model (Auto by default), the agent (Default), and how much Kiro does on its own. In Supervised mode, Kiro pauses after each turn that edits files so you can accept or reject the changes. In Accept file changes mode, it edits files without asking. In both of these modes, it asks before it runs a terminal command or calls a CircleCI tool. A third mode, Approve for me, has a model approve the actions it judges safe, block the ones it judges unsafe, and ask you when it’s unsure.

Note: When you open a folder for the first time, Kiro may open it in Restricted Mode. Click Manage in the banner (or run Workspaces: Manage Workspace Trust from the Command Palette) and choose Trust so Kiro can work in the project.

The Kiro panel

Click the Kiro Settings icon (the ghost with a gear) in the activity bar on the left to open the Kiro panel. Its MCP Servers section lists the MCP servers Kiro knows about, with each one’s connection status and tool count. You’ll use it to check the CircleCI connection in a moment.

Why you need CI with your AI IDE

AI assistants are powerful collaborators, but they don’t have perfect knowledge of your codebase, your team’s conventions, or the downstream effects of their suggestions. A function that looks correct in isolation might break an integration test. A refactor that seems clean might introduce a security flaw. CI catches these issues automatically by running your test suite, linters, and security scans on every change. Think of it as a second pair of eyes that never gets tired and checks everything, every time.

Setting up a CircleCI project

To make this integration useful, you need a project with some CI/CD history: builds that have run, tests that have executed, maybe a failure or two you can investigate. You’ll set it up from your terminal with the CircleCI CLI, which is also what Kiro will use to talk to CircleCI.

Install the CircleCI CLI and log in

Install the CLI with your platform’s package manager:

# macOS or Linux (Homebrew)
brew install circleci

# Windows
winget install --id CircleCI.CLI

For other install options, see the CircleCI CLI install page. Check that you have version 1.18 or newer with circleci version.

Then log in:

circleci auth login

This opens an Authorize CircleCI CLI? page in your browser. Under Access level, select Admin, then click Allow. The default, Read, isn’t enough for the CLI to set up your project or start pipelines.

Fork the demo repository

If you want a quick path to follow along, fork this small Node.js data-processing project that comes pre-configured with CircleCI. Its main branch has a deliberate bug in the phone number validator, so your first build will fail. That’s on purpose: you’ll ask Kiro to diagnose and fix it later.

  1. Go to github.com/CIRCLECI-GWP/dataforge-demo and fork it.
  2. Clone your fork and change into its folder:

    git clone https://github.com/<your-username>/dataforge-demo.git
    cd dataforge-demo
    
  3. Run circleci onboard --scan. The repository already has a .circleci/config.yml file, so onboard uses it: it creates the CircleCI project, follows it, and adds a trigger that runs the pipeline on every push. If you belong to more than one CircleCI organization, add --org with the one to use, such as --org gh/<your-username>. Prefer the web app? Click Create Project on the CircleCI home page and connect your fork instead (Create a project has the steps).
  4. Push a commit to start a pipeline, and let it run:

    git commit --allow-empty -m "Trigger CircleCI"
    git push
    
  5. Open the folder in Kiro (File > Open Folder).

Bring your own project

If you’ve already got a project connected to CircleCI, that works great. Just make sure:

  • You have a .circleci/config.yml in place
  • The project appears in your CircleCI dashboard
  • There are some pipeline runs in the history

If your project isn’t on CircleCI yet, run circleci onboard in its folder. If the project doesn’t have a CircleCI config, onboard can generate a starter config for it. For more setup options, see the CircleCI Quickstart Guide.

Wiring up the CircleCI MCP server

The CircleCI MCP server is the bridge that lets Kiro talk to CircleCI’s APIs. It’s built into the CircleCI CLI you just installed: circleci mcp start runs the server on your machine, and it uses your login from circleci auth login, so there’s no API token to create or paste.

Add the MCP configuration

Kiro stores MCP configurations in a JSON file:

  • User configuration (available across all projects): ~/.kiro/settings/mcp.json in your home folder
  • Workspace configuration (specific to the current project): .kiro/settings/mcp.json in your project root

If both files exist, Kiro combines them, with the workspace file taking precedence for conflicts.

To add the CircleCI server:

  1. Open the Command Palette (Shift+Cmd+P on Mac, Shift+Ctrl+P on Windows/Linux).
  2. Run Kiro: Open User MCP Config (JSON). Kiro opens ~/.kiro/settings/mcp.json, creating it if needed.
  3. Replace the contents with this, or add the circleci-cli entry to your existing mcpServers:

    {
      "mcpServers": {
        "circleci-cli": {
          "command": "circleci",
          "args": ["mcp", "start"]
        }
      }
    }
    
  4. Save the file.

Kiro picks up the change as soon as you save, so there’s no need to restart.

Note: Prefer the terminal, or using Kiro from a JetBrains IDE? Kiro CLI reads the same file. After you log in with kiro-cli login, this command adds the same entry: kiro-cli mcp add --name circleci-cli --command circleci --args mcp --args start --scope global.

Confirm the connection

After saving the configuration, verify it’s connected:

  1. Click the Kiro Settings icon in the activity bar
  2. Find the MCP Servers section
  3. You should see circleci-cli listed as Connected, with its tool count and a check mark

The MCP Servers section of the Kiro panel shows circleci-cli as Connected with 185 tools, next to the user MCP config file.

The server exposes the CircleCI CLI’s commands as tools, so the list is long (185 tools in CLI 1.18). You don’t need to turn any off.

If the server shows an error, right-click it and choose Show MCP Logs to see what went wrong.

Test with a real query

Now you can confirm Kiro can actually talk to CircleCI. In the chat panel, ask:

What CircleCI projects am I following?

The first time Kiro wants to call a CircleCI tool, it shows the tool’s name, such as @circleci-cli/circleci_project_list, along with the arguments it plans to pass, and asks for your approval.

Kiro asks for approval before it calls circleci_project_list on the circleci-cli server, with Allow, Always allow, Deny, and Always deny buttons.

Click Allow. If Kiro returns your followed projects, grouped by organization, the integration is live and ready to use.

Checking your configuration before you push

One of the most immediately practical things you can do with this integration is validate your CircleCI config without leaving your IDE. No more discovering YAML errors after you’ve already pushed.

Ask Kiro:

Is my CircleCI configuration valid?

Kiro reports that the project's CircleCI configuration is valid and summarizes the build, lint, test, and coverage jobs.

Kiro reads your .circleci/config.yml and checks it against CircleCI’s validation rules. You’ll get back specific feedback: whether it passes and, if it doesn’t, what the errors are.

This saves real time when you’re working on complex pipelines or experimenting with new orbs.

Starting pipelines from your IDE

This is one of those quality-of-life improvements that adds up fast. Rather than switching to your browser to trigger a build, just ask Kiro:

Kick off a pipeline for my current branch

Kiro reads your Git context and triggers the appropriate build. You’ll get confirmation along with a link if you want to monitor progress in the dashboard. Because Kiro checks your branch and remote with git commands first, it asks you to approve those commands too.

Kiro checks the current branch, then confirms it triggered a pipeline on main and lists the branch, pipeline ID, run ID, and a link to the project's pipelines.

The build runs in the CircleCI dashboard.

The CircleCI pipelines page for dataforge-demo shows pipeline 19 on main, triggered through the API, with six phone validator tests failing in the test job.

Or target another project entirely:

Start a build for gh/my-org/api-service on main

When you’re in the middle of debugging something and running the pipeline repeatedly, being able to trigger builds without context-switching can keep you focused.

Figuring out why builds fail

Here’s where this integration really earns its keep. When something goes wrong, you no longer have to leave your IDE to investigate.

Ask Kiro:

Use CircleCI to find out why my last build failed. Check the job output, not a local test run.

Kiro pulls the failure output from CircleCI and breaks down what happened: which job failed, which tests failed, and the error output. Naming CircleCI and the job output matters: if you only ask “What went wrong with my last build?”, Kiro may run your tests locally instead, asking you to approve each command along the way.

The real value is that Kiro doesn’t just dump logs on you. It analyzes the failure and suggests what to fix. And since you’re already in your IDE with your code open, you can make the change immediately.

Keep iterating until it passes

You can take this further. Ask Kiro to handle the whole loop:

Fix that problem and run the pipeline again. Tell me when it's green.

Kiro will update the code, commit and push the fix, watch the new run, and report back. It asks before it runs the git commands that commit and push, and before each CircleCI tool call, so you stay in control of what leaves your machine. If something else breaks, keep going until everything passes. All without leaving your editor.

Kiro reports the pipeline is green after fixing the inverted phone number length check, committing, pushing, and watching the run.

Inspect a specific pipeline

Sometimes you need to look at a particular build, maybe one from earlier today or one a colleague mentioned:

Show me what happened in this pipeline: https://app.circleci.com/pipelines/github/my-org/my-repo/789

Digging into test results

When tests fail, a simple count like “5 failures” rarely tells you what you need to know. You want specifics: which tests, what assertions failed, where in the code. These prompts work best on a failed build, so if you’ve already fixed the demo, try them on your next failure.

Ask Kiro:

Give me the test results from my last build

You’ll get a pass/fail summary for each test suite, plus the failing tests by name, grouped by test file. Kiro can also pull each failure’s error message, with the expected and received values. If they aren’t in its answer, ask for them.

To focus on what’s broken:

Just show me the failing tests

Kiro lists the six failing phone validator tests in a table, with each test's group.

Identifying flaky tests

Flaky tests, the tests that pass sometimes and fail other times, erode trust in your test suite and waste time on unnecessary reruns.

Ask CircleCI which tests in this project it has flagged as flaky.

CircleCI flags a test as flaky when it fails and then passes on the same code, so this works best on a project with some run history. If CircleCI hasn’t flagged anything yet, ask Kiro to look for tests that are likely to be flaky in your code, such as tests that depend on timing or random delays.

More things to ask Kiro

The MCP server you set up is the CircleCI CLI, so Kiro can use any of its commands, not just the ones in this tutorial. Here are a few more requests to try:

Ask Kiro to… CLI command it runs
Rerun only the failed jobs in my last failed build circleci workflow rerun --from-failed
Watch my latest run and tell me when it finishes circleci run watch
List the artifacts from my last build circleci run artifacts
List the environment variables on this project circleci project envvar list

For every command Kiro can call, see the CircleCI CLI reference.

Troubleshooting

Here are some common issues and how to resolve them:

  • MCP server isn’t loading
  • Can’t find your project
  • Authentication problems
  • Tool permissions

MCP server isn’t loading

If Kiro doesn’t seem to have access to CircleCI tools:

  1. Check the Kiro panel: Click the Kiro Settings icon in the activity bar and look at the MCP Servers section. If circleci-cli isn’t listed or shows an error, there’s a configuration problem.
  2. Validate your configuration: Run Kiro: Open User MCP Config (JSON) and check for JSON syntax errors. Common issues include missing commas, unclosed brackets, or trailing commas after the last item.
  3. Check the logs: Open the Output panel and choose Kiro - MCP Logs from the dropdown, or right-click the server and choose Show MCP Logs.
  4. Confirm the CLI is installed: Open a terminal and run circleci version. You need version 1.18 or newer. If Kiro still can’t start the server, replace "circleci" in the configuration with the full path that which circleci prints (where circleci on Windows), such as /opt/homebrew/bin/circleci.
  5. Reconnect the server: Right-click circleci-cli in the MCP Servers section and choose Reconnect.

Can’t find your project

If Kiro doesn’t recognize your project:

  1. Make sure the project is followed in your CircleCI dashboard
  2. Verify your Git remote: git remote -v
  3. Run circleci auth me to check that the CLI is logged in to the account that follows the project
  4. Try naming the project explicitly: Get the status of gh/my-org/my-repo

Authentication problems

If you’re hitting authentication errors:

  1. Run circleci auth me to check that the CLI is still logged in
  2. If Kiro can read builds but gets 403 errors when it starts pipelines or reruns workflows, run circleci auth login again and select Admin under Access level on the Authorize CircleCI CLI? page
  3. Reconnect the circleci-cli server in the Kiro panel so it picks up the new login

Tool permissions

If Kiro asks for permission every time you use a CircleCI tool, click Always allow on the approval prompt instead of Allow. Under Apply to, keep the default, This workspace, or choose All workspaces or This session, then click Always allow again. With All workspaces, Kiro stops asking for that tool and saves the rule to ~/.kiro/settings/permissions.yaml:

rules:
  - capability: mcp
    effect: allow
    match:
      - circleci-cli/circleci_project_list

If you don’t see Always allow, create that file yourself with the rule above. You can also add more tools to the match list by hand, such as circleci-cli/circleci_config_validate and circleci-cli/circleci_testresult_list. Kiro loads hand-edited rules when it starts, so quit and reopen Kiro afterward. Stick to tools that only read data. The CLI’s tools also include commands that change things, such as deleting environment variables or contexts, so it’s worth keeping the approval prompt for those. For the full rule syntax, see Kiro’s permissions documentation.

Pulling it all together

With Kiro connected to CircleCI, you’ve added a powerful capability to your development workflow. You can catch configuration problems before pushing, start and monitor pipelines without leaving your IDE, investigate failures through conversation instead of log-hunting, and track down test issues and flaky tests quickly.

Every browser tab you don’t have to open, every context switch you avoid, preserves a little bit of the focus that makes coding productive. Those small savings compound over a day or a week into noticeably better work.

Ready to streamline your workflow? Sign up for a free CircleCI account and give it a try.

Do Not Sell or Share My Personal Information

CircleCI doesn't sell your personal information. We share some of it with advertising partners for cross-context behavioral advertising. Opt out to stop that sharing on this browser.