Skip to content

feat: Cursor integration — MCP server config + lifecycle hooks#236

Merged
buildingjoshbetter merged 2 commits into
mainfrom
feat/cursor-integration
May 11, 2026
Merged

feat: Cursor integration — MCP server config + lifecycle hooks#236
buildingjoshbetter merged 2 commits into
mainfrom
feat/cursor-integration

Conversation

@buildingjoshbetter
Copy link
Copy Markdown
Owner

Closes #234

Summary

  • Adds CursorAdapter in truememory/hooks/adapters/cursor.py — dual-file JSON adapter with MCP at ~/.cursor/mcp.json and hooks at ~/.cursor/hooks.json (with "version": 1 top-level key)
  • 25 new tests covering both config files, version key, camelCase event names, idempotency, additive merge, dual-file uninstall, and interface compliance
  • Quickstart guide at docs/setup-cursor.md, compatibility matrix updated with Cursor column

Test plan

  • All 25 new tests pass
  • All 59 existing adapter tests still pass (zero regressions)
  • uvx ruff check passes — no lint errors
  • Import chain verified — no circular imports
  • Interface compliance: all 11 CLIAdapter abstract methods implemented
  • Idempotent install: running twice produces identical config (both files)
  • Uninstall removes TrueMemory entries from BOTH mcp.json and hooks.json
  • Standalone hooks (python -m truememory.ingest.hooks.session_start) still importable
  • All 6 existing adapters (Claude, Codex, Kimi, Hermes, OpenClaw) still load in registry
  • Event names verified camelCase: sessionStart, stop, preCompact
  • hooks.json includes required "version": 1 key

Adds CursorAdapter for Cursor IDE with dual-file JSON config: MCP at
~/.cursor/mcp.json and hooks at ~/.cursor/hooks.json (with version:1 key).
Uses camelCase event names (sessionStart, stop, preCompact). Includes 25
tests covering both config files, quickstart doc, and compatibility matrix.
…h Cursor and Gemini adapters

registry.py, compatibility.md, and README.md now list all 7 adapters
(Claude, Codex, Cursor, Gemini, Kimi, Hermes, OpenClaw).
@buildingjoshbetter buildingjoshbetter merged commit 5aeb46d into main May 11, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: Cursor integration — MCP server config + lifecycle hooks

1 participant