# Windsurf

> **TL;DR** Edit one JSON file, restart Windsurf, OAuth on first use.

#### Prerequisites

* Windsurf installed
* Personal Access Token created on the Memory Studio

#### Setup

For remote http mcp connections, windsurf only allows with Personal Access Tokens (PATs).&#x20;

Read more [here](/the-plurality-mcp-server.md#personal-access-token-api-key) on how to create one from Memory Studio.

1. Edit (or create) the raw mcp config file<br>
   * macOS: `~/.codeium/windsurf/mcp_config.json`
   * Windows: `%USERPROFILE%\.codeium\windsurf\mcp_config.json`

```json
{
  "mcpServers": {
    "plurality-memory": {
      "disabled": false,
      "headers": {
        "Authorization": "Bearer plur_pat_xxx"
      },
      "serverUrl": "https://app.plurality.network/mcp"
    }
  }
}
```

2. Restart Windsurf.
3. Open the Cascade panel (agent sidebar). The Plurality tools become available to the AI agent.
4. On first use, Windsurf opens your browser for OAuth login.

#### Verify

In Cascade, ask: *"List my Plurality memory buckets."*

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

#### Troubleshoot

**Tools missing in Cascade.** Confirm the JSON key is `serverUrl` (not `url`) — Windsurf is picky about this.

**OAuth completes but no response.** Restart Windsurf fully and try again.

**Personal Access Token was correct.** Make sure the header name is exactly *Authorization* and the value is *Bearer \<your access token starting with plur\_pat\_>*


---

# 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/windsurf.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.
