Agent guide

OpenCode Setup

Paste this into your agent

Start with this visible request when you want the agent to help. It keeps the action coming from you, while the linked setup reference stays plain and non-recursive.

Use this in the app you are connecting, then approve only the browser login, app setting, or restart steps that the app requires.

Please help me set up Core for OpenCode. Core keeps shared context for AI work: it preserves useful context, decisions, files, and what worked across connected tools.

Use this official setup reference:
https://core.gradien.ai/core/docs/reference

Source checked: 2026-07-24 Official sources: https://opencode.ai/docs/mcp-servers/ and https://opencode.ai/docs/cli/

Use the complete Secure server address shown by Core during onboarding, including ?setup_attempt=.... Outside onboarding, use https://core.gradien.ai/mcp/continuity.

Add Core

Add Core to either your global ~/.config/opencode/opencode.json or a project's opencode.json. Merge the mcp.core entry into the existing JSON instead of replacing the rest of the file:

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "core": {
      "type": "remote",
      "url": "<secure-server-address>",
      "enabled": true
    }
  }
}

Alternatively, run the documented interactive wizard:

opencode mcp add

Choose a remote server, name it core, and paste the complete Secure server address when prompted. OpenCode starts OAuth automatically when Core is first used; you can trigger it explicitly with opencode mcp auth core. Verify with opencode mcp list, then restart OpenCode if the tools do not appear.

If OpenCode says valid credentials already exist, do not reauthenticate unless the existing token is actually failing.