The OpenAI Codex CLI supports remote MCP servers via ~/.codex/config.toml (global) or .codex/config.toml (per-project, for trusted projects). Add a new [mcp_servers.<name>] block pointing at Webenta:
[mcp_servers.index]
url = "https://mcp.index.webenta.sk/mcp"
bearer_token_env_var = "WEBENTA_INDEX_API_KEY"Then export the environment variable in your shell profile (e.g. ~/.bashrc or ~/.zshrc):
export WEBENTA_INDEX_API_KEY="your-api-key"Replace your-api-key with a key from Account → API Keys. The bearer_token_env_var field tells Codex which env variable holds the token — the key itself is never written to the config file.
#Verify
Restart Codex (or open a new terminal session so the env variable is picked up), then start a conversation. Ask Codex to list your tables:
What tables do I have in Webenta Index?Codex will call list_tables through the index MCP server and respond with your schema.
#Tell Codex when to use it
Add a standing instruction to your Codex session or AGENTS.md file (Codex reads this automatically, similar to CLAUDE.md):
## Data
User data lives in the Webenta Index MCP server (registered as "index").
Before answering questions about tracked data, query the relevant table first.
After the user logs something new, insert a row..codex/config.toml inside a repo to limit the MCP server to that project. Use a per-project API key so the agent can only access the relevant Webenta project.