Cursor Setup

Configure Berry as an MCP server in Cursor

Prerequisites

  • Berry installed (pip install berry or pipx install berry)
  • Berry authenticated (berry auth login; or berry auth set for CI/headless)

Option 1: Run berry init

The simplest way. From your project root:

berry init

This creates .cursor/mcp.json with the Berry server configuration. Reload MCP servers in Cursor when done.

Use Berry skills in Cursor

Cursor supports slash commands in the Agent input — type / to open the command menu. If you don't see Berry prompts listed, paste a prompt like the examples below.

Search & Learn (verified)

Workflow: Search & Learn

Use the search_and_learn_verified skill.
Question: How does <feature> work in this repo? Cite evidence spans and verify.

RCA Fix Agent

Workflow: Refactoring & Bug Fixes

Use the rca_fix_agent skill.
Bug: <describe failure + repro steps>. Provide root cause, fix, and tests.

Option 2: Manual configuration

Create .cursor/mcp.json in your project root:

{
  "mcpServers": {
    "berry": {
      "command": "berry",
      "args": ["mcp", "--server", "classic"],
      "env": {
        "OPENAI_API_KEY": "sk-...",
        "BERRY_SERVICE_URL": "http://..."
      }
    }
  }
}

Tip: if you run berry auth login first, berry init will embed env defaults from ~/.berry/mcp_env.json for you.

Option 3: Deeplink

Cursor supports cursor:// deeplinks for one-click MCP server installation. Berry can generate these:

berry deeplink cursor

This prints a URL you can open in your browser. Cursor will prompt you to add the Berry MCP server.

Verify it works

  1. Open Cursor in your project
  2. Reload MCP servers (Cmd/Ctrl + Shift + P → "Reload MCP Servers")
  3. Check that Berry tools appear: detect_hallucination, audit_trace_budget

Config file location

File.cursor/mcp.json
FormatJSON
ScopePer-project (in project root)