AI DevelopmentLast Updated Nov 18, 202616 min read

Getting started with Devin Desktop and CircleCI

Roger Winter

Content Marketing Manager

AI coding assistants are transforming how developers write software. Tools like Devin Desktop can generate entire modules, refactor complex code, and fix bugs in seconds. But speed comes with a tradeoff: AI-generated code can introduce subtle bugs, security vulnerabilities, or breaking changes that slip past even experienced developers.

That’s where continuous integration comes in. CI acts as a safety net, automatically testing every change before it reaches production. When you’re generating code faster than ever, you need validation that keeps pace. The combination of an AI coding assistant and a solid CI pipeline gives you both velocity and confidence.

This guide walks you through setting up Devin Desktop, connecting it to CircleCI, and creating a workflow where you can write, test, and ship code without ever leaving your editor.

Before you start

You’ll need to have a few things in place:

  • A CircleCI account (the free tier handles everything in this tutorial)
  • A GitHub account
  • Devin Desktop installed on your machine, and a Devin account to sign in with
  • The CircleCI CLI, version 1.15 or newer (installation is covered below)
  • Node.js 22 or newer, if you want Devin to run the demo project’s tests on your machine (optional)

What makes Devin Desktop different

If you haven’t tried Devin Desktop yet, it’s an AI-native IDE from Cognition. You may know it by its old name: in June 2026, Windsurf became Devin Desktop, keeping the same editor, extensions, and settings. Unlike traditional editors with AI bolted on as an afterthought, it was designed from the ground up around an AI-first philosophy. The star of the show is Devin Local, an agent that runs on your machine and can do far more than just autocomplete.

Devin Local works across your whole codebase. It reads and edits files and runs commands in your terminal, while you watch and approve what it does. For bigger jobs, it can hand subtasks to subagents. It can generate entire modules, refactor existing code, and fix failing tests.

Most importantly for our purposes, Devin Local supports MCP (Model Context Protocol), which lets you extend its capabilities by connecting to external services. Once we hook it up to CircleCI, Devin will be able to pull build logs, trigger pipelines, and analyze test failures as naturally as it reads your code.

Finding your way around Devin Desktop

If you’re new to Devin Desktop, here’s a quick orientation before you begin setup.

Switching views

Devin Desktop opens to the Agents view, a command center for your agent sessions. This tutorial mostly uses the IDE view: the familiar editor, with Devin in a sidebar next to your code. To switch, click the view menu in the top-left corner of the window and choose IDE view or Agents view.

Opening the agent sidebar

The agent sidebar is where you’ll have conversations and give Devin instructions. In the IDE view, open it with Cmd+L (Mac) or Ctrl+L (Windows/Linux).

Below the prompt box, check where the session runs. If it says Cloud, click it and choose Local, so the session runs Devin Local on your machine, in the folder you have open. Cloud sessions run on Devin’s machines instead. Once the session is local, that spot shows your folder’s name, such as dataforge-demo. The first time you choose Local in a folder, Devin asks whether you trust the folder’s files. Click Trust Folder & Continue: local agents stay off until you do.

Devin Local’s modes

Devin Local has several modes, and you pick one with the mode selector below the prompt box:

  • Code: The default. Devin creates and edits files and runs commands to make changes to your project
  • Ask: Devin answers questions about your code without changing anything
  • Plan: Devin explores your code and writes a plan for you to approve before it changes anything

Stay in Code mode for this tutorial. In Code mode, Devin applies edits inside your project right away, but it asks before it runs a terminal command or calls an MCP tool.

Why CI matters for AI-assisted development

AI coding assistants excel at generating code quickly, but they don’t inherently understand your project’s constraints, test requirements, or deployment environment. A function that looks correct in isolation might break integration tests, introduce a security flaw, or conflict with existing code patterns.

CI provides the feedback loop that catches these issues. Every time you push code, whether you wrote it manually or generated it with AI, your CI pipeline runs your test suite, checks for linting errors, and validates that everything still works together. This is especially valuable when you’re iterating quickly with AI assistance, since more code changes mean more opportunities for something to slip through.

Think of CI as your automated code reviewer that never gets tired and checks every single change. It won’t catch everything, but it catches enough to make AI-assisted development practical at scale.

Setting up a CircleCI project

To make this integration useful, we need a project with some CI/CD history: builds that have run, tests that have executed, maybe a failure or two we can investigate. You can either fork a demo repo or use something you’re already working on.

If you don’t have a CircleCI account yet, sign up for free. The free tier includes plenty of build minutes for this tutorial.

