examples/codex-memory-plugin/README.md
Small Codex MCP example for explicit OpenViking memory operations.
This example intentionally stays MCP-only:
~/.codexCodex gets four tools:
openviking_recallopenviking_storeopenviking_forgetopenviking_health.codex-plugin/plugin.json: plugin metadata.mcp.json: MCP server wiring for Codexsrc/memory-server.ts: MCP server sourcepackage.json: build and start scriptstsconfig.json: TypeScript build configStart OpenViking before using the MCP server:
openviking-server --config ~/.openviking/ov.conf
cd examples/codex-memory-plugin
npm install
npm run build
Use the built server:
codex mcp add openviking-memory -- \
node /ABS/PATH/TO/OpenViking/examples/codex-memory-plugin/servers/memory-server.js
Or copy .mcp.json into a Codex workspace and adjust the cwd path if needed.
The server reads OpenViking connection settings from ~/.openviking/ov.conf.
Supported environment overrides:
OPENVIKING_CONFIG_FILE: alternate ov.conf pathOPENVIKING_API_KEY: API key overrideOPENVIKING_ACCOUNT: account identity, default from ov.confOPENVIKING_USER: user identity, default from ov.confOPENVIKING_AGENT_ID: agent identity, default codexOPENVIKING_TIMEOUT_MS: HTTP timeout, default 15000OPENVIKING_RECALL_LIMIT: recall result limit, default 6OPENVIKING_SCORE_THRESHOLD: recall threshold, default 0.01openviking_recallSearch OpenViking memory.
Parameters:
query: search querytarget_uri: optional search scope, default viking://user/memorieslimit: optional max resultsscore_threshold: optional minimum scoreopenviking_storeStore a memory by creating a short OpenViking session, adding the text, and committing the session. Memory creation is extraction-dependent; the tool reports when OpenViking commits the session but extracts zero memory items.
Parameters:
text: information to storerole: optional message role, default useropenviking_forgetDelete an exact memory URI. This example intentionally does not auto-delete by
query; use openviking_recall first, then pass the exact URI.
Parameters:
uri: exact viking://user/.../memories/... or viking://agent/.../memories/... URIopenviking_healthCheck server reachability.
codex mcp remove openviking-memory