Back to MCP overview

OpenCode · Client setup guide

Check your OpenCode major version and choose its configuration block. V2 stores servers under mcp.servers and V1 under mcp. Both disable OAuth and use an environment-based header.

The free plan includes editing, sync, image hosting, export, and sharing. Document MCP, repository MCP, and the built-in AI assistant require lifetime membership. Configuration sync uses separate temporary authorization.

Create an MCP token

Set the environment variable

Set your actual token in the terminal that starts the client. knt_mcp_... is a placeholder. Protect credentials with environment variables or secure storage and keep them out of repositories. Start with a read-only token.

Bash

export KOINOTE_MCP_TOKEN='knt_mcp_...'

OpenCode V2 · opencode.json

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "servers": {
      "koinote": {
        "type": "remote",
        "url": "https://koinote.app/mcp",
        "oauth": false,
        "headers": { "Authorization": "Bearer {env:KOINOTE_MCP_TOKEN}" }
      }
    }
  }
}

OpenCode V1 · opencode.json

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "koinote": {
      "type": "remote",
      "url": "https://koinote.app/mcp",
      "oauth": false,
      "headers": { "Authorization": "Bearer {env:KOINOTE_MCP_TOKEN}" }
    }
  }
}

Choose one of the V1 or V2 blocks. If other servers are configured, merge the koinote entry into the appropriate object and preserve your existing configuration.

Official client documentation

Read-only verification and troubleshooting

Inspect the tool list, then call list_documents with a read token. For a 401, check the client process’s environment variable, credential type, expiry, and revocation status. Document and repository access also require active lifetime membership. Check the scope if write tools are missing.

For repositories, use the connection name koinote-agent, the KOINOTE_AGENT_TOKEN environment variable, and a repository PAT. Copy separate configuration-sync instructions from the snapshot.

Back to MCP overview