The MentisDB Agent Memory Cookbook

Patterns and recipes for building AI agents that remember

4.4 Codex (OpenAI CLI)

Codex can connect to a local or remote MentisDB MCP endpoint. Use the wizard when possible; otherwise register the HTTP MCP server explicitly.

Setup

mentisdb
codex mcp add mentisdb --url http://127.0.0.1:9471

Remote setup

codex mcp add mentisdb --url https://your.mentisdb.host:9473

For remote use, configure bearer-token access and TLS on the server before connecting the CLI.

Operating model

Prime Codex once with the MentisDB instruction sentence. It should bootstrap, load the skill, inspect recent context, and use ranked search before appending new memories.