# ACP Overview

> **Last verified**: 2026-09-18 · 📄 Per official docs ([agentclientprotocol.com](https://agentclientprotocol.com), checked the same day)

## At a glance

| Item | Details |
|---|---|
| Models you can use | depend on the mounted agent: Claude Agent / Claude Code (Anthropic leg) ✅ · GPT ✅ (Codex-style agents) · Chinese models ✅ · Gemini agent-dependent |
| Protocol & Base URL | configured in **the agent itself**: Anthropic leg `https://api.qcode.cc/api` for Claude-family agents |
| Where to configure | the agent's environment / own config file; the host merely launches it |
| Official docs | [Agent Client Protocol](https://agentclientprotocol.com)
The **Agent Client Protocol (ACP)** is an open standard that decouples editors from AI agents — **think LSP, but for agents**. Any editor that speaks ACP can host any agent that speaks ACP, with no bespoke integration per agent.

For QCode users this has a very practical consequence:

> 🔑 **Configure the agent itself (for example the Claude Code CLI) against QCode, and every host follows automatically.**
> ACP hosts launch the agent as a **child process**, so it inherits your environment.
> Once `ANTHROPIC_BASE_URL` / `ANTHROPIC_AUTH_TOKEN` are set, sessions in Zed, Devin Desktop and
> JetBrains all route through QCode — you do not repeat the setup per editor.

## Hosts that speak ACP

| Host | Notes | Our docs |
|------|-------|----------|
| Zed | Native support; sessions open in the agent panel | [Zed Setup](/docs/ide/zed) |
| Devin Desktop (formerly Windsurf) | Supported since 2026-06-02, inside the Agent Command Center | [Devin Desktop Setup](/docs/ide/devin-desktop) |
| JetBrains IDEs | Through an ACP plugin | [JetBrains IDEs](/docs/ide/jetbrains) |
| Neovim / Emacs / Sublime / Qt Creator etc. | listed in the official editors catalogue | — |

## Agents that speak ACP

Notable entries include **Claude Agent** (the name in the official registry — the ACP wrapper of the Claude Agent SDK, `claude-agent-acp`) and **OpenCode**; the full catalogue lives on [agentclientprotocol.com](https://agentclientprotocol.com). Anything implementing ACP can be mounted. Each host ships its own adapter and launch command, so **defer to the host's documentation**.

## Setup: configure once, works everywhere

### Claude Code (Anthropic leg)

```bash
export ANTHROPIC_BASE_URL="https://api.qcode.cc/api"
export ANTHROPIC_AUTH_TOKEN="cr_your_qcode_key"
```

Persist them in `~/.zshrc` / `~/.bashrc`. From mainland China, use `https://asia.qcode.cc/api`.

> You can also put them in the `env` block of `~/.claude/settings.json` for the same effect.
> See [Environment Variables](/docs/getting-started/environment).

### Codex CLI (OpenAI Responses leg)

Codex is configured through TOML with `base_url` stopping at `/openai`. See [the Codex guide](/docs/ide/codex).

## 🔴 A common trap: GUI-launched editors do not see your shell environment

On macOS and Linux, an editor started from the Dock, a launcher or a desktop icon **does not** read `~/.zshrc`. The symptom: `claude` reaches QCode from a terminal, but the ACP session inside the editor fails to authenticate.

Two ways to handle it:

1. **Launch the editor from a terminal** (e.g. `zed .`) so it inherits the current shell environment
2. **Put the configuration in the agent's own config file** rather than a shell profile
   (Claude Code: the `env` block of `~/.claude/settings.json`)

Option 2 is more robust because it does not depend on how the editor was started.

## Verifying that traffic reaches QCode

```bash
KEY="cr_your_qcode_key"
curl -s -o /dev/null -w '%{http_code}\n' -X POST https://api.qcode.cc/api/v1/messages \
  -H "x-api-key: $KEY" -H "anthropic-version: 2023-06-01"
# 400 = path and key are both fine (a missing body is expected); 401 = key problem
```

Once the endpoint checks out, open a session in the host. If it still fails, the problem is in **how the host launches the agent** (usually the environment trap above), not in QCode.

Every request through QCode is reported to [probe.qcode.cc](https://probe.qcode.cc) — enter your API key to confirm requests actually arrive.

## Related

- [Endpoints & API Paths](/docs/getting-started/endpoints-and-api-paths) — protocol × model-family table
- [Environment Variables](/docs/getting-started/environment)
- [Zed Setup](/docs/ide/zed) · [Devin Desktop Setup](/docs/ide/devin-desktop) · [JetBrains IDEs](/docs/ide/jetbrains)