How the config rule works (and how to control it)
The Memory connector has two separate steps: installation creates its priority rule, and a supported agent's later connection can refresh an existing rule.
Installation
install registers the MCP server for the selected agent and adds a marked rule to that agent's global instructions file:
| Agent | Default instructions file |
|---|---|
| Claude Code | ~/.claude/CLAUDE.md |
| Codex | ~/.codex/AGENTS.md |
| OpenCode | ~/.config/opencode/AGENTS.md |
| Hermes Agent | SOUL.md in the active Hermes home (~/.hermes, or %LOCALAPPDATA%\hermes on Windows) |
Relocated agent homes are supported as described in the setup guide. Each installation targets one agent. Manual setup adds the rule to the instructions file whose full path it is given. Adding the server to an MCP configuration by hand does not install this rule.
What the rule does
The rule guides the agent toward Memory tools for durable saves and recall. It explains the per-project Vault selection, permissions, reading before replacing existing facts and honest reporting of queued saves.
The connector supplies tool descriptions too, but clients can choose how to present them. A rules file provides another place for the guidance; it cannot guarantee that every client or model will always follow it.
Refresh and backups
After the MCP initialization handshake, the connector refreshes the existing block in the instructions file named by the server's RAGIONEX_MEMORY_INSTRUCTIONS_FILE setting, which manual setup and the Hermes Agent setup fill in; without it, it recognizes the launching supported agent and refreshes that agent's block. It does not create a missing block at startup and does not update another agent's file.
Before first insertion into an existing rules file, installation makes a private backup beside it. Removing a managed block also creates a backup. Routine refreshes of an existing block do not create another backup. Backup names contain .ragionex-backup-.
Refresh preserves text outside the markers.
Freeze or remove the rule
Editing only the rule body does not freeze it; a later refresh can replace that body. To freeze it, change the begin marker while retaining its identifying text, for example:
<!-- ragionex-memory-mcp:priority-rule:begin-frozen --> A modified marker makes install, refresh and automatic block removal leave that block alone. Review such a block manually if you later want to remove it.
To remove the server registration and an unmodified managed rule from a selected agent:
npx.cmd -y @ragionex/memory-mcp@latest uninstall --agent codex npx -y @ragionex/memory-mcp@latest uninstall --agent codex Without --agent, a terminal run shows the agent menu. After manual setup, run uninstall --manual --instructions-file <path> instead; it removes the rule, and the ragionex-memory-mcp entry is deleted from the agent's MCP settings file by the agent or by hand. Restart the agent after uninstalling. Pending saves and blocked recovery files remain on disk.
To keep the server but remove only the rule, back up the rules file and remove the complete block including both markers. A normal server startup leaves an absent block absent; running install again can recreate it.