memfork 0.2.2

Git for agent memory, shared by every AI tool on your machine: fork, merge, rewind and hand off work between agents over MCP.
Documentation
# MemFork client adapter registry (DESIGN §6.1).
#
# One entry per MCP client. Adding a client is an entry here plus a fixture
# test — never new code.
#
# `verified` is the date the entry was last checked against `docs`. Nothing in
# this file was confirmed by running the client; it is what the vendor's own
# documentation says on that date. Re-check before a release.
#
# Each entry has up to two ways in:
#
#   [client.cli]   the client's own `mcp add` command. Preferred, because the
#                  client then writes its own config in its own format and
#                  MemFork never parses a file it does not own. `status` asks
#                  the same command whether MemFork is registered, which is the
#                  only answer that counts: a client may store its servers
#                  somewhere MemFork does not model, or normalise what it was
#                  given, and reading its file would then disagree with it.
#   [client.file]  direct config editing. Used only when the client ships no
#                  CLI, or its CLI cannot express the requested scope. A client
#                  with no `user` path is one whose user configuration MemFork
#                  will not touch at all.
#
# In `add`, `{scope}` expands to zero or more flag tokens, `{name}` to the
# server name, `{command}` to the memfork binary path and `{args}` to its
# arguments. An expansion that produces nothing drops out of the command line.
#
# `remove` is how a registration that points at the wrong MemFork gets
# corrected: an install moves the binary, and the client keeps launching a path
# that is gone. A client with no documented `remove` is left alone and the
# command to run is printed instead, because guessing at a command that edits
# somebody's configuration is not a thing to do.
#
# `mcp_names` is what the client calls itself in MCP `initialize`, taken from
# its source code or its shipped build, since none of these document it. It is
# only used to show what a client wrote under the name a person knows; a
# client that is not listed is shown by the name it gave. A trailing `*`
# matches a prefix.
#
# [client.instructions] lists the files, relative to the repository root, that
# the client reads project instructions from on its own — only files it always
# reads, not ones it reads conditionally. `memfork init --project` writes its
# block into the fewest of these that reach every chosen client.

[[client]]
id = "claude-code"
display = "Claude Code"
docs = "https://code.claude.com/docs/en/mcp"
verified = "2026-09-20"
# The directory this client creates for itself, so "installed but never
# configured" is not mistaken for "not installed".
detect_dir = "$HOME/.claude"
# Found in the shipped build; not documented.
mcp_names = ["claude-code"]

[client.cli]
binary = "claude"
add = ["mcp", "add", "{scope}", "{name}", "--", "{command}", "{args}"]
# Asks about one server by name, rather than listing every server and
# health-checking each by starting it.
status = ["mcp", "get", "{name}"]
# The scope flag follows the name here, unlike `add`.
remove = ["mcp", "remove", "{name}", "{scope}"]
scope_user = ["--scope", "user"]
scope_project = ["--scope", "project"]

[client.file]
format = "json"
server_map = ["mcpServers"]
emit_type_stdio = true
http_url_key = "url"
project = ".mcp.json"
# No `user` path on purpose. This client keeps user-scope servers in
# `~/.claude.json`, together with its OAuth session, per-project trust settings
# and caches. MemFork neither writes nor reads that file: user scope goes
# through the `claude` command, and if that command is not on PATH, init writes
# project scope instead and says why. Leaving the path out of the registry is
# what makes that structural rather than a rule someone has to remember.

[client.instructions]
# It also reads AGENTS.md, but only when there is no CLAUDE.md at or above the
# working directory, so that is not a file it can be relied on to read.
reads = ["CLAUDE.md"]
docs = "https://code.claude.com/docs/en/memory"
verified = "2026-09-21"

[[client]]
id = "cursor"
display = "Cursor"
docs = "https://cursor.com/docs/context/mcp"
verified = "2026-09-20"
# The directory this client creates for itself, so "installed but never
# configured" is not mistaken for "not installed".
detect_dir = "$HOME/.cursor"
# Cursor ships no `mcp add` command, so the config file is the only way in.

[client.file]
format = "json"
server_map = ["mcpServers"]
emit_type_stdio = false
http_url_key = "url"
user = "$HOME/.cursor/mcp.json"
project = ".cursor/mcp.json"

