# CueApril for Claude Code

Connect Claude Code to CueApril's MCP server and add an `assess` slash command and the `cueapril-qa` skill. Full guide: https://app.cueapril.com/agents/README.md

## Before you start

- Option 1 can get a key by one browser approval. Otherwise an organisation administrator creates an agent key in CueApril under Settings, Integrations, Agent access. CueApril shows the key only once.
- Put a created key in the `CUEAPRIL_API_KEY` environment variable, for example from your secret manager. Never commit it or paste it into a prompt.

## Files in this folder and where to save them

The published names have no leading dot, because web servers often refuse to serve dotfiles. Save each file under the name in the second column.

| File | Save as |
|---|---|
| `mcp.json` | `.mcp.json` at the root of your repository, or of your plugin folder |
| `commands/assess.md` | `.claude/commands/assess.md` in your repository, or `commands/assess.md` in your plugin folder |
| `plugin.json` | `.claude-plugin/plugin.json` in your plugin folder (plugin install only) |
| `../cueapril-qa/SKILL.md` | `.claude/skills/cueapril-qa/SKILL.md` in your repository, or `skills/cueapril-qa/SKILL.md` in your plugin folder |

## Option 1: let the CLI add the server

```bash
npx -y cueapril@latest init --agents claude
```

`init` adds the `cueapril` server to Claude Code at user level and installs the `cueapril-qa` skill. The entry holds no key: its `headersHelper` reads the key from a private file in your user configuration (`~/.config/cueapril/claude-code-headers.json`, mode 0600) each time Claude Code connects, so the key never appears on a command line. `init` uses `CUEAPRIL_API_KEY` when it is set, and otherwise asks for one browser approval.

To add only the server by hand, keep the variable in single quotes so your shell does not expand it. Claude Code then stores the reference in `.mcp.json`, never the key, and reads the variable each time it starts:

```bash
claude mcp add --scope project --transport http cueapril https://app.cueapril.com/mcp --header 'Authorization: Bearer ${CUEAPRIL_API_KEY}'
```

## Option 2: project install

Run this at the root of your repository:

```bash
mkdir -p .claude/commands .claude/skills/cueapril-qa
curl -fsSL https://app.cueapril.com/agents/claude-code/mcp.json -o .mcp.json
curl -fsSL https://app.cueapril.com/agents/claude-code/commands/assess.md -o .claude/commands/assess.md
curl -fsSL https://app.cueapril.com/agents/cueapril-qa/SKILL.md -o .claude/skills/cueapril-qa/SKILL.md
```

`.mcp.json` holds `${CUEAPRIL_API_KEY}`, not the key: Claude Code reads the variable each time it starts, so you can commit all three files. Claude Code asks each person to approve the project's MCP server the first time.

## Option 3: plugin

```bash
mkdir -p cueapril-plugin/.claude-plugin cueapril-plugin/commands cueapril-plugin/skills/cueapril-qa
curl -fsSL https://app.cueapril.com/agents/claude-code/plugin.json -o cueapril-plugin/.claude-plugin/plugin.json
curl -fsSL https://app.cueapril.com/agents/claude-code/mcp.json -o cueapril-plugin/.mcp.json
curl -fsSL https://app.cueapril.com/agents/claude-code/commands/assess.md -o cueapril-plugin/commands/assess.md
curl -fsSL https://app.cueapril.com/agents/cueapril-qa/SKILL.md -o cueapril-plugin/skills/cueapril-qa/SKILL.md
claude --plugin-dir ./cueapril-plugin
```

Claude Code names a plugin's server `plugin:cueapril:cueapril` and its tools `mcp__plugin_cueapril_cueapril__<tool>`, for example `mcp__plugin_cueapril_cueapril__cueapril_start_assessment`. The `assess` command allows both these names and the `mcp__cueapril__<tool>` names of options 1 and 2. To share the plugin with your team, publish the folder in your team's plugin marketplace.

## Use it

- In a session, run `/assess 123` (a plugin may show it as `/cueapril:assess`), or ask Claude to test the pull request. With the skill installed, Claude runs the loop after it pushes.
- Headless runs cannot answer permission prompts, so allow the CueApril tools up front, for example:
  `claude -p "Test pull request 123 with CueApril and fix any failures" --allowedTools "mcp__cueapril"`
  With the plugin (option 3), allow `mcp__plugin_cueapril_cueapril` instead:
  `claude -p "Test pull request 123 with CueApril and fix any failures" --allowedTools "mcp__plugin_cueapril_cueapril"`
- Check the connection with `claude mcp list`, or `/mcp` inside a session.

An assessment takes 20 to 75 minutes. Each `cueapril_wait_for_assessment` call returns within 50 seconds, so Claude keeps calling it until the assessment finishes. `incomplete` is never a pass.