Install the CircleCI CLI

You’ll set up the demo project from your terminal with the CircleCI CLI. Install it 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. If you still have the legacy CLI (version 0.1.x), uninstall it first.

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.

Fork the demo repository

If you want a quick path to follow along, fork this demo project that comes pre-configured with CircleCI. It’s a small Node.js data-processing app with a test suite. 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 Devin 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. 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. (Onboard may already have started one; either way, you’ll see failed runs in CircleCI.)

    git commit --allow-empty -m "Trigger CircleCI"
    git push
    
  5. Open the folder in Devin Desktop with 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

Wiring up the CircleCI MCP server

The CircleCI MCP server is the bridge that lets Devin talk to CircleCI’s APIs. It exposes CircleCI’s functionality in a way that Devin can understand and use. It’s built into the CircleCI CLI you installed earlier: 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. Configuration takes just a couple of minutes.

Add the server to Devin

Devin Local reads its MCP servers from a JSON file. The easiest way to open it is through Devin:

  1. Switch to the Agents view and click Customizations in the left sidebar
  2. Open the MCPs tab
  3. Next to Install MCPs for, change Myself to This computer. That’s the list your local agent loads
  4. Click Open config file. Devin switches to the IDE view and opens ~/.config/devin/mcp_config.json (%APPDATA%\devin\mcp_config.json on Windows)

Replace the file’s contents with this configuration, or add the circleci-cli entry to the servers you already have. Then save the file:

{
  "mcpServers": {
    "circleci-cli": {
      "command": "circleci",
      "args": ["mcp", "start"]
    }
  }
}

If Devin can’t find the circleci command, replace "circleci" with the full path that which circleci prints in your terminal (where circleci on Windows), such as /opt/homebrew/bin/circleci.

Note: If you configured MCP servers in Windsurf, Devin copied them from ~/.codeium/windsurf/mcp_config.json into this file the first time it started. If one of them is the older CircleCI MCP server that ran with npx and a personal API token, remove that entry and keep only circleci-cli.

Check the server status

In the Devin Desktop Agents view, the circleci-cli MCP server page shows a Connected status, the stdio transport running circleci mcp start, and the list of CircleCI CLI tools.

Before testing with a real query, verify that the server connected:

  1. Go back to Customizations > MCPs, with This computer selected, and click Refresh. circleci-cli appears under On this machine
  2. Click circleci-cli to open its page, then click Connect. The status changes to Connected, and the page lists the tools the server provides

The list is long (181 tools in CLI 1.15) because the server exposes the CLI’s commands as tools. You don’t need to turn any off: Devin looks up the tools it needs for each request.

If it shows an error instead, check your configuration file for JSON syntax errors and click Refresh. Then run circleci auth me in a terminal to check that the CLI is logged in.

Test with a real query

Confirm Devin can actually talk to CircleCI. Open the agent sidebar (Cmd+L or Ctrl+L), make sure the session runs Local, and ask:

Show me the recent CircleCI runs for this project

In the Devin Desktop agent sidebar, Devin Local lists the project's two recent CircleCI runs on main, both failed, in a table with run ID, commit, subject, time, and status.

The first time Devin calls a CircleCI tool, it asks for permission: you’ll see Allow this action? with the tool’s name and arguments. Click Allow. To stop Devin asking before every CircleCI call, click the arrow next to Allow and choose Yes, allow calling all tools on the circleci-cli MCP server (this session). Devin may also ask to run commands such as git remote -v in its terminal; those get their own prompts. It works out your project from the remote and lists its recent runs, with the branch, commit, and status of each. If you get an authentication error, run circleci auth login again.

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 Devin Desktop. No more discovering YAML errors after you’ve already pushed.

Ask Devin:

Is my CircleCI configuration valid?

Devin Local reports that the project's CircleCI configuration is valid after running circleci config validate, with the config.yml file open in the editor.

Devin reads your .circleci/config.yml and validates it with the CircleCI CLI, either through the MCP server’s circleci_config_validate tool or by running circleci config validate in its terminal. Both use your CLI login and do the same check. You’ll get back specific feedback: whether it passes, what errors exist, and suggestions for improvement. If Devin only reads the file and doesn’t run the validator, ask it to check the config with the CircleCI CLI.

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

Starting pipelines from your editor

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 Devin:

Kick off a pipeline for my current branch

Devin starts a new run with one of the CLI’s run tools, such as circleci_run_trigger, which picks up your project and current branch from your Git checkout. Because this starts a real pipeline, Devin asks you to approve the call first. You’ll get back the new run’s number and ID, and you can ask Devin to watch it.

