Unofficial Anthropic subscription OAuth for OpenCode V2.
Warning
Anthropic may restrict or suspend subscription accounts that use unofficial clients. Use this plugin at your own risk.
This release targets OpenCode 2.0.3:
| Component | Version |
|---|---|
| OpenCode V2 | 2.0.3 |
| This plugin | 2.0.5 |
@opencode/plugin |
2.0.3 |
| Effect | 4.0.0-rc.112 |
Run the development checks before updating the pinned OpenCode dependencies.
Pin the full plugin version in opencode.jsonc:
Restart OpenCode, run /connect, and select Anthropic's Claude account sign-in.
For the plugin's OAuth connection, it:
- Adds the Anthropic OAuth authorization, beta, and Claude CLI headers.
- Removes
x-api-key. - Prepends this system block:
You are a Claude agent, built on Anthropic's Claude Agent SDK.
The existing OpenCode prompt stays unchanged. The plugin does not rewrite messages, tools, URLs, request bodies, or responses.
bun install --frozen-lockfile
bun test
bun run types
bun run lint
bun run format:check
bun run buildFor a local build, point plugins to the absolute dist directory and restart OpenCode.
MIT
{ "plugins": ["@op1/opencode-anthropic-auth@2.0.5"] }