Repository navigation
Description
What feature would you like to see?
I am implementing an MCP server that dynamically enables/disables mcp tools based on changing workspace conditions during runtime and notifies the MCP clients using notifications/tools/list_changed via the TypeScript SDK, see modelcontextprotocol/typescript-sdk#1206
Unfortunately codex currently does not pick up the changes and does not update the tools list of the mcp server:
codex/codex-rs/mcp-server/src/message_processor.rs
Lines 631 to 636 in 66de985
| fn handle_tool_list_changed( | |
| &self, | |
| params: <mcp_types::ToolListChangedNotification as mcp_types::ModelContextProtocolNotification>::Params, | |
| ) { | |
| tracing::info!("notifications/tools/list_changed -> params: {:?}", params); | |
| } |
notifications/tools/list_changed is not a new addition but present at least since MCP Spec 2024-11-05: https://modelcontextprotocol.io/specification/2024-11-05/server/tools#list-changed-notification
Additional information
Other popular CLI agents already support this:
- Add support for MCP dynamic tool update by
notifications/tools/list_changedgoogle-gemini/gemini-cli#13850 - feat(mcp): handle tools/list_changed notifications anomalyco/opencode#5913
- https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md#210
Activity
DiogoVDDC commentedon Apr 8, 2026
This would be useful for me as well
coezbek commentedon Apr 9, 2026
This breaks using Google Colab MCP which requires login before it tells you which tools it supports:
googlecolab/colab-mcp#50
barryw commentedon Jul 3, 2026
I have a candidate fix for this at https://github.com/barryw/codex/tree/codex/fix-mcp-tool-list-changed.
Summary:
This also looks related to #19155. Happy to open an invited PR if this matches the intended direction.
asw101 commentedon Aug 29, 2026
Just a +1 as we are seeing the same issue as well (microsoft/wassette#791 ) and would love to see a fix land.
glmn commentedon Oct 7, 2026
Another concrete case, re-checked on
mainat 406b0c4:on_tool_list_changedincodex-rs/rmcp-client/src/logging_client_handler.rsstill only logs, so a tool added by a server aftertools/listnever reaches the session.We run Codex CLI as one of several agents in a desktop host (NeuroSquad). The host's MCP server grants tools when the user connects the agent to a new resource mid-session (a terminal, a browser, a note). Clients that re-list on
notifications/tools/list_changedsee exactly the granted tools. For Codex we have to list every capability up front and refuse ungranted ones at call time, and any third-party MCP server added mid-session only reaches Codex after a restart.Re-listing the server's tools on the notification (and replacing the server's entries in the next request's tool list) would be enough for us. The partial fix @barryw linked above looks like the right shape.
feat(skills): a repo's first session on another machine gets its skil…