Codex Plugin¶
Nuzo includes a thin Codex plugin wrapper in packages/codex-plugin.
The plugin does not implement memory behavior directly. It points Codex at the Nuzo MCP server, while the memory lifecycle remains in packages/core.
Codex is one host package, not the whole product boundary. Claude Code and future MCP-compatible agent CLIs should use the same MCP server and core behavior.
See docs/architecture/agent-host-compatibility.md before changing plugin packaging.
Official Codex Shape¶
The Codex plugin contract starts with:
- a plugin folder;
- a required
.codex-plugin/plugin.jsonmanifest; - optional bundled capabilities such as skills, apps, and MCP servers;
- installation through the Codex plugin directory or a configured marketplace source.
For Nuzo, the plugin should only package the MCP server. It should not store memory, rank recall results, validate privacy policy, or implement import/export behavior directly.
Codex identifies the plugin by the manifest name, so Nuzo keeps the stable identifier nuzo and the human display name Nuzo.
Package Layout¶
Development source:
packages/codex-plugin/
├── .codex-plugin/
│ └── plugin.json
├── .mcp.json
├── README.md
└── package.json
Generated release artifact:
Generate and validate it with:
The generated artifact is ignored by Git. Release automation should recreate it from a clean checkout.
Runtime Resolution¶
The source plugin uses the monorepo build for development:
The generated release plugin does not rely on that sibling directory. It pins the published MCP package to the same version as the plugin:
0.1.0 is illustrative. Packaging uses the actual shared package version and
rejects version drift.
The first launch may need npm registry access. Nuzo does not use latest and
does not require a global install.
The MCP server uses the default local memory store:
To override the store for local testing, run the MCP server with:
Development Install Flow¶
This flow validates the monorepo source package. It is separate from the generated release artifact.
- Build the monorepo:
- Validate the plugin manifest and MCP config:
- For release-layout testing, generate the artifact:
- Point a local marketplace entry at
build/plugins/codex/nuzo. The marketplace entry should usesource.pathrelative to the marketplace root.
Example entry:
{
"name": "nuzo",
"source": {
"source": "local",
"path": "./plugins/nuzo"
},
"policy": {
"installation": "AVAILABLE",
"authentication": "ON_INSTALL"
},
"category": "Developer Tools"
}
-
Restart Codex.
-
Open the plugin directory:
- Install or enable
Nuzo, then start a new thread before relying on the plugin.
The generated config becomes runnable only after its matching
@nuzo/mcp-server version exists in npm. Until the first package publication,
this validates layout and host metadata rather than a public end-user install.
Direct MCP Fallback¶
For debugging the MCP server without plugin packaging, configure Codex directly against the built server:
Use this only to isolate MCP behavior. Plugin validation should still go through the package in packages/codex-plugin.
Exposed Tools¶
memory.remembermemory.recallmemory.recall_hookmemory.listmemory.updatememory.historymemory.forgetmemory.forget_manymemory.exportmemory.importmemory.doctor
Validation¶
Validate the plugin manifest with:
The validator checks:
.codex-plugin/plugin.jsonexists;- required manifest fields are present;
- the plugin identifier is stable kebab-case;
- the license is
Apache-2.0; mcpServerspoints to an existing relative.mcp.jsonfile;- source
.mcp.jsondefines the development MCP server path.
Release validation additionally checks:
- the MCP server runs through
npx; @nuzo/mcp-serveris pinned to the plugin version;- no sibling monorepo path remains in the artifact.
The repository check also validates the plugin metadata:
Generate and validate both host artifacts with:
Current Limits¶
- Public installation waits for publication of the matching MCP package.
- Runtime memory remains local and should not be committed to Git.
- Automatic recall or capture hooks must follow
docs/operations/lifecycle-hooks.mdbefore implementation. - Capture suggestions must follow
docs/spec/capture-suggestions.mdand callmemory.rememberonly after confirmation.
Source References¶
- Codex manual, Build plugins: plugin manifests, marketplace metadata, local plugin testing, and workspace sharing.
- Codex manual, Plugins: plugin directory, install flow, enabled state, and new-thread pickup after install.
- Codex manual, Model Context Protocol: direct MCP setup and plugin-provided MCP server configuration.