OpenCode
This page uses the address and public OAuth client of the AIZK deployment serving it. If you have not connected yet, Quickstart lets you choose OpenCode and ask it to complete the whole setup.
OpenCode is the shortest of the three client setups. One committed file, one sign-in command, and one command for when something looks wrong.
The configuration file
Section titled “The configuration file”OpenCode reads its servers from opencode.json in the project root.
{ "$schema": "https://opencode.ai/config.json", "mcp": { "aizk": { "type": "remote", "url": "https://xpc3f5mjuv5edgnsfsfbffcoda0ckvij.lambda-url.ap-southeast-1.on.aws/mcp", "oauth": { "clientId": "2yqsd1rbjsxxzkyrem1xv", "scope": "control offline_access openid", "callbackPort": 8912, "redirectUri": "http://127.0.0.1:8912/callback" }, "enabled": true } }}"type": "remote" is the field that matters. aizk is not a local process OpenCode starts, it is an
HTTP endpoint OpenCode talks to, and the remote type is what carries the OAuth handshake. The file
contains no credential, so commit it and let everyone on the project share it.
Sign in and check
Section titled “Sign in and check”opencode mcp auth aizkopencode mcp debug aizkThe first opens a browser, you sign in as yourself, and OpenCode stores the result on your own machine. The second prints what OpenCode currently knows about the server, which is the fastest way to tell a configuration problem from an authorization problem.
Seeing the five tools listed is not quite proof. Ask OpenCode to call status and confirm it returns
your name and your organizations. That is the first call that needs a token aizk actually accepted.
What you get once it works
Section titled “What you get once it works”Five tools and one resource, the same set every client sees. status reports who you are and what is
still processing, find answers one question with evidence, keep stores a note or a file,
report sends a memory problem to the operator, and share copies documents into a team.
MCP tools is the full surface with every parameter.
Committing opencode.json shares the connection and nothing else. Each person signs in as themselves
and each person’s memory stays private by default, so a shared config file never implies shared memory.
Only naming an organization does that, which Scopes explains.
When the browser is elsewhere
Section titled “When the browser is elsewhere”Sign-in ends with the browser handing its result to a loopback address on the machine running OpenCode. That address belongs to OpenCode and not to aizk, so when the browser and OpenCode are on different machines the redirect has nowhere to land. The fix is an SSH forward for that one port, and the shape of it is drawn out on Codex.
If you would rather avoid forwards entirely, Claude Code has a paste-the-URL flow that needs no open port.
Agent instructions
Section titled “Agent instructions”OpenCode reads AGENTS.md. The rules worth putting there are written out in full on
Claude Code and they are the same for every client. The habit that
matters most is treating found content as evidence rather than instructions, because shared memory
means an agent can read text a teammate wrote.
- MCP tools lists every parameter OpenCode can pass.
- Sign-in troubleshooting covers login that will not stick.
- Your first hour is what to do once the connection works.