[client.instructions]
# Also `.cursor/rules/*.mdc`, which need front matter; AGENTS.md is plain text.
reads = ["AGENTS.md"]
docs = "https://cursor.com/docs/context/rules"
verified = "2026-09-21"

[[client]]
id = "codex"
display = "Codex CLI"
docs = "https://learn.chatgpt.com/docs/extend/mcp?surface=cli"
verified = "2026-09-20"
# The directory this client creates for itself, so "installed but never
# configured" is not mistaken for "not installed".
detect_dir = "$HOME/.codex"
# From codex-rs/codex-mcp/src/rmcp_client.rs.
mcp_names = ["codex-mcp-client"]

[client.cli]
binary = "codex"
add = ["mcp", "add", "{name}", "--", "{command}", "{args}"]
remove = ["mcp", "remove", "{name}"]
# No `mcp get` is documented for this client, so registration is read off the
# list instead.
status = ["mcp", "list"]
# No scope flag is documented: `codex mcp add` writes the user config. Project
# scope therefore falls back to editing `.codex/config.toml`.
scope_user = []

[client.file]
format = "toml"
server_map = ["mcp_servers"]
emit_type_stdio = false
http_url_key = "url"
user = "$HOME/.codex/config.toml"
project = ".codex/config.toml"

[client.instructions]
reads = ["AGENTS.md"]
docs = "https://learn.chatgpt.com/docs/agent-configuration/agents-md"
verified = "2026-09-21"

[[client]]
id = "gemini-cli"
display = "Gemini CLI"
docs = "https://github.com/google-gemini/gemini-cli/blob/main/docs/tools/mcp-server.md"
verified = "2026-09-20"
# The directory this client creates for itself, so "installed but never
# configured" is not mistaken for "not installed".
detect_dir = "$HOME/.gemini"
# From packages/core/src/tools/mcp-client.ts.
mcp_names = ["gemini-cli-mcp-client"]

[client.cli]
binary = "gemini"
# No `--` separator: the command and its arguments are positional.
add = ["mcp", "add", "{scope}", "{name}", "{command}", "{args}"]
status = ["mcp", "list"]
remove = ["mcp", "remove", "{scope}", "{name}"]
scope_user = ["-s", "user"]
scope_project = ["-s", "project"]

[client.file]
format = "json"
server_map = ["mcpServers"]
emit_type_stdio = false
# The DESIGN §6.1 quirk: Gemini CLI uses `httpUrl` for streamable HTTP and `url`
# for SSE, where most clients use `url` for streamable HTTP. Unused until the
# shared daemon, encoded here so the difference is recorded once.
http_url_key = "httpUrl"
user = "$HOME/.gemini/settings.json"
project = ".gemini/settings.json"

[client.instructions]
# The default; `context.fileName` in its settings can change it.
reads = ["GEMINI.md"]
docs = "https://geminicli.com/docs/cli/gemini-md/"
verified = "2026-09-21"

[[client]]
id = "grok"
display = "Grok Build"
docs = "https://docs.x.ai/build/features/mcp-servers"
verified = "2026-09-20"
# The directory this client creates for itself, so "installed but never
# configured" is not mistaken for "not installed".
detect_dir = "$HOME/.grok"
# From crates/codegen/xai-grok-mcp/src/servers.rs: the configured server's name
# follows the prefix.
mcp_names = ["grok-shell-*"]

[client.cli]
binary = "grok"
add = ["mcp", "add", "{scope}", "{name}", "--", "{command}", "{args}"]
status = ["mcp", "list"]
# No scope flag documented for remove, so none is sent.
remove = ["mcp", "remove", "{name}"]
# User scope is the default and takes no flag.
scope_user = []
scope_project = ["--scope", "project"]

[client.file]
format = "toml"
server_map = ["mcp_servers"]
emit_type_stdio = false
http_url_key = "url"
user = "$HOME/.grok/config.toml"
project = ".grok/config.toml"

[client.instructions]
# It reads both, so it is reached by whichever the other clients need.
reads = ["AGENTS.md", "CLAUDE.md"]
docs = "https://docs.x.ai/build/features/project-rules"
verified = "2026-09-21"