> ## Documentation Index
> Fetch the complete documentation index at: https://docs.membase.so/llms.txt
> Use this file to discover all available pages before exploring further.

# OpenCode

> Connect Membase to OpenCode via CLI setup. Add persistent memory to OpenCode for context-aware coding that remembers your preferences across sessions.

<Steps>
  <Step title="Run this command in your terminal">
    ```bash theme={null}
    npx -y membase@latest --client opencode
    ```

    This registers Membase as an MCP server in OpenCode.
  </Step>

  <Step title="Authenticate with Membase">
    ```bash theme={null}
    opencode mcp auth membase
    ```

    A browser window opens automatically for OAuth authentication.
  </Step>

  <Step title="Start using Membase in OpenCode">
    Membase is ready to use after authentication completes.
  </Step>
</Steps>

## Next Steps

<CardGroup cols={2}>
  <Card title="Bring Your Context" icon="download" href="/getting-started/bring-context">
    Import chat history, connect apps, and more.
  </Card>

  <Card title="Use Your Context" icon="comment-dots" href="/getting-started/use-context">
    Chat with Memory, agent retrieval, and dashboard exploration.
  </Card>

  <Card title="Knowledge Wiki" icon="book" href="/features/wiki">
    Store factual knowledge alongside your memories.
  </Card>

  <Card title="Membase MCP" icon="link" href="/features/membase-mcp">
    See every MCP tool your agent can call.
  </Card>
</CardGroup>
