# Wire DebuggAI Into Claude Code or Cursor With MCP

URL: https://debugg.ai/resources/wire-debuggai-into-claude-code-cursor-mcp
Published: 2026-07-29
Updated: 2026-11-18
Author: DebuggAI Team

Connect the DebuggAI MCP server to Claude Code, Cursor, or Claude Desktop and let your AI agent trigger and read back real browser test runs.

If an AI agent already drives your editor, the next step is letting it run and read back real browser tests, without you switching to a dashboard to check whether something works. The DebuggAI MCP server does that. It exposes the testing platform as tools any MCP-compatible agent can call.

## What your agent can do with it

The server exposes 8 tools. Most take an `action` field that selects the operation, such as `list` or `get`.

- **project**: list and manage the projects tied to your account.
- **test_suite** and **test_case**: create, run, and inspect test suites and individual test cases.
- **environment**: manage environments, including stored credentials for apps that need a login.
- **executions**: pull run history and results.
- **check_app_in_browser**: drive a live instance of your app and report back what it sees.
- **probe_page**: a fast single-route check that returns the render, a screenshot, and console errors.
- **trigger_crawl**: start a broader crawl of your app.

Localhost URLs are tunneled for you, so testing a dev server on your machine works the same way as testing a deployed URL. You only need an API key.

## Claude Code

Add the server with the Claude Code CLI:

```bash
claude mcp add debugg-ai -e DEBUGGAI_API_KEY=your_api_key -- npx -y @debugg-ai/debugg-ai-mcp
```

## Cursor

Add the same command to Cursor's MCP config (`~/.cursor/mcp.json`, or `.cursor/mcp.json` in a project):

```json
{
  "mcpServers": {
    "debugg-ai": {
      "command": "npx",
      "args": ["-y", "@debugg-ai/debugg-ai-mcp"],
      "env": {
        "DEBUGGAI_API_KEY": "your_api_key_here"
      }
    }
  }
}
```

Claude Desktop and any other MCP client that starts servers over stdio use the same shape: a command, its arguments, and one environment variable. Repo, branch, and file context come from the folder you are working in.

## Run it with npx

```bash
DEBUGGAI_API_KEY=your_api_key npx -y @debugg-ai/debugg-ai-mcp
```

Get an API key for free at app.debugg.ai. Browser-agent runs count against your DebuggAI plan. Installing the server costs nothing on its own.

Testing `localhost` URLs needs the `caddy` binary, which the package downloads for you during install.

## Docker, and its limit

```bash
docker run -i --rm --init \
  -e DEBUGGAI_API_KEY=your_api_key \
  quinnosha/debugg-ai-mcp
```

The Docker image currently cannot test localhost URLs. It was built before the Caddy dependency and has not been rebuilt, so localhost calls fail inside it. Public-URL calls and the non-browser tools (project, environment, test_suite, test_case, executions) work. For localhost testing, use npx.

## What to ask it

Once it is connected you talk to your agent instead of running CLI commands:

- "Run the checkout flow test suite and tell me if it still passes."
- "Probe /pricing on the staging deploy and tell me if there are console errors."
- "Pull the last 5 execution results for this project and summarize what failed."
- "Check the app in the browser, sign in with the staging environment, and confirm the new settings page renders."

The agent calls the tool, gets real results (pass or fail, screenshots, console output), and reports back in the conversation.

## What a real call looks like

While writing this guide, we asked an agent connected this way to check that the pricing section on our site renders. It called `check_app_in_browser`, drove a real browser to the page, and reported:

> "The DebuggAI pricing section is visible and readable. I can see all four plan tiers: Free, Pro, Grow, and Enterprise. The section headline says 'Start free. Know it works.' and the cards show the plan names and details clearly."

That is the actual tool output from that call.

## Where the API key lives

[Watch a real recording of the API Keys page](https://strapi-db-ue2.s3.us-east-2.amazonaws.com/debuggai_api_keys_clip_8c068dc598.webm). It is the page where `DEBUGGAI_API_KEY` comes from, with the MCP config snippet you can copy.

Treat the key like any credential: keep it out of version control, and use a project-level key for shared or CI environments instead of reusing a personal key.

## Where to go from here

MCP is the on-demand way to reach the same platform behind [PR Copilot](/resources/set-up-automatic-pr-testing-with-debuggai). If you want tests to run on every push, set that up as well. They use the same account and the same runs.

## Sources

- Model Context Protocol: https://modelcontextprotocol.io
- DebuggAI MCP server README: https://github.com/debugg-ai/debugg-ai-mcp

## Sources

- https://strapi-db-ue2.s3.us-east-2.amazonaws.com/debuggai_api_keys_clip_8c068dc598.webm
- https://modelcontextprotocol.io
- https://github.com/debugg-ai/debugg-ai-mcp
