Second Brain
Star on GitHubGet started

One address
for every client

Every MCP-compatible client connects to the same place: your Worker URL with /mcp on the end. Most clients discover the sign-in flow themselves: add the URL, let the client open the hosted sign-in page, and enter your password there. On a solo brain that is the password you chose at setup; on a team brain, your own member token.

One rule before anything else: never put a token in the URL. Address-bar authentication such as /mcp?token=... was removed in v3, because URLs leak into browser history, proxy logs and referrer headers.

The address every client uses

https://YOUR-WORKER-URL/mcp

If you used the desktop app, this is the AI connection link it showed you, also available under Connection details.

Claude Desktop

Add the connector, then sign in.

  1. If your build supports remote custom connectors, add a custom connector with the same URL as Claude on the web:

    https://YOUR-WORKER-URL/mcp
  2. Sign in. Claude Desktop opens the hosted sign-in page; enter your password or member token once.

For builds that need an MCP configuration file instead, use mcp-remote with an authorization header. Replace YOUR-TOKEN with your owner password, or your member token on a team brain, and treat the file as a secret, because it contains the token.

Manual configuration
{
  "mcpServers": {
    "second-brain": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "https://YOUR-WORKER-URL/mcp",
        "--header",
        "Authorization: Bearer YOUR-TOKEN"
      ]
    }
  }
}

What you will see: Second Brain shows as connected once you have signed in.

Confirm your build supports remote connectors, or that the configuration file is the one Claude Desktop reads, then remove and re-add the connection.

More fixes if it still will not connect.

Claude Code

Run the setup script, or connect by hand.

  1. Quickest is the setup script, which registers the connection and installs the global instructions:

    curl -fsSL https://raw.githubusercontent.com/rahilp/second-brain-cloudflare/main/scripts/connect-ai-clients.sh | bash -s -- https://YOUR-WORKER-URL

    A PowerShell variant, scripts/connect-ai-clients.ps1, does the same on Windows. The token is entered only on the hosted sign-in page, never through the script or your shell history, and the scripts are safe to run again.

  2. Sign in on the page the script opens, with your password or member token.

To connect and install the instructions yourself instead:

Manual configuration
claude mcp add --transport http second-brain https://YOUR-WORKER-URL/mcp

Then add the repository's Claude instructions to ~/.claude/CLAUDE.md, so sessions know to recall and remember.

What you will see: a browser sign-in page on first use. Enter your password or member token once.

Claude Code loads tool schemas lazily, so the connection can show as working while remember and recall are missing from the visible tool list. That is normal, not an outage. Ask it to run recall with a real question; results, or a "no memories found" reply, mean everything works. Only a tool call that returns an actual error means the connection is down.

More fixes if it still will not connect.

ChatGPT

Turn on Developer mode, then add the connection.

  1. Open Settings, then Security and login, and turn on Developer mode.

  2. Open ChatGPT Plugins and select the plus button.

  3. Enter Second Brain as the name, and a short description.

  4. Under Connection, enter https://YOUR-WORKER-URL/mcp as the public MCP server URL, then create the connection.

  5. Review the discovered tools, then start a new conversation with the connection enabled from the tools menu.

Developer mode availability can depend on your ChatGPT account and workspace policy. The wiki does not name which plans include it, so if the setting is missing, check what your plan supports first.

What you will see: ChatGPT opens the Second Brain sign-in page when authorization is needed. Enter your own password or member token.

Add the repository's ChatGPT instructions to your personalization settings so it knows when to remember and recall.

If it does not connect, confirm Developer mode is on, the URL ends in /mcp with no token appended, and pop-ups are not blocked.

More fixes if it still will not connect.

Cursor

Add the server, sign in, then install the rule.

  1. Open Cursor Settings, then MCP, and add a new MCP server with the URL:

    https://YOUR-WORKER-URL/mcp
  2. Complete the hosted sign-in page with your password or member token.

  3. Install the agent instructions, so every chat recalls first. Quick install, for all projects:

    mkdir -p ~/.cursor/rules
    curl -fsSL https://raw.githubusercontent.com/rahilp/second-brain-cloudflare/main/.cursor/rules/second-brain-memory.mdc \
      -o ~/.cursor/rules/second-brain-memory.mdc

    Reload Cursor afterwards. MCP alone does not tell the agent to use your brain; the rule does.

If OAuth is not offered, use a bearer header instead, never a token in the URL:

Use a bearer header
{
  "mcpServers": {
    "second-brain": {
      "url": "https://YOUR-WORKER-URL/mcp",
      "headers": {
        "Authorization": "Bearer YOUR-TOKEN"
      }
    }
  }
}

What you will see: the MCP entry shows as connected once you have signed in.

If the browser shows a plain error such as "invalid authorization request" instead of the sign-in form, Cursor may be holding an old registration. Remove the entry, re-add it with the correct URL, and sign in once more. As with Claude Code, tools can load lazily, so run a real recall before deciding it is broken.

More fixes if it still will not connect.

Codex CLI

Run the setup script, or add the server by hand.

  1. Quickest is the same setup script as Claude Code; it registers Codex too.

The manual equivalent:

Manual configuration
codex mcp add second-brain --url https://YOUR-WORKER-URL/mcp

