Skip to content
LyraShield AIOpen beta

Updated

OpenAI Codex

OpenAI Codex CLI reads MCP server configuration from ~/.codex/config.toml. The file uses TOML format with a [mcp_servers.<name>] table for each server.

Configuration

Open or create ~/.codex/config.toml and add the following block. The env_vars key (not env) is the correct field name for environment variables in Codex TOML config.

[mcp_servers.lyrashield]
command = "npx"
args = ["-y", "@lyrashield/mcp"]

[mcp_servers.lyrashield.env_vars]
LYRASHIELD_API_KEY = "lsk_your_key_here"
LYRASHIELD_API_URL = "https://app.lyrashieldai.com"
env_vars vs. env: OpenAI Codex uses env_vars in its TOML config, not env. Using env will be silently ignored.

Verify the connection

Start the Codex CLI and list available tools. You should see the LyraShield server listed. Run a quick query: "What tools does LyraShield provide?" to confirm the server is active.

Requirements: Node.js 20+ and a LyraShield workspace API key. The@lyrashield/mcp package is published on npm, sonpx -y @lyrashield/mcp resolves directly.