AI Agents (MCP)¶
Drape runs an MCP server, so an AI coding agent can read your CI history the way you do in the Drape app. When the agent hits a red build, it can ask Drape why the build failed and whether the failing test is flaky. It can also check whether the error has happened before, so it doesn't re-run the job or guess.
The server URL is:
The server is read-only. The agent reads Drape as you and sees only the repositories you can see.
Connect your agent¶
Most agents connect with OAuth. Add the server, and the agent opens Drape in your browser. Sign in and choose what the agent may read. You don't copy any key.
Then run /mcp in Claude Code, select drape and authenticate.
Add this to ~/.cursor/mcp.json (or .cursor/mcp.json in a project):
Cursor prompts you to sign in when it first connects.
Add this to .vscode/mcp.json:
Start the server from the file, and VS Code asks you to sign in.
Open Settings → Connectors → Add custom connector. Name it Drape, enter https://app.drape.io/mcp, and connect.
Use an API key instead¶
For an agent that can't sign in through a browser, such as a headless or CI-hosted agent, use a personal API key. Create one under Account settings → API Keys and send it as a bearer token:
claude mcp add --transport http drape https://app.drape.io/mcp \
--header "Authorization: Bearer drp_usr_xxxx"
Organization API keys don't work here. The server always acts as a person, with that person's access.
What the agent can read¶
On the consent screen you choose what the agent may read. Every connection can list your repositories. The other permissions are checkboxes you can clear:
| Permission | What it allows |
|---|---|
| CI results | Test and job runs, flaky tests, failures |
| Coverage | Coverage and lint results |
| Security | Security scan results |
| Code review | Code review findings |
The agent sees only the tools its permissions allow. For an API key, the key's scopes decide the same thing.
If your organization requires single sign-on, the consent screen asks you to sign in with SSO again before the agent can read that organization.
To review or disconnect an agent, open Account settings → Connected apps.
Tools¶
| Tool | What it answers |
|---|---|
triage_ci |
"Why did CI fail?" Every failed test and job at a commit, pull request or branch, each labelled with its likely cause (real failure, flaky, or infrastructure), most actionable first. |
get_run |
The full error and stack trace of a test run, or the failure log of a job run, with similar recent failures. |
get_test |
"Is this test flaky or newly broken?" A test's pass rate, flaky verdict and trend, owner, suppression state and recent runs. |
get_job |
The same history for a CI job, including retries. |
search_failures |
"Has this error happened before?" Matching job failures and failed tests from the last 30 days, grouped, with how often and when. |
list_tests |
The flakiest, slowest or most-failing tests in a repository. You can narrow the list to one CODEOWNERS owner. |
get_drape_resource |
Reads a pasted link to a Drape page, or to a GitHub pull request, commit, or Actions run or job, and routes it to the right tool. |
list_repositories |
The repositories the agent can read. |
whoami |
Which user, organizations and permissions the connection has. Use it when a tool returns less than you expect. |
Example prompts¶
- "CI is red on my PR, can you find out why?" The agent calls
triage_ciand fixes the real failure. It leaves the known flake alone. - "Here's the failing run: https://github.com/acme/api/actions/runs/123. Is it us?" The agent calls
get_drape_resource, thentriage_ci. - "Has
ConnectionResetError: peer closedhappened before on main?" The agent callssearch_failures. - "Which tests slow our CI down the most?" The agent calls
list_testswithslow. - "Is
test_checkout_retriesflaky, and who owns it?" The agent callsget_test.
Security¶
- Read-only. No tool changes anything in Drape or in your repositories.
- Your access, no more. Each call runs as you and is limited to the repositories you can see in Drape. An API key limited to some repositories narrows that further.
- Tool output is data. Test output, logs and commit messages are text written by other people. The server tells the agent to treat that text as data, not as instructions.
- Short-lived tokens. OAuth access tokens expire after an hour. A connection that goes unused for 30 days has to sign in again.