Add explicit MCP server mentions in prompts (for example, #server-name)
Component: Codex IDE extension for VS Code
Summary
Please add a structured way to explicitly reference an enabled MCP server from the Codex prompt composer, similar to GitHub Copilot's # mentions.
For example:
Use #example-docs to look up the RIDS/ISK documentation and explain how to implement this feature.
Problem
Codex currently discovers the tools exposed by configured MCP servers and may select them automatically. Users can also write prose such as “use the example-docs MCP server,” but that is only natural-language guidance. It is less discoverable and does not provide a clear, structured guarantee that the intended server is selected.
This is especially noticeable when:
- several MCP servers expose documentation/search tools;
- a user wants one server to be the authoritative source for a task;
- server names or tool names are not easy to remember;
- users want visible confirmation that the prompt is scoped to a particular MCP server.
Proposed experience
In the prompt composer, typing # could show enabled MCP servers with autocomplete. Selecting one would insert a structured mention such as:
#example-docs
The mention should:
- resolve to the selected MCP server independently of plain prompt text;
- make that server's tools eligible/preferred for the turn;
- remain visible in the composer and conversation;
- show a clear unavailable/disabled state if the server cannot be reached;
- work consistently in the IDE extension, desktop app, and CLI where practical.
The exact prefix does not have to be #; consistency with existing Codex mention syntax is more important. The key request is a discoverable, structured MCP-server reference rather than relying only on natural-language routing.
Expected benefit
This would make MCP usage easier to learn, reduce ambiguous tool routing, and give users a concise way to state which private documentation or service should be used for a task.