Connect one agent

Connect Claude Code, Codex, Cursor or Gemini CLI to your cortex one at a time with memorinth setup, and see exactly which files each one changes.

On this page

memorinth setup connects one agent, in every project, to the cortex agents use. memorinth init does the same for several at once.

$ memorinth setup <agent>

Each agent gets the MCP server, the hooks and the skills. The skills are installed once, in ~/.agents/skills; an agent with a skills folder of its own gets links to them.

Claude Code

$ memorinth setup claude-code
  • MCP server: added with claude mcp add, in ~/.claude.json.
  • Hooks: in ~/.claude/settings.json. The briefing at session start, and a reminder to save when it changed files.
  • Skills: linked into ~/.claude/skills.

Codex

$ memorinth setup codex
  • MCP server: added with codex mcp add, in ~/.codex/config.toml.
  • Hooks: in ~/.codex/hooks.json.

Cursor

$ memorinth setup cursor
  • MCP server: in ~/.cursor/mcp.json.
  • Hooks: a sessionStart hook in ~/.cursor/hooks.json.

Gemini CLI

$ memorinth setup gemini
  • MCP server and hooks: under mcpServers and hooks (a SessionStart hook) in ~/.gemini/settings.json.

Options

Option
--cortex <path> Make this the cortex agents use, and turn agents on
--remove Take Memorinth out of this agent

Run setup again any time to repair a connection, for example one an older version made. To take Memorinth out of every agent at once:

$ memorinth agents off

memorinth agents on connects them again.

For a walk through the whole thing, from installing to the first session, see Give Claude Code a long-term memory and Memory for Cursor, Codex and other MCP clients.

Updated