Skip to main content

Cursor Setup

Connect Brainz Lab to Cursor IDE.

Prerequisites

  • Cursor installed
  • Node.js 18+ installed
  • Brainz Lab API key

Configuration

1. Open Cursor Settings

  1. Open Cursor
  2. Go to Settings (Cmd/Ctrl + ,)
  3. Search for “MCP” or find “Claude MCP Servers”

2. Add MCP Configuration

Add the following configuration:
{
  "brainzlab-recall": {
    "command": "npx",
    "args": ["-y", "@brainzlab/mcp-recall"],
    "env": {
      "BRAINZLAB_API_KEY": "sk_live_xxxxxxxx"
    }
  },
  "brainzlab-reflex": {
    "command": "npx",
    "args": ["-y", "@brainzlab/mcp-reflex"],
    "env": {
      "BRAINZLAB_API_KEY": "sk_live_xxxxxxxx"
    }
  }
}

3. Restart Cursor

Restart Cursor to load the MCP servers.

Alternative: Config File

You can also edit the Cursor config file directly:
OSPath
macOS~/Library/Application Support/Cursor/User/settings.json
Windows%APPDATA%\Cursor\User\settings.json
Linux~/.config/Cursor/User/settings.json
Add the MCP configuration under the appropriate key.

Usage in Cursor

In Chat

Use the chat panel to ask about your application:
“What errors are happening in production?”

While Coding

Ask about related logs while you’re working:
“Show me logs related to this function”

Debugging

When debugging issues:
“Find error logs with this stack trace”

Example Workflow

  1. Find the error:
    “What errors happened in the last hour?”
  2. Get details:
    “Show me the full stack trace for the PaymentError”
  3. Find related logs:
    “Show me logs from the same request that caused this error”
  4. Fix the code:
    “Help me fix this error based on what you see”
  5. Resolve:
    “Mark this error as resolved”

Best Practices

Be Specific

# Good
"Show me error logs from checkout in the last hour"

# Less useful
"Show me errors"

Include Context

# Good
"Find logs for user 123 during their failed checkout"

# Less useful
"Find user logs"

Use for Context

When working on a bug, ask Claude to fetch relevant logs before you start fixing.

Troubleshooting

MCP Not Working

  1. Check if Node.js is installed: node --version
  2. Verify the config syntax
  3. Restart Cursor completely
  4. Check Cursor’s output panel for errors

Slow Responses

The first query may be slow as npm downloads the package. Subsequent queries should be faster.