Error loading config.toml: invalid type: sequence, expected a string in `mcp_servers.perplexity.env.env_vars`
Resolved 💬 5 comments Opened Dec 10, 2025 by doggy8088 Closed Dec 10, 2025
What version of Codex is running?
codex-cli 0.66.0
What subscription do you have?
ChatGPT Plus
Which model were you using?
gpt-5.1-codex-max
What platform is your computer?
Microsoft Windows NT 10.0.19045.0 x64
What issue are you seeing?
I followed this guide to setup my Perplexity MCP: https://github.com/openai/codex/blob/main/docs/config.md#stdio
My ~/.codex/config.toml file:
[mcp_servers.perplexity]
command = "npx"
args = ["-y", "@perplexity-ai/mcp-server"]
[mcp_servers.perplexity.env]
env_vars = [ "PERPLEXITY_API_KEY" ]
When run codex, it will produce:
Error loading config.toml: invalid type: sequence, expected a string
in `mcp_servers.perplexity.env.env_vars`
I believe this is a bug from Codex CLI.
What steps can reproduce the bug?
codex mcp add perplexity -- npx -y '@perplexity-ai/mcp-server'- Configure
~/.codex/config.tomladd env_vars to it - Run
codex
What is the expected behavior?
This is either document wrong or Codex CLI implementation wrong.
Additional information
<img width="994" height="113" alt="Image" src="https://github.com/user-attachments/assets/35cd3fa8-d04b-4384-9f39-37acdc6b0b60" />
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