-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Description
What variant of Codex are you using?
Codex CLI (with project-level .codex/config.toml)
What feature would you like to see?
I’d like first-class support for configuring MCP servers per project/directory, either in .codex/config.toml and/or via mcp.json.
Today, the current config level is not enough for workflows where MCP servers need to be started with directory-specific context. Tools like ai-mate use a per-directory MCP server model, but in Codex this is hard to express cleanly.
Current workaround: wrapper scripts that inject the project path or dynamic context before launching the MCP server. This works, but it adds setup complexity and is not a great UX.
A concrete example is this Symfony AI integration PR, which needed a wrapper-based approach:
symfony/ai#1682
Requested outcome:
- Allow native per-project/directory MCP server configuration.
- Support this cleanly through
.codex/config.tomland/ormcp.json. - Remove the need for wrapper scripts in common integrations.
- Make MCP behavior more predictable and ergonomic across projects.
This came up in the PR discussion here (which was closed):
#12718
I understand why that PR was closed, but I think this use case still needs a proper configuration-level solution.
Additional information
If helpful, I can propose concrete config shape options (for example, project-scoped server entries, per-workspace overrides, or variable interpolation for the current directory) and help test them against real integrations.