Claude Desktop Integration
Connect Claude to your AI's memory π
Step 1: Find Config File
macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
Windows:
%APPDATA%\Claude\claude_desktop_config.json
Linux:
~/.config/Claude/claude_desktop_config.json
Step 2: Edit Configuration
Open the file and add:
{
"mcpServers": {
"memofai": {
"command": "node",
"args": ["/absolute/path/to/memofai-mcp-server/dist/index.js"],
"env": {
"MEMOFAI_API_TOKEN": "moa_your_token_here",
"MEMOFAI_ENVIRONMENT": "production"
}
}
}
}
Important: Replace /absolute/path/to/ with your actual path!
Find Your Path
# Navigate to mcp-server directory
cd memofai-mcp-server
# Get absolute path
pwd
# Example output: /Users/yourname/memofai-mcp-server
Step 3: Restart Claude
- Quit Claude Desktop completely
- Reopen Claude Desktop
- Look for the π icon in the bottom-right
Step 4: Test It!
Try these commands in Claude:
"Create a workspace called 'Test Workspace'"
"Create a bot named 'Memory Bot' in that workspace"
"Remember that I love building AI applications"
"What do you know about my interests?"
Claude will use Memof.ai to store and retrieve memories!
Complete Configuration Example
{
"mcpServers": {
"memofai": {
"command": "node",
"args": ["/Users/yourname/memofai-mcp-server/dist/index.js"],
"env": {
"MEMOFAI_API_TOKEN": "moa_abc123xyz...",
"MEMOFAI_ENVIRONMENT": "production"
}
},
"other-mcp-server": {
"command": "...",
"args": ["..."]
}
}
}
Note: You can have multiple MCP servers!
Troubleshooting
"No MCP servers found"
Check:
- Path to
dist/index.js is correct
- File exists:
ls /path/to/memofai-mcp-server/dist/index.js
- Node is in your PATH:
which node
Fix:
# Use full path to node
"command": "/usr/local/bin/node" # or wherever node is
"Invalid API token"
Check:
- Token starts with
moa_
- Token is in quotes
- No extra spaces
Fix:
"MEMOFAI_API_TOKEN": "moa_your_token" // β
Correct
"MEMOFAI_API_TOKEN": moa_your_token // β Missing quotes
"Connection refused"
Check:
- Environment is set to
production
- Internet connection is working
Fix:
"MEMOFAI_ENVIRONMENT": "production" // Not "prod" or "live"
Claude not showing π icon
Steps:
- Quit Claude completely (Cmd+Q on macOS)
- Check config file syntax is valid JSON
- Restart Claude
- Check Claude logs (Help β View Logs)
Using with Claude API
import Anthropic from "@anthropic-ai/sdk";
const client = new Anthropic({
apiKey: process.env.ANTHROPIC_API_KEY,
});
const response = await client.messages.create({
model: "claude-3-5-sonnet-20241022",
max_tokens: 1024,
tools: [
// MCP tools would be here
{
name: "memofai_store_memory",
description: "Store a memory in Memof.ai",
input_schema: {
type: "object",
properties: {
bot_id: { type: "string" },
content: { type: "string" }
}
}
}
],
messages: [
{ role: "user", content: "Remember that I love Python" }
]
});
Example Conversation
You: Create a workspace for my project notes
Claude: π§ Uses memofai_create_workspace
"I've created a workspace called 'Project Notes' with ID ws_abc123"
You: Add a bot for coding tasks
Claude: π§ Uses memofai_create_bot
"Created 'Coding Tasks Bot' in your Project Notes workspace"
You: Remember that I prefer FastAPI over Flask
Claude: π§ Uses memofai_store_memory
"I'll remember that you prefer FastAPI over Flask"
You: What framework do I prefer?
Claude: π Uses memofai_search_memories
"Based on what you've told me, you prefer FastAPI over Flask"
Multiple Workspaces
You can have Claude manage multiple workspaces:
"Create a workspace for personal notes"
"Create a workspace for work projects"
"List all my workspaces"
Claude will keep track of them all!
Next Steps
Need help? β Troubleshooting