MCP Tools whitelist

Resolved 💬 1 comment Opened Oct 6, 2025 by John0x Closed Oct 20, 2025

What feature would you like to see?

As a user of Codex I want to be able to specify which exact functions of an MCP are being added to the context of the Agent, to avoid context bloat.
There are a lot of MCPs, that provide an extensive set of functions from which one usually only needs a few.
Right now, there is no way to only include specific functions, which can easily lead to context bloat, which should always be avoided.

Proposal

Add an include_only field to McpServerConfig, analog to the shell_environment_policy to stay consistent with naming.
Which will then be used to filter the tools in McpConnectionManager.list_all_tools.

Contribution

I'm happy to contribute this :)
Just need approval first:

If you want to add a new feature or change the behavior of an existing one, please open an issue proposing the feature and get approval from an OpenAI team member before spending time building it.

Additional information

_No response_

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