Allow MCP per each project?

Resolved 💬 12 comments Opened Sep 7, 2025 by alvinycheung Closed Nov 11, 2025
💡 Likely answer: A maintainer (etraut-openai, contributor) responded on this thread — see the highlighted reply below.

What feature would you like to see?

Do we have to set the ~/.codex/config.toml at the user level?

It'd be more useful if we can define MCP per each project instead.

Suggestion:
Allow creating .codex/config.toml per project

Are you interested in implementing this feature?

_No response_

Additional information

_No response_

View original on GitHub ↗

12 Comments

madtank · 10 months ago

Would love to see this. I've created an agent network, and I like to give them usernames. I also don't always want the same MCP server for every project. However having a global setting is great for common MCP servers, so don't remove that feature.

alanwilhelm · 10 months ago

NEED

madtank · 10 months ago
NEED

This worked for me as a workaround:

export CODEX_HOME="$PWD/.codex"
ln -sfn ~/.codex/auth.json .codex/auth.json
alanwilhelm · 10 months ago
> NEED This worked for me as a workaround: export CODEX_HOME="$PWD/.codex" ln -sfn ~/.codex/auth.json .codex/auth.json

Thanks! I was looking one last time before doing something like that.

I really hope the config story improves here soon.

gad45 · 10 months ago

upvoting this, why is this not a default feature?

dehidehidehi · 9 months ago

Yes!

etraut-openai contributor · 8 months ago

Thanks for the suggestion. We're using https://github.com/openai/codex/issues/3266 to track this issue. I'm going to close this one to reduce duplication.

stayhero · 8 months ago

@etraut-openai You closed or linked to the wrong issue I guess?

etraut-openai contributor · 8 months ago

Good catch. Sorry about that!

LaelLuo contributor · 8 months ago

I submitted PR #3864 implementing this exact feature\! It's unfortunate it got closed since the team isn't accepting new features at the moment. Having in each project root would make configuration so much cleaner and more maintainable. Really hope this gets implemented in the future\! 🙏

etraut-openai contributor · 8 months ago

Related to #3023.

etraut-openai contributor · 8 months ago

Closing this in favor of #2628, which has more upvotes.