Skip to content

Cursor IDE not being discovered in installation/update #222

Closed

Description

@xberry1231

When updating from an earlier version via the install.ps1 Cursor IDE didn't get discovered (despite this working in the past). When I uninstalled the previous version it removed some code from the .cursor directory, but new install didn't update that directory - just the VS Code installation. I manually added the server to the ~.cursor\mcp.json file, but the cbm-code-discovery-gate hook is firing from the installed claude code hook and triggering a popup that prompts for which program to open it in. Selecting Cursor doesn't seem to work and that hook is firing every time the cursor agent tries to read from a file (see #214 as potential overlap) - since that hook isn't natively running the agent doesn't ever execute any of the MCP commands.

Platform: Windows
Previous version: v0.4.4
Updated version: v0.6.0

Activity

  1. DeusData commented on Apr 7, 2026

    @DeusData
    Owner

    Hey, thx for reporting 🙏 Will tackle this asap after the 15th. Hope you can wait until then

  2. xberry1231 commented on Apr 8, 2026

    @xberry1231
    Author

    Thanks, no problem. I just uninstalled it for now until I can get this fixed. A couple of other observations / symptoms which may be related to this:

    • I was able to get the MCP commands to execute, but it required updating some instructions vs. what used to work. For example, index_repository didn't recognize the current workspace directory as the repo to index (had to explicitly state repo_path as an arg) where this used to work.
    • Agent tool calls needed to include the sanitized project name explicitly, probably the same issue as the above bullet.
    • The index db wasn't updating based on any code changes or git activity. Basically it would persist static at the state when initially indexed and re-running index_repository threw some errors.
  3. DeusData commented on Apr 8, 2026

    @DeusData
    Owner

    Hey, thanks for the feedback. Can you check if your auto-indexing is enabled? It is a config currently. Can you also tell me on which OS you are running this and which agent framework u use?

  4. mosi-kha commented on May 13, 2026

    @mosi-kha

    @DeusData
    Hi
    Thanks for this repo. I want to know when the cursor editor will be supported

  5. yangsec888 commented on May 21, 2026

    @yangsec888
    Contributor

    Confirming the Cursor detection gap on macOS too, with v0.6.1 (the OP's report was on Windows).

    What I see on a clean install:

    • codebase-memory-mcp --help lists "Claude Code, Codex CLI, Gemini CLI, Zed, OpenCode, Antigravity, Aider, KiloCode, Kiro" under auto-detected agents — Cursor is not present.
    • detect_agents in src/cli/cli.c has branches for ~/.claude, ~/.codex, ~/.gemini, Zed, OpenCode, Antigravity, Aider, KiloCode, ~/.config/Code/User (VS Code), ~/.openclaw, and ~/.kiro — but no branch for ~/.cursor/. So install skips it on macOS for the same reason it does on Windows.

    The manual workaround works end-to-end on macOS:

    // ~/.cursor/mcp.json
    {
      "mcpServers": {
        "codebase-memory-mcp": { "command": "/abs/path/to/codebase-memory-mcp" }
      }
    }

    Restart Cursor → all 14 tools (search_graph, trace_path, index_repository, …) get discovered and the stdio handshake succeeds. cbm_install_editor_mcp in src/cli/cli.c:734 already writes exactly this shape (its own comment says "Cursor/Windsurf/Gemini (mcpServers key)"), so this is purely a detection gap on the install side, not a format gap.

    Two side-notes from setup, in case useful:

    • auto_index = false by default. Flipping it to true (codebase-memory-mcp config set auto_index true) fixes the "graph doesn't refresh after git changes" symptom @xberry1231 mentioned.
    • For the agent-instructions half of install, Cursor's native equivalent of AGENTS.md is a per-project .cursor/rules/<name>.mdc with alwaysApply: true. Cursor doesn't expose a stable BeforeTool-style settings hook, so a rules file is the right vehicle there — and on Windows that also sidesteps the Claude-Code-hook-misfiring-on-Cursor cross-talk the OP described, since nothing user-level changes.

    @DeusData happy to send a focused PR if you haven't started: add ~/.cursor/ to detect_agents, reuse cbm_install_editor_mcp for the MCP entry, and write .cursor/rules/codebase-memory.mdc with the existing agent_instructions_content block. Skipping the BeforeTool-style hook piece deliberately for the reason above. Just say the word.

  6. sergio-domingues commented on May 25, 2026

    @sergio-domingues

    It would be nice to add this feature to help streamline the setup for cursor

  7. DeusData commented on May 31, 2026

    @DeusData
    Owner

    Thanks — you diagnosed this precisely. The root cause: Cursor was missing from the editor-detection table entirely. The installer detected Claude Code, Codex, Gemini, Zed, VS Code, KiloCode, Kiro, etc., but never checked for ~/.cursor/, so install/update only ever wrote the VS Code config and silently skipped ~/.cursor/mcp.json — exactly the "only the VS Code installation got updated" behavior you saw. (Uninstall did remove the Cursor entry, which is why your earlier config got cleaned out but never recreated.)

    Fixed in commit f88d031:

    • ~/.cursor/ is now detected and reported as a "Cursor" agent
    • install registers the MCP server in ~/.cursor/mcp.json (mcpServers format)
    • uninstall removes it
    • regression test cli_detect_agents_finds_cursor_issue222 added

    This ships in the next release — after updating, Cursor should be discovered and configured automatically.

    On the second part — the cbm-code-discovery-gate hook firing inside Cursor and triggering an "open with…" popup — that's a separate issue from the Claude Code hook installation and overlaps with #214 as you noted. I'm tracking the hook behavior there; please follow #214 for that half. Thanks again for the detailed report!

  8. cobrabr commented on Jun 8, 2026

    @cobrabr

    I ran codebase-memory-mcp update just now and not only did it not recognize Cursor, it also throws some other strange errors:

    Image

    The list of auto-detected agents doesn't include Cursor, either:

    Image
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingeditor/integrationEditor compatibility and CLI integration

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions