Skip to content

Connect to AI Clients

Rahil Pirani edited this page Jun 2, 2026 · 6 revisions

Connect to AI Clients

Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "second-brain": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "https://<your-worker-url>/mcp",
        "--header",
        "Authorization: Bearer <your-token>"
      ]
    }
  }
}

Replace <your-worker-url> with your Cloudflare Worker URL and <your-token> with your AUTH_TOKEN.

Restart Claude Desktop, then add the custom instructions from the CLAUDE_INSTRUCTIONS.md file to Settings → Custom Instructions.


Claude Code

claude mcp add second-brain npx mcp-remote https://<your-worker-url>/mcp --header "Authorization: Bearer <your-token>"

Create ~/.claude/CLAUDE.md with the instructions from CLAUDE_INSTRUCTIONS.md, changing the source line to "claude-code".


claude.ai and iOS / Android

Go to claude.ai/customize/connectors, click + next to Connectors, then select Add custom connector:

Field Value
Name Second Brain
Remote MCP server URL https://<your-worker-url>/mcp?token=<your-token>

⚠️ Security note: This embeds your token in the URL. URLs can appear in browser history, server logs, and referrer headers. Use only if you accept that risk.

This makes your second brain available in the claude.ai web app and the Claude iOS and Android apps automatically.


ChatGPT

Go to chatgpt.com → Settings → Apps → Create App:

Field Value
Name Second Brain
Connection https://<your-worker-url>/mcp?token=<your-token>
Authentication No Auth

⚠️ Security note: This embeds your token in the URL. URLs can appear in browser history, server logs, and referrer headers. Use only if you accept that risk. Claude Desktop and Claude Code use header-based auth which is safer.

For ChatGPT custom instructions, see CHATGPT_INSTRUCTIONS.md.


Other MCP Clients (Cursor, Windsurf, Zed, etc.)

If the client supports custom HTTP headers, use:

{
  "mcpServers": {
    "second-brain": {
      "url": "https://<your-worker-url>/mcp",
      "headers": { "Authorization": "Bearer <your-token>" }
    }
  }
}

If the client does not support custom headers, embed the token in the URL:

https://<your-worker-url>/mcp?token=<your-token>

⚠️ Security note: Embedding your token in the URL is less secure than header-based auth. URLs can appear in browser history, server logs, and referrer headers. Use only if you accept that risk.

Clone this wiki locally