Connect External Chats
Connect Claude Code, Claude Desktop, Cursor, and other coding assistants to read and write to your RA-H knowledge base.
What This Does
This lets your coding assistants (like Claude Code) read from and write to your personal RA-H knowledge database. Your assistant can:
- Search your existing notes and research
- Add new insights directly to your knowledge base
- All data stays on your computer - nothing goes to the cloud
Prerequisites
- RA-H app must be running - Open RA-H and keep it running
- Enable External Agents - In RA-H, go to Settings → External Agents and toggle it ON
- Get your unique connection URL - Copy the URL that appears (will look like
http://127.0.0.1:[PORT]/mcpwhere PORT is a number assigned to your app)
Claude Code Setup (Complete Beginner Guide)
Step 1: Get Claude Code Running
If you've never used Claude Code before, here's how to get started:
-
Get Claude Access
- Go to claude.ai and sign up for a Claude Pro account ($20/month)
- You need a Pro account to use Claude Code
-
Install Claude Code
- Open Terminal (on Mac: press Cmd+Space, type "Terminal", press Enter)
- Type this command and press Enter:
npm install -g @anthropic-ai/claude-code- If you don't have npm, install it first: nodejs.org/en/download
-
Login to Claude Code
- In Terminal, type:
claude-code auth login - This will open your web browser to claude.ai
- Login with your Claude Pro credentials
- Close the browser when it says "Authentication successful"
- In Terminal, type:
Step 2: Create Your First Project
-
Create a folder for your project
mkdir my-ra-h-project cd my-ra-h-project -
Create the connection file
- In Terminal, type:
touch .mcp.json - Open the file in a text editor:
open .mcp.json - Copy and paste this template into the file:
{ "mcpServers": { "ra-h": { "type": "http", "url": "REPLACE_WITH_YOUR_URL" } } }- Critical step: Replace
REPLACE_WITH_YOUR_URLwith the exact URL from RA-H Settings → External Agents - Your URL will look like
http://127.0.0.1:44145/mcp(but the number might be different) - Save the file
- In Terminal, type:
Step 3: Start Claude Code
-
Launch Claude Code in your project folder
claude-code- This opens Claude Code connected to your project and RA-H
-
Test the connection
- Ask Claude: "Can you search my RA-H knowledge base for anything about 'test'?"
- If it works, Claude will search your RA-H database
- If it doesn't work, see troubleshooting below
Step 4: Start Using It
To search your knowledge base:
- "Search RA-H for notes about [topic]"
- "What do I already know about [subject]?"
To add new knowledge:
- "Add this insight to RA-H: [your insight] with tags [tag1, tag2]"
- "Save this research to my knowledge base: [content]"
Example conversation:
You: "Search RA-H for anything about machine learning"
Claude: [searches and shows results]
You: "Add this to RA-H: Machine learning projects need good data validation with tags machine-learning, best-practices"
Claude: [creates new node in your RA-H database]
Troubleshooting Claude Code
"Connection refused" or "tools not found"
- Make sure RA-H is running
- Check that External Agents is ON in RA-H Settings
- Double-check the URL - The number in your URL (port) must match exactly what's shown in RA-H Settings
- Restart Claude Code: press Ctrl+C to quit, then run
claude-codeagain
"Authentication failed"
- Run
claude-code auth loginagain - Make sure you have Claude Pro (not the free version)
"File not found" errors
- Make sure you're in the correct folder with your
.mcp.jsonfile - Check the file was saved properly with the right content
Other Coding Assistants
Claude Desktop
Uses the same setup as Claude Code:
- Create a
.mcp.jsonfile in your project folder (same format as above) - Restart Claude Desktop
- Check Settings → Model Context Protocol to confirm connection
Cursor
- Create a
.mcp.jsonfile in your project (same format as Claude Code) - Restart Cursor
- Test by asking Cursor to search your RA-H database
ChatGPT
Currently not supported - ChatGPT requires HTTPS connections and additional setup. We're working on a solution.
Best Practices
Always search first before adding new knowledge:
- Ask: "Search RA-H for anything about [topic]"
- This prevents creating duplicate notes
Use clear, descriptive titles when adding nodes:
- Good: "Claude Code setup process with common errors"
- Bad: "Setup stuff"
Include relevant tags (dimensions) to organize your knowledge:
- Examples: "programming", "tutorials", "troubleshooting", "claude-code"
Example workflow:
- "Search RA-H for notes about Python debugging"
- Review what you already know
- "Add this to RA-H: New Python debugging technique using breakpoint() function with tags python, debugging, techniques"
Video Walkthrough
Advanced Troubleshooting
Connection suddenly stopped working
- RA-H was probably closed. Restart RA-H and make sure External Agents is ON
"Authentication failed" in Claude Code
- Your Claude Pro subscription may have expired
- Try:
claude-code auth loginto re-authenticate
Want to test the connection manually? For advanced users, you can test RA-H directly in Terminal:
curl -s http://127.0.0.1:44145/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json,text/event-stream" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}'
You should see a JSON response with rah.search_nodes and rah.add_node. If not, RA-H isn't running properly.
Created a node but don't see it in RA-H
- The database updates immediately, but the UI might need a refresh
- Try switching between different views in RA-H