# Claude Code

> **TL;DR** One CLI command, one OAuth flow.

#### Prerequisites

* Claude Code installed and logged in

#### Setup

In your terminal:

```
claude mcp add --transport http plurality-memory https://app.plurality.network/mcp
```

Then authenticate inside Claude Code:

```
> /mcp
```

This opens an OAuth browser window. Sign in with your Plurality account. Tokens are cached locally.

#### Verify

In a Claude Code session, ask: *"List my memory buckets."*

If Claude calls `get_user_memory_buckets` and returns results, you're connected.

#### Troubleshoot

**`claude: command not found`.** Make sure Claude Code is installed and on your `$PATH`.

**`/mcp` shows the server but no tools.** OAuth may not have completed. Run `/mcp` again and follow the browser prompt.

**Need to disconnect.** Run `claude mcp remove plurality-memory`.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.plurality.network/the-plurality-mcp-server/connect-your-agents-via-mcp/claude-code.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
