Connect Claude Code
Full setup guide for wiring AgentRQ into Claude Code — from .mcp.json configuration to CLAUDE.md instructions and
permission handling.
- Claude Code installed — see Install Claude Code below
- AgentRQ account at app.agentrq.com
- A workspace created with an MCP token generated
Install Claude Code
Already installed? Skip ahead — run claude --version
to check first.
curl -fsSL https://claude.ai/install.sh | bash
irm https://claude.ai/install.ps1 | iex
curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd
Not sure which Windows shell you're in? Your prompt shows PS C:\
in PowerShell and just C:\ in CMD. Native installs update
themselves automatically in the background; on native Windows,
Git for Windows is
recommended so Claude Code can use its Bash tool (not needed under WSL).
brew install --cask claude-code
brew upgrade claude-code periodically.winget install Anthropic.ClaudeCode
winget upgrade Anthropic.ClaudeCode periodically.Debian, Fedora, RHEL, and Alpine can also install via apt, dnf, or apk — see the official Linux package manager guide.
claude --version should print a
version number followed by (Claude Code).
1 Configure .mcp.json
Create or update .mcp.json in your project root.
Claude Code auto-loads this file when you start a session.
{
"mcpServers": {
"agentrq": {
"type": "http",
"url": "https://WORKSPACE_ID.mcp.agentrq.com/mcp?token=MCP_TOKEN"
}
}
}
0ZPO4WBMZIP.mcp.json to your .gitignore if your token is embedded.
Alternatively, use environment variable substitution in .mcp.json.
2 Global vs Project Config
You can add AgentRQ at the project level (per project root) or globally (all Claude Code sessions).
Place .mcp.json in your project root. Only active when
you cd into that project and run claude.
Place in ~/.claude/mcp.json. AgentRQ tools available in
every Claude Code session, every project.
3 Add CLAUDE.md Instructions
Tell Claude when and how to use AgentRQ tools by adding instructions to your CLAUDE.md. This is the most important step — it shapes
Claude's behavior throughout your session.
## Human-in-the-Loop (AgentRQ)
# At the start of every session:
Call `getWorkspace` to load context about this workspace.
# When you need human input, approval, or a decision:
Use `createTask` to create a task for the human. Include:
- A clear title
- Full context in the body (what you've done, what you need)
- Any relevant file snippets as attachments
Then wait for the human's response via the notification channel.
Do NOT proceed past a blocking decision without human approval.
# When you receive a reply:
Read the reply, update the task status to `completed`, then continue.
# When asked to make irreversible changes (DB, deploys, deletes):
Always ask via `createTask` before executing.
Adapt this template to your workflow. The key is being explicit about when Claude should pause and ask vs. when it can proceed autonomously.
4 The Notification Channel
When you reply to a task in the AgentRQ dashboard, your response is delivered to Claude Code as a notification channel message — Claude's native push mechanism. The message looks like this in Claude's context:
<channel source="agentrq" chat_id="0ZRgCquBZ7R"
ts="2026-03-24T14:30:00Z" user="human">
[Response to task 0ZRgCquBZ7R]
Approved — but use a UUID primary key instead of auto-increment.
Please add an index on expires_at too.
</channel>
Claude reads this channel message, processes your reply, and continues — all within the same session. No interruption, no re-prompting.
Claude Code can also send permission requests for sensitive operations. These show up as special task types in your dashboard with Allow / Deny / Allow All buttons.
rm -rf dist/5 Verify the Connection
Start Claude Code and run this quick test:
> Call getWorkspace and tell me what workspace you're connected to.
Then create a test task called "Connection test" with body "Hello from Claude".
Claude: I called getWorkspace — connected to workspace "my-api-project"
(ID: 0ZPO4WBMZIP). Creating test task now...
Task created ✓ (ID: 0ZRgXXXXXXX). You should see it in your dashboard.
Check your AgentRQ dashboard — the task should appear instantly. Reply to it, and Claude will receive your message via the notification channel.
Troubleshooting
.mcp.json is valid JSON (no trailing commas).
Restart Claude Code. Check the URL contains both WORKSPACE_ID and token query param.
.mcp.json must
match the workspace you're viewing.