Back to GigaRAG

Connect an agent

Give an AI tool access to your GigaRAG Workspace, so it can search, read and write your memos while it works.

OpenCode

The open source terminal agent that runs any model.

Connect with the GigaRAG CLI

One command connects OpenCode and every other AI tool on this machine. Signing in happens in your browser, so no key is written into any config file.

npm install -g gigarag
gigarag login
gigarag connect

Restart OpenCode afterwards. Nothing here expires, and gigarag connect --remove takes GigaRAG back out of everything it touched.

Sign in with GigaRAG

Connect without a key: OpenCode opens your browser, you sign in to GigaRAG and pick this workspace.

  1. 1.

    Add GigaRAG without a key

    opencode.json
    {
      "mcp": {
        "gigarag": { "type": "remote", "url": "https://mcp.gigarag.com/mcp" }
      }
    }
  2. 2.

    Start the sign-in

    opencode mcp auth gigarag
  3. 3.

    Sign in with your GigaRAG account

    Your browser opens GigaRAG. Pick the workspace to share and approve. No key is stored in the app, and the connection does not expire.

Or paste a prompt

Paste this into OpenCode. It carries your agent key and tells the agent exactly what to change, so it sets the connection up itself.

Merge into ~/.config/opencode/opencode.json under mcp.gigarag:
{ "type": "remote", "url": "https://mcp.gigarag.com/mcp", "oauth": false, "headers": { "Authorization": "Bearer <api-key>" } }

Tell me to restart OpenCode. Don't repeat the key.

Or set it up by hand

  1. 1.

    Add GigaRAG to your config

    oauth set to false tells OpenCode to use the key rather than try to sign in.

    opencode.json
    {
      "mcp": {
        "gigarag": {
          "type": "remote",
          "url": "https://mcp.gigarag.com/mcp",
          "oauth": false,
          "headers": { "Authorization": "Bearer <api-key>" }
        }
      }
    }
  2. 2.

    Restart OpenCode

Check it worked

Send this once it is connected. An answer drawn from your workspace means the connection is live.

List my GigaRAG buckets.

Written from the official docs: OpenCode MCP