Enable MCP Settings Per Profile

Open 💬 4 comments Opened Jan 15, 2026 by TylonHH

Summary

On Windows (PowerShell), profile-scoped MCP server enablement does not appear to take effect. MCP servers only load when enabled at the top level or when forced via CLI override.

Version / Environment

  • Codex CLI v0.84.0
  • Windows (PowerShell)
  • Config: C:\Users\Rene\.codex\config.toml

Config (sanitized)

[mcp_servers.home-assistant]
command = "npx"
args = ["-y", "@coolver/home-assistant-mcp@latest"]
env = { "HA_AGENT_URL" = "http://homeassistant.local:8099" }
env_vars = ["HA_AGENT_KEY"]
enabled = false

[profiles.ha.mcp_servers.github]
enabled = false
[profiles.ha.mcp_servers.n8n]
enabled = false
[profiles.ha.mcp_servers.home-assistant]
enabled = true

$env:HA_AGENT_KEY is present in the same shell before launching Codex.

Steps to Reproduce

1) Run codex --profile ha
2) Run /mcp in the Codex REPL

Actual

/mcp shows No MCP tools available.

Expected

Home Assistant MCP server should be loaded because profiles.ha.mcp_servers.home-assistant.enabled = true.

Workarounds that work

  • Enable the MCP server at the top level ([mcp_servers.home-assistant] enabled = true), or
  • Force enable via CLI override:

codex --profile ha -c 'mcp_servers.home-assistant.enabled=true'

Notes

This looks like profile-scoped MCP enablement is not being applied (or is being overridden) in v0.84.0 on Windows.

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