Follow the authorization URL that Codex prints, and add the repository's Codex instructions to ~/.codex/AGENTS.md.

What you will see: an authorization URL in the terminal. Open it and sign in.

If it does not connect, re-run the setup script. It is safe to repeat and skips anything already in place.

More fixes if it still will not connect.

Devin Desktop (formerly Windsurf)

This is the editor called Windsurf until June 2026, so older links and habits may still use that name. Its default agent, Devin Local, takes MCP servers from the Devin CLI configuration, so that is the path below.

Add the server, then sign in.

  1. Add the server from your terminal:

    devin mcp add second-brain https://YOUR-WORKER-URL/mcp

    A URL makes it a remote server over streamable HTTP. By default it is saved to the current project's local config, .devin/mcp_config.local.json, which is kept out of git; add -s user to keep it in ~/.config/devin/mcp_config.json for every project instead.

  2. Sign in once:

    devin mcp login second-brain

    This opens the hosted sign-in page in your browser; enter your password or member token there, and Devin stores and refreshes the credentials locally. You can skip this step and sign in when the agent first asks, if you prefer.

If you would rather not use the browser flow, pass the token as a header instead, never in the URL. The manual equivalent of step 1, in ~/.config/devin/mcp_config.json:

Use a bearer header
{
  "mcpServers": {
    "second-brain": {
      "url": "https://YOUR-WORKER-URL/mcp",
      "headers": {
        "Authorization": "Bearer YOUR-TOKEN"
      }
    }
  }
}

Replace YOUR-TOKEN with your owner password, or your member token on a team brain, and treat the file as a secret, because it contains the token.

What you will see: devin mcp list shows second-brain, and its tools reach the agent as mcp__second-brain__recall, mcp__second-brain__remember and the rest.

An auth-required message means the stored sign-in has expired or was revoked; run devin mcp login second-brain again to sign in fresh. If tools have not appeared, give the server a moment, then ask the agent to run recall with a real question; results, or a "no memories found" reply, mean everything works.

If you are still on the Cascade agent, the older one inside this editor: its MCP servers live in ~/.codeium/windsurf/mcp_config.json, reached through the MCPs icon at the top right of the Cascade panel, and the remote entry uses the serverUrl field rather than url:

{
  "mcpServers": {
    "second-brain": {
      "serverUrl": "https://YOUR-WORKER-URL/mcp"
    }
  }
}

Save, refresh the panel, and complete the hosted sign-in page when it opens. News coverage reports Cascade retired on 1 July 2026, so expect this path to disappear; the Devin CLI path above is the one to use.

These steps follow the current Devin CLI MCP documentation, docs.devin.ai/cli/extensibility/mcp/configuration, checked on 7 September 2026, and the naming comes from Cognition's rename announcement of 2 June 2026. The wiki has no page for this editor.

More fixes if it still will not connect.

Other MCP clients

Prefer OAuth; use a bearer header only if it is not offered.

Configure the same address every client uses:

https://YOUR-WORKER-URL/mcp

If the client cannot open an OAuth flow but supports custom HTTP headers, use this instead:

Use a bearer header
{
  "mcpServers": {
    "second-brain": {
      "url": "https://YOUR-WORKER-URL/mcp",
      "headers": {
        "Authorization": "Bearer YOUR-TOKEN"
      }
    }
  }
}

A client that supports neither OAuth nor custom headers cannot connect securely to v3; do not work around it by putting a token in the URL.

When it does not connect

  • Connected, but no remember or recall tools listed. Lazy loading; verify with a real recall call first.
  • A plain error instead of the sign-in form. A stale OAuth registration. Remove the MCP connection, add the base /mcp URL again, and complete a fresh sign-in.
  • Opera says "Did you mean gmail.com?" Some browsers raise a false phishing warning when your Cloudflare subdomain contains gmail-com, which Cloudflare generates for accounts linked to a Gmail address. Click Ignore and sign in anyway, or use another browser. The permanent fixes: change your workers.dev subdomain in Cloudflare to a name without "gmail" and update every client, or attach a custom domain.
  • A password was changed, or a member token was reset. Reconnect the clients that used the old credential. A suspended or removed member's sessions stop authorizing; nobody else on the team is affected.

Team brains

Every person connects with their own token, never a shared one. Identity follows the token, not the client: recall searches that person's private layer plus the shared layer, personal captures belong only to them, and shared memories carry their name. Never share the owner's password, and never reuse one person's token for another.

Try it: save once, ask elsewhere

Pick two connected tools. Save the scope decision below in the first, then ask about it in the second. The two cards below are a labeled example, not a live result from your own brain.

Saved
Example, saved in your first tool

Launch the portfolio first; the shop can wait.

Now ask the second tool where you landed on the portfolio.

Recalled
Example, recalled in your second tool

You decided to launch the portfolio first and leave the shop for later.

This works because the instructions you installed above tell your tools when to remember and recall. Second Brain itself never reads a conversation on its own.

Go deeper: the wiki's Connect to AI Clients page has every current method, plus the Cursor Instructions page for the rule setup.

Checked against the wiki, the v3.0.0 source and the Devin Desktop documentation on 7 September 2026

Take your context into
your next conversation.

Free, open source, and in your own Cloudflare account.

Get Second Brain