aq.dev / docs/mcp

Connect your AI agent to AQ over MCP

AQ is the multiplayer coding harness for running coding agents in isolated workspaces with shared live access and review on team-controlled or AQ-managed machines. Scoped API keys, the REST API at /v1, signed webhooks, and AQ's hosted MCP server at https://aq.dev/mcp are available on every plan, Free included. Add the MCP URL to any MCP-compatible client (as of October 2026 that includes Claude Code, Claude and ChatGPT connectors, Cursor, and others), approve the browser sign-in once, and the agent can list and create AQ workspaces, start and steer conversations with AQ's built-in agent, and read events, pull requests, and preview URLs, all as you, with your permissions. There is nothing to install and no key to copy for OAuth-capable clients.

Connect in one step

Claude Code (one command, then approve the sign-in it opens):

claude mcp add --transport http aq https://aq.dev/mcp

Claude or ChatGPT connectors: add a custom connector with the URL https://aq.dev/mcp. The browser opens AQ's sign-in and consent screen; approve, and the tools appear in the conversation.

Cursor and other JSON-configured clients:

{
  "mcpServers": {
    "aq": {
      "url": "https://aq.dev/mcp"
    }
  }
}

Headless clients that cannot run a browser flow authenticate with an API key from the AQ API instead, sent as a Bearer header:

{
  "mcpServers": {
    "aq": {
      "url": "https://aq.dev/mcp",
      "headers": { "Authorization": "Bearer aq_your_key" }
    }
  }
}

Each connected app appears in Settings → Connections → API keys (OAuth connections are named MCP: <client>). Revoking the entry disconnects the app immediately.

Or just tell your agent

If your coding agent manages its own MCP configuration, paste this:

Connect to AQ's MCP server at https://aq.dev/mcp (streamable HTTP, OAuth).
Then use its tools to create a workspace on my repository and start an
AQ agent run with my task. To follow up on existing work, find it with
find_items and message it with message_item. Poll get_agent_run for progress and give me
the workspace link and any pull request it opens.

What a connected agent can do

  • Work with workspaces: list_workspaces and count_workspaces (with status, repo, and text filters), get_workspace, create_workspace (optionally from a base branch), update_workspace, share_workspace, close_workspace, reopen_workspace, list_repos, and whoami to identify the connection. Every workspace is an isolated git worktree on your own infrastructure.
  • Run the built-in agent: start_agent starts an AQ agent conversation in a workspace, send_agent_message steers it mid-run, get_agent_run reads status and the transcript tail, stop_agent stops the current turn, list_agent_sessions and archive_agent_session manage the conversations. list_connections names your connected CLI accounts for runs on your own subscription.
  • Talk to any item: find_items finds work items, chats, bots and Genie by name, read_item reads a thread's conversation, message_item sends it a follow-up, and stop_item stops its current turn. These are the same tools AQ's own threads use to reach each other.
  • Manage and operate bots: create_bot, update_bot (name, role, instructions, character, color, model), pause_bot, resume_bot, archive_bot and restore_bot; routines with create_routine, update_routine, run_routine, pause_routine, resume_routine and delete_routine; oversight with list_bot_runs, get_bot_run (what a run did), bot_usage, list_bot_work_items and pending_bot_questions; answer_bot_question to reply or approve; message_bot and read_bot_chat to talk to one; get_bot_permissions / set_bot_permissions for the accounts it may use; get_bot_sharing, share_bot and unshare_bot; list_bot_library and read_bot_library_item for what it saved. Every change shows in AQ as "Changed by" your app; changes to a bot's settings, accounts and sharing can be undone there in one click.
  • Read the results: get_workspace_events for activity, list_workspace_prs for pull requests the work produced, get_preview_url for the running app preview.
  • React to events: list_webhooks, create_webhook, and delete_webhook manage signed outbound webhooks so your own service hears about workspace and agent activity without polling.

The server only advertises the tools the connection's scopes allow, so a read-only connection cannot create or close anything, and it annotates read-only versus destructive tools so clients can gate confirmations. Destructive operations ask for explicit confirmation arguments (closing a workspace requires confirm=true), and mutating tools take an optional idempotency_key argument that makes automatic retries safe: a repeat with the same key and arguments replays the first result instead of executing twice.

Permissions and safety

The consent screen says what the connection may do in plain words. The bot scopes are bots:read (see bots, routines, runs, usage and library), bots:operate (also run, message, answer, pause and resume) and bots:manage (also create, change, share and archive); each includes the one before it. A new connection gets bots:operate; bots:manage is a separate, unticked box on the consent screen, so an agent can only create, share or archive bots when you tick it. A connection only reaches the bots its person can, with the same owner, manager and member rules as the app.

An MCP connection acts as the person who approved it: it sees only that person's workspaces and teams, and access is re-checked on every request against live membership. Internal identifiers, file paths, credentials, and infrastructure details never appear in tool results. For scope details, pagination, idempotent writes, webhooks, and the complete REST surface, read the AQ API documentation; the machine-readable contract is the OpenAPI document at /v1/openapi.json.

Verify the connection

Ask the connected agent to call list_workspaces. It is read-only, returns your visible workspaces, and proves authentication, scopes, and transport in one call. From a shell, the equivalent is:

curl -fsS https://aq.dev/mcp \
  -H "Authorization: Bearer aq_your_key" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'

Frequently asked questions

Does ChatGPT work with AQ?

Yes. Add a custom connector in ChatGPT with the URL https://aq.dev/mcp, approve AQ's sign-in, and ChatGPT can create workspaces, start AQ agent runs, follow up on existing work items and bots, and read results through the same tools as any other MCP client.

Do I need an API key to connect an agent to AQ?

Not for clients that support OAuth: the first connection opens a browser sign-in and the client receives its own token. API keys are only needed for headless clients that cannot open a browser; mint one in Settings → Connections → API keys.

Can an agent start another agent through AQ?

Yes. A connected agent can call start_agent to run AQ's agent in a cloud workspace, steer it with send_agent_message, and read the transcript with get_agent_run: one agent dispatching cloud coding work to another, with the full session recorded in AQ for review. It can also reach work that already exists: find_items finds a work item or bot by name, read_item reads its conversation, and message_item sends it a follow-up.

Can Grok or another agent manage my AQ bots?

Yes. Connect the agent to https://aq.dev/mcp and it can create bots, give them routines, run them, read what each run did and what it spent, answer the questions bots ask you, share them and archive them, as you and with your permissions. Each change appears in the bot's chat in AQ as "Changed by" the agent's name with the time, and changes to a bot's settings, accounts and sharing can be undone there in one click.

Is it safe to connect an AI agent to my AQ account?

The connection acts as you and only you: it is scoped, re-checked against live team membership on every request, and visible in Settings → Connections → API keys where one click revokes it. Mutating tools require explicit arguments (for example confirm=true to close a workspace), and tool results never include credentials or infrastructure internals.