Enable Instance level MCP on n8n under settings--> Instance Level MCP. (You can get the OAuth Server URL and access token over there)
In Codex settings go to MCP settings &
Edit the Config.toml file with the following configuration
command = "npx"
args = [
"-y",
"supergateway",
"--streamableHttp",
"https://<<your n8n host>>/mcp-server/http",
"--header",
"authorization:Bearer <your bearer token>"
]
In codex CLI you can verify if n8n mcp server is enabled
/mcp
🔌 MCP Tools
• n8n
• Status: enabled
• Auth: Unsupported
• Command: npx -y supergateway --streamableHttp https://
YOUR BEARER TOKEN
• Tools: execute_workflow, get_workflow_details, search_workflows
• Resources: (none)
• Resource templates: (none)