Devin Local triggers a CircleCI pipeline for the main branch with circleci_run_trigger and returns the number and ID of the new run.

You can get more specific, too:

Run the pipeline for the staging branch

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 keeps 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 editor to investigate.

Ask Devin:

What went wrong with my last build?

Devin Local explains the failed CircleCI build: the test job failed with 6 failed and 64 passed tests because of an inverted length check in phone.js, which is open in the editor.

Devin pulls the failure details for the run and breaks down what happened: which job failed, which tests failed, and the line of code and commit most likely responsible.

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

Keep iterating until it passes

You can take this further by asking Devin to handle the whole loop:

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

Devin will update the code, run the tests on your machine, and ask you to approve the commit and push. The push starts a new pipeline, and Devin watches it and reports back. If something else breaks, keep going until everything passes—all without leaving your editor.

The CircleCI pipelines page for dataforge-demo shows a successful pipeline on main after Devin's fix, above the earlier failed pipeline with six failed phone validator tests.

After iterating and pushing new changes, we can see that Devin fixed the problem with our build and it is now building green on CircleCI.

Inspect a specific run

Sometimes you need to look at a particular build, maybe one from earlier today or one a colleague mentioned. Give Devin the build’s run ID. Devin includes run IDs when it lists your recent runs, and the first eight characters are enough:

Show me what happened in run 3f9c1a2b

Devin finds the full run, then reports what happened in each job and why it failed. Use a run ID rather than a pipeline URL: the CircleCI tools look up runs by ID, so Devin can only guess which run a pipeline number in a URL points to.

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.

Ask Devin:

Give me the test results from my last build

You’ll get the test names, the file each one is in, whether it passed or failed, and the failure messages.

To focus on what’s broken:

Just show me the failing tests

Identifying flaky tests

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

Has CircleCI detected any flaky tests in this project?

Devin checks CircleCI’s flaky test detection with the CLI (circleci testresult flaky), which lists tests that failed and then passed within the same pipeline, with how often each one flaked. Ask about CircleCI by name: a plain “are there flaky tests?” can send Devin to read your test files instead of your CircleCI history.

More things to ask Devin

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

Ask Devin to… CLI command it runs
Rerun only the failed jobs in my last failed build circleci workflow rerun --from-failed
List the environment variables on this project circleci envvar list
Show how much CPU and memory the test job used in my last build circleci job resource-usage

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

Troubleshooting

MCP server isn’t loading

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

  1. Check the MCPs page: In the Agents view, open Customizations > MCPs and select This computer. If circleci-cli isn’t listed or shows an error, there’s a configuration problem. The page starts on Myself, which lists servers for Devin’s cloud sessions, not your local agent.
  2. Validate your JSON: Click Open config file and check ~/.config/devin/mcp_config.json for syntax errors. Common issues include missing commas, unclosed brackets, or trailing commas after the last item.
  3. Try the refresh button: Click Refresh on the MCPs page to reload servers without restarting Devin Desktop.
  4. Check the CLI: Run circleci version in a terminal; you need version 1.15 or newer. If Devin still can’t start the server, put the full path from which circleci in the command field.
  5. Trust the folder: If Devin says local agents are off because the workspace is in Restricted Mode, click Trust Folder & Continue in the agent sidebar (or Trust workspace in the Agents view). Devin Local doesn’t run in folders you haven’t trusted.
  6. Full restart: Close Devin Desktop completely and reopen it.

Can’t find your project

If Devin 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 CircleCI tools fail with authorization errors:

  1. Run circleci auth me to check that the CLI is still logged in
  2. If Devin can read builds but gets 403 errors when it reruns workflows or lists environment variables, run circleci auth login again and select Admin under Access level on the Authorize CircleCI CLI? page
  3. Click Refresh on the MCPs page so Devin restarts the server

Pulling it all together

You’ve now set up a development workflow that combines the speed of AI-assisted coding with the safety of continuous integration. Devin Desktop and Devin Local let you generate and refactor code quickly, while CircleCI validates every change before it ships.

This combination addresses the core challenge of AI-assisted development: moving fast without breaking things. Your CI pipeline catches the issues that slip past, whether they’re introduced by you or by your AI assistant. And with the MCP integration, you can investigate failures, trigger builds, and iterate on fixes without ever leaving your editor.

The workflow looks like this: write code with AI assistance, push to trigger your pipeline, ask Devin about any failures, fix and repeat until green. No browser tabs, no context switching, no lost momentum.

Ready to get started? Sign up for a free CircleCI account and connect your first project.