Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions plugins/codex/.mcp.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
{
"mcpServers": {
"basic-memory": {
"command": "uvx",
"args": [
"--prerelease=allow",
"basic-memory",
"mcp"
]
"command": "basic-memory",
"args": ["mcp"]
}
}
}
4 changes: 4 additions & 0 deletions plugins/codex/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ ref. All refs are updated together with

## Requirements

- **[Basic Memory](https://docs.basicmemory.com/)** - required: install it with
`uv tool install basic-memory`. The persistent `basic-memory` executable runs
the MCP server, so an active Codex session does not depend on uv's removable
package cache.
- **[uv](https://docs.astral.sh/uv/)** — required: the hooks are PEP 723
scripts executed via `uv run --script`, which installs their pinned Basic
Memory revision. Install per platform:
Expand Down
6 changes: 4 additions & 2 deletions scripts/validate_codex_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,10 @@ def validate_plugin(plugin_dir: Path) -> None:
basic_memory = servers["basic-memory"]
if not isinstance(basic_memory, dict):
raise SystemExit(".mcp.json: basic-memory server must be an object")
if basic_memory.get("command") not in {"uvx", "basic-memory", "bm"}:
raise SystemExit(".mcp.json: basic-memory server uses an unexpected command")
if basic_memory.get("command") != "basic-memory":
raise SystemExit(".mcp.json: basic-memory server must use the persistent CLI")
if basic_memory.get("args") != ["mcp"]:
raise SystemExit(".mcp.json: basic-memory server must pass only the mcp command")

# --- Hooks ---
hooks_json = read_json(plugin_dir / "hooks" / "hooks.json")
Expand Down
8 changes: 8 additions & 0 deletions tests/test_codex_plugin_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@ def test_codex_plugin_mcp_config_is_tracked_and_not_ignored() -> None:
assert tracked.returncode == 0, tracked.stderr


def test_codex_plugin_mcp_uses_persistent_cli() -> None:
repo_root = Path(__file__).resolve().parents[1]
config = json.loads((repo_root / "plugins/codex/.mcp.json").read_text(encoding="utf-8"))

server = config["mcpServers"]["basic-memory"]
assert server == {"command": "basic-memory", "args": ["mcp"]}


def test_codex_plugin_hooks_are_zero_logic_uv_scripts() -> None:
# The plugin ships configuration plus launchers only: the hook bodies live
# in the basic-memory package behind `bm hook` (SPEC-55); each launcher is
Expand Down