Codex
Membase in the Codex CLI, the ChatGPT desktop app and the IDE extension over MCP, with consent or a developer key, and the skill beside AGENTS.md.
Codex reads Membase over MCP, from the CLI, the ChatGPT desktop app or the IDE extension, and can take the skill as well.
Before you start
Section titled “Before you start”- Codex CLI with
codex mcp, the ChatGPT desktop app or the IDE extension. They share one MCP configuration on the same Codex host. - For a key in the configuration or the skill, a developer key from Connect › Developer keys › Create key.
Set up
Section titled “Set up”On Connect’s AI apps tab, the Codex card opens these steps (the card is there until Codex is connected) with the address filled in.
codex mcp add membase --url https://api.app.membase.com/mcp-httpcodex mcp login membasecodex mcp listcodex mcp login opens the browser on Membase’s consent screen: choose the access level,
the Memories Codex may use and whether it may read Your profile, then press
Approve access. If Codex asked only to read, Read is the only level offered.
codex mcp list shows the server and whether it is authorized. Then ask Codex
“List my available Membase Memories.”
In the ChatGPT desktop app: Settings → MCP servers → Add server. Name it Membase, choose Streamable HTTP and enter the MCP address. Save, select Restart, then Authenticate to complete the browser sign-in.
In the IDE extension: the gear menu → MCP servers → Add server. Choose Streamable HTTP, enter the MCP address, save and select Restart extension. Select Authenticate when requested. A server added on one side appears on the others.
With a developer key
Section titled “With a developer key”Have Codex send the key from an environment variable instead of logging in. In
~/.codex/config.toml:
[mcp_servers.membase]url = "https://api.app.membase.com/mcp-http"bearer_token_env_var = "MEMBASE_API_KEY"Codex reads the variable from the environment it starts in, so export MEMBASE_API_KEY=mbk_…
in your shell profile. The key’s level applies, up to Full. http_headers (static
values) and env_http_headers (values taken from environment variables) under the same table
set other headers. The snippet Membase serves
at https://app.membase.com/plugin/clients/codex.toml is the server alone, without the key line.
Or the skill:
Install Membase from https://app.membase.com/skill using key mbk_…
Codex installs the folder beside AGENTS.md and points to it from there. The key has to reach
the commands Codex runs in later sessions: keep MEMBASE_API_KEY in the environment Codex
starts from, or under set in [shell_environment_policy] in config.toml (its config.toml
has no top-level env table). With the MCP tools already present it uses those and keeps the
skill for its rules.
What it can do
Section titled “What it can do”What its access level allows, the same with consent or a key: Read, Read & write or Full. The tools per level are on Any MCP client.
Which Memories it uses
Section titled “Which Memories it uses”An empty list of memories means no Memory is switched on for this connection. Switch one on under Memories it can use on Codex’s page in Connect (with a key: on the key’s page), or under Use in on the Memory.
Codex and the ChatGPT connector register with Membase under the same client name. Membase tells them apart and lists them as two apps on Connect; each has its own page, its own switches and its own Revoke….
Remove it
Section titled “Remove it”codex mcp remove membase, then Revoke… Codex’s connection, or the key, on its page in
Connect.
If something looks wrong
Section titled “If something looks wrong”| It says | What it means | Do |
|---|---|---|
codex mcp list shows the server without authorization |
consent not completed | codex mcp login membase |
| it can use no memories | connected, no Memory switched on | Memories it can use on Codex’s page in Connect |
| a write is refused | the connection or key is at Read | raise it to Read & write under Access on its page |
Membase fails to connect with bearer_token_env_var |
MEMBASE_API_KEY is not set where Codex starts, or the key is unknown, expired or revoked: the server answers 401 invalid_token to every request |
export the variable; or create a new key and update it |
| the extension does not see the server | it was added before the extension restarted | Restart extension, then Authenticate |