← Back to Home
SecondBrain Pro

MCP Integration Guide

Connect your memories to AI coding assistants

What is MCP?

The Model Context Protocol (MCP) is an open standard that lets AI assistants access external tools and data. With SecondBrain's MCP integration, your personal memories become accessible context for AI workflows — right in your IDE.

This means Claude Code, Cursor, or VS Code can query your memories, store new ones, and use your personal knowledge base while coding.

Prerequisites

Quick Setup

1 Clone & Install

git clone https://github.com/doobidoo/shodh-cloudflare.git
cd shodh-cloudflare
npm install

2 Auto-Configure

./scripts/setup-client.sh

The script will ask for your Worker URL and API key, then automatically configure Claude Desktop.

3 Manual Configuration (Alternative)

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

{
  "mcpServers": {
    "shodh-memory": {
      "command": "node",
      "args": ["/path/to/shodh-cloudflare/mcp-bridge/index.js"],
      "env": {
        "SHODH_CLOUDFLARE_URL": "https://shodh-memory.YOUR-SUBDOMAIN.workers.dev",
        "SHODH_CLOUDFLARE_API_KEY": "YOUR_API_KEY"
      }
    }
  }
}

Add to .claude/mcp.json in your project or ~/.claude/mcp.json globally:

{
  "mcpServers": {
    "shodh-memory": {
      "command": "node",
      "args": ["/path/to/shodh-cloudflare/mcp-bridge/index.js"],
      "env": {
        "SHODH_CLOUDFLARE_URL": "https://shodh-memory.YOUR-SUBDOMAIN.workers.dev",
        "SHODH_CLOUDFLARE_API_KEY": "YOUR_API_KEY"
      }
    }
  }
}

Add to your MCP settings in Cursor or VS Code:

{
  "mcpServers": {
    "shodh-memory": {
      "command": "node",
      "args": ["/path/to/shodh-cloudflare/mcp-bridge/index.js"],
      "env": {
        "SHODH_CLOUDFLARE_URL": "https://shodh-memory.YOUR-SUBDOMAIN.workers.dev",
        "SHODH_CLOUDFLARE_API_KEY": "YOUR_API_KEY"
      }
    }
  }
}

4 Verify

./scripts/verify-installation.sh

Restart your MCP client. You should see the shodh-memory tools available.

Available MCP Tools

The MCP bridge exposes 15 tools for managing your memories:

remember

Store a new memory with type, tags, and emotional metadata

recall

Semantic search across all memories

recall_by_tags

Filter memories by specific tags

proactive_context

Surface relevant memories from conversation

list_memories

Browse all memories with pagination

update_memory

Edit memory content or metadata

forget

Delete a specific memory

forget_by_tags

Bulk delete by tag

batch_remember

Import up to 50 memories at once

reinforce_memory

Boost quality score of a memory

consolidate

Apply decay to old, low-quality memories

memory_stats

Get storage statistics

context_summary

Condensed view of recent decisions & learnings

Use Cases

Coding with Context

"Recall what I learned about the API rate limiting issue last week" — your AI assistant pulls relevant memories while you code, giving it personal context it wouldn't otherwise have.

Cross-Device Memory

Capture a thought on your iPhone while walking, then access it from Claude Code on your laptop. All memories sync through your Cloudflare backend.

Project Documentation

"Remember that we decided to use WebSockets instead of polling for the real-time feature" — store architectural decisions as memories, retrieve them when the topic comes up again.

Learning Journal

Capture learnings throughout the day via voice on your Watch. Later, ask your AI assistant to summarize what you learned this week.

The Full Ecosystem

SecondBrain Pro (iOS/Watch) + shodh-cloudflare (Backend) + MCP Bridge (IDE) = A unified personal knowledge system that works across all your devices and development tools.

Memories captured on your phone flow seamlessly to your coding environment, and insights from coding sessions can be queried from your watch. All powered by your own Cloudflare infrastructure.

Resources