MCP Server Configuration
Advanced configuration options ⚙️
Environment Variables
Required
export MEMOFAI_API_TOKEN="moa_your_token_here"
Your API token from memof.ai.
Optional
# Environment (default: production)
export MEMOFAI_ENVIRONMENT="production"
# Options: production, beta, sandbox, alpha, dev
Available Environments
# Production (default)
MEMOFAI_ENVIRONMENT="production"
# API: https://api.memof.ai
# Beta testing
MEMOFAI_ENVIRONMENT="beta"
# API: https://beta-api.memof.ai
# Sandbox (safe testing)
MEMOFAI_ENVIRONMENT="sandbox"
# API: https://sandbox-api.memof.ai
# Alpha (bleeding edge)
MEMOFAI_ENVIRONMENT="alpha"
# API: https://alpha-api.memof.ai
# Local development
MEMOFAI_ENVIRONMENT="dev"
# API: http://127.0.0.1:8000
Claude Desktop Config
Basic Configuration
{
"mcpServers": {
"memofai": {
"command": "node",
"args": ["/path/to/memofai-mcp-server/dist/index.js"],
"env": {
"MEMOFAI_API_TOKEN": "moa_your_token",
"MEMOFAI_ENVIRONMENT": "production"
}
}
}
}
Multiple Environments
{
"mcpServers": {
"memofai-prod": {
"command": "node",
"args": ["/path/to/memofai-mcp-server/dist/index.js"],
"env": {
"MEMOFAI_API_TOKEN": "moa_prod_token",
"MEMOFAI_ENVIRONMENT": "production"
}
},
"memofai-sandbox": {
"command": "node",
"args": ["/path/to/memofai-mcp-server/dist/index.js"],
"env": {
"MEMOFAI_API_TOKEN": "moa_sandbox_token",
"MEMOFAI_ENVIRONMENT": "sandbox"
}
}
}
}
Using NPX (When Available)
{
"mcpServers": {
"memofai": {
"command": "npx",
"args": ["-y", "@memofai/mcp-server"],
"env": {
"MEMOFAI_API_TOKEN": "moa_your_token",
"MEMOFAI_ENVIRONMENT": "production"
}
}
}
}
Testing Configuration
With MCP Inspector
# Set environment variables
export MEMOFAI_API_TOKEN="moa_your_token"
export MEMOFAI_ENVIRONMENT="production"
# Run inspector
npx @modelcontextprotocol/inspector node dist/index.js
Opens a web UI at http://localhost:5173
Test Commands
Try these in the inspector:
-
List workspaces
Tool: memofai_list_workspaces
Parameters: {}
-
Create workspace
Tool: memofai_create_workspace
Parameters: {"name": "Test Workspace"}
-
Create bot
Tool: memofai_create_bot
Parameters: {
"name": "Test Bot",
"workspace_id": "ws_abc123"
}
Security Best Practices
1. Don't Commit Tokens
# ❌ Never do this
git add claude_desktop_config.json
# âś… Use environment variables
export MEMOFAI_API_TOKEN="moa_token"
2. Use Separate Tokens
# Development
MEMOFAI_API_TOKEN_DEV="moa_dev_token"
# Production
MEMOFAI_API_TOKEN_PROD="moa_prod_token"
3. Rotate Tokens Regularly
Get new tokens from memof.ai periodically.
Troubleshooting Config
Check Config Syntax
# Validate JSON
cat ~/Library/Application\ Support/Claude/claude_desktop_config.json | jq .
Should output formatted JSON. If error, JSON is invalid!
Check Environment Variables
# In the MCP server directory
node -e "console.log(process.env.MEMOFAI_API_TOKEN)"
# Should output your token (starts with moa_)
Check Node Path
which node
# Output: /usr/local/bin/node
# Use this in config
"command": "/usr/local/bin/node"
View Claude Logs
macOS:
tail -f ~/Library/Logs/Claude/mcp*.log
Windows:
%LOCALAPPDATA%\Claude\Logs
Advanced Configuration
Custom Timeout
{
"mcpServers": {
"memofai": {
"command": "node",
"args": ["/path/to/memofai-mcp-server/dist/index.js"],
"env": {
"MEMOFAI_API_TOKEN": "moa_your_token",
"MEMOFAI_ENVIRONMENT": "production",
"MEMOFAI_TIMEOUT": "30000"
}
}
}
}
Debug Mode
{
"mcpServers": {
"memofai": {
"command": "node",
"args": ["/path/to/memofai-mcp-server/dist/index.js"],
"env": {
"MEMOFAI_API_TOKEN": "moa_your_token",
"MEMOFAI_ENVIRONMENT": "production",
"DEBUG": "true"
}
}
}
}
Platform-Specific Notes
macOS
Config location:
~/Library/Application Support/Claude/claude_desktop_config.json
Node typically at:
/usr/local/bin/node # Homebrew
/opt/homebrew/bin/node # Apple Silicon Homebrew
Windows
Config location:
%APPDATA%\Claude\claude_desktop_config.json
Use backslashes in paths:
"args": ["C:\\path\\to\\memofai-mcp-server\\dist\\index.js"]
Linux
Config location:
~/.config/Claude/claude_desktop_config.json
Node typically at:
/usr/bin/node
/usr/local/bin/node
Next: Troubleshooting