Full Pro free for 7 days, no credit card. See pricing →
← All posts
May 28, 2026 · 4 min read

How to use Vilix AI with OpenAI Codex

Add Vilix AI to Codex, complete OAuth, and verify its memory tools. Learn how CLI and IDE configuration work and how to share saved context.

OpenAI Codex is a coding agent, not a chat app, so the value of memory here is very specific: when Codex writes code, it should know your stack, your conventions, and relevant decisions you've saved from your other connected AI tools. Vilix AI is the layer that carries this context in. You connect it once, and both the Codex CLI and the Codex IDE extension can retrieve relevant saved project context.

Vilix AI + Codex: Code with Context. Your stack and decisions, ready for Codex. Vilix AI.

Setup includes registering the server, authenticating, and adding the Vilix AI instructions. Here is the complete flow.

Add Vilix AI to Codex with one command

Codex stores MCP servers in its own config. Register Vilix AI from the terminal:

codex mcp add vilix --url https://api.vilix.ai/mcp

This directs Codex to the Vilix AI MCP endpoint over Streamable HTTP. To complete OAuth from the CLI, run codex mcp login vilix. You can alternatively select Authenticate for the server in the IDE extension's MCP settings. Complete the browser sign-in, then add Vilix AI's custom instructions and verify the tools.

The command configures a server that both the CLI and IDE extension can use.

Set it up once, CLI and IDE share the config

The ChatGPT desktop app, Codex CLI, and IDE extension share user-level MCP configuration in ~/.codex/config.toml. A server configured there is available to both. Project-scoped settings in .codex/config.toml apply to that project and can depend on trust settings.

Check existing local MCP configuration

If you previously configured a local MCP server in the ChatGPT desktop app, it may already be available to the Codex CLI and IDE extension. Check the local settings before using codex mcp add to register it again.

For other ChatGPT connection methods, verify that Vilix AI is listed in the local MCP settings instead of assuming the setup carried over. Confirm authentication and test the memory tools in the client you plan to use.

What you actually get once it is connected

After connecting, Vilix AI's tools show up to Codex like any other MCP server. Add instructions to call get_context, compose the reply, save the exact exchange with save_turn, and then return the saved reply. Reuse chat_id and verify both calls. In practice that means:

  • A configured Codex client can retrieve relevant past context before composing its reply, including saved architecture decisions, constraints, and rules.

  • Your projects and tasks are visible to the agent, so "pick up the billing task" means something concrete instead of a cold start.

  • Your user_rules, short personal directives such as "always show the test first", are available through context requests. Codex still needs to retrieve and follow them.

Plan a feature in ChatGPT and discuss the architecture in Claude. Once those exchanges are saved to Vilix AI, your configured Codex client can retrieve relevant decisions for implementation. This is the whole point of cross-tool memory: context that moves with you between tools through a shared account store.

Frequently asked questions

How do I connect Vilix AI to Codex?

Run codex mcp add vilix --url https://api.vilix.ai/mcp, then codex mcp login vilix to sign in. Alternatively, authenticate from the IDE extension's MCP settings. Add the Vilix AI instructions and test retrieval and saving.

Do I have to set it up twice for the CLI and the IDE extension?

A user-level server in ~/.codex/config.toml is shared by the CLI and IDE extension. Project-scoped settings apply only to that project and may depend on trust settings.

I already added Vilix AI in the ChatGPT app. Does Codex inherit it?

A local MCP server configured in the ChatGPT desktop app can share user-level configuration with the Codex CLI and IDE extension. Check whether Vilix AI is already present before running codex mcp add. If you used another connection method, verify the local setup and authentication, then test the tools in Codex.

Does Codex need an API key for Vilix AI?

No API key is required for the OAuth setup above. You sign in through the browser and use the Streamable HTTP connection. You can revoke access at any time, and you can try Vilix AI free to set it up end to end. The Free plan has no time limit, and Pro includes a 7-day trial.

Try Vilix Pro free for 7 days

Persistent memory across ChatGPT, Claude, and the AI tools you already use in Vilix AI.

Start 7-day free trial