> ## Documentation Index
> Fetch the complete documentation index at: https://aspect.build/llms.txt
> Use this file to discover all available pages before exploring further.

# Build results for AI agents, over MCP

> aspect mcp gives Claude Code, Codex, Cursor, and other MCP clients read-only access to your builds, logs, targets, and flake rates.

[← Shipped](https://aspect.build/shipped)

# Build results for AI agents, over MCP

***

AI assistant · aspect mcp

Why did last night's main build fail? Is it flaky?

list\_invocations

tail\_build\_log

get\_target\_stats

It failed on `//app/server:integration_test`, a timeout on the log's last page. That test has failed intermittently across recent main builds, so it's flaky, not broken by this change.

Your agent can already run `bazel test`. What it can't do is see last night's failure on CI, or tell a real break from a test that's been flaky for a week. So you paste logs into the chat, and it guesses.

[`aspect mcp`](https://aspect.build/docs/cli/tasks/mcp) is a Model Context Protocol server built into the Aspect CLI. It hands an agent the same builds you see in the [Build Results UI](https://aspect.build/platform/web-ui): invocations, build logs, per-target results, metrics, and failure and flake rates across builds.

```shell theme={null}
claude mcp add --scope project aspect -- aspect mcp
```

That writes `.mcp.json` at the repo root, so everyone in the repository picks it up.

## What the agent gets

* **Read-only tools.** It lists and filters builds, tails a log, lists the targets a build tested, and pulls cross-build stats for one target. No tool starts, cancels, or changes a build.
* **Your login, no config.** Each call uses the credential `aspect auth login` stored, and refreshes it. There's no URL or token in the MCP config to leak.
* **Bazel's invocation ID works.** Hand it the UUID from a CI log and it finds the build.

Ask "why did main fail last night, and is it flaky?" and it answers from the log tail and the target's history instead of a guess.

It works on Aspect Cloud, and on Aspect Enterprise with Workflows 6.0.30 or later. [Connect an AI assistant to build results](https://aspect.build/docs/aspect-workflows/platform/guides/build-results-mcp.md) has setup for Claude Code, Claude Desktop, Codex, Cursor, and VS Code.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.