Direct MCP tool invocation
Resolved 💬 4 comments Opened Dec 12, 2025 by yitoli-c Closed Jan 31, 2026
💡 Likely answer: A maintainer (github-actions[bot], contributor)
responded on this thread — see the highlighted reply below.
What feature would you like to see?
A syntax to directly invoking a mcp tool would be nice, similar to in copilot, #mcp-tool-name could be useful at times.
Currently missing from both codex CLI/vscode extension.
Additional information
_No response_
4 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Negative. The issue proposed as a dup doesn't seem to have proper solution to the problem described. The issue duplication shouldn't happen unless there is clear documentation or code reference to the solution.
-----
I’ve found a solution, but the process is quite tedious.
I’ll provide a simple use case that allows Codex to invoke MCP autonomously or via a manually triggered slash command. You need to enable the
skillfeature in Codex and write your own slash commands. My example uses the Chrome DevTools MCP.Below, I’ve attached the content I wrote for
config.toml,~/.codex/prompts, and~/.codex/skills. My system is Ubuntu 25.10 with Bash shell. I’m using the latestcodex-cliversion 0.72.0 andgpt-5.2-medium.(We must ensure the workhorse model can use this to guarantee it has the capability and intent to call MCP even in extremely difficult tasks. We can't just say high and xhigh models can call it because they are smart enough—do I not deserve to call MCP just because I'm doing a simple task?)
-----
config.tomlExample:-----
Custom Prompt Example (
~/.codex/prompts/chrome-devtools-mcp.md):-----
Custom Skills Example (
~/.codex/skills/chrome-browser-automation.md):````markdown
---
name: chrome-browser-automation
description: Use Chrome DevTools MCP to automatically control a real local Chrome browser for page access, clicking, form filling, and frontend debugging; this skill should be actively considered when the user requests to "actually open/operate a page with a browser" rather than simply sending HTTP requests or looking at source code.
---
This skill encapsulates the prompts you've already configured in
/home/proview/.codex/prompts/chrome-devtools-mcp.md, serving as a bridge between Codex and the local automated Chrome browser via Chrome DevTools MCP.This skill should be actively used when the following needs arise:
When using this skill, please strictly follow the logic and order of the original prompt below (copied from the prompts file):
Behavioral Guidelines:
http://127.0.0.1:9222/json/versionas per the prompt above, executingcodexggif necessary until the browser is ready;<!-- end list -->
````
-----
Usage Instructions
Regarding usage: If you want Codex to use Chrome DevTools automatically, you can indicate in your prompt that browser work is required, so Codex actually uses the
skillsto complete the task.If your task is strongly related to the browser—for example, if you need to use Chrome DevTools to inspect your frontend rendering or if you momentarily don't want to use Postman MCP for network configuration and need DevTools instead—you can directly use the slash command:
/prompts:chrome-devtools-mcp [add your task here]...to complete the browser automation task.
Of course, given the differences between devices, Chrome DevTools MCP configurations vary wildly, so I won't go into further detail here.
This feature request has not received enough upvotes in the past two months, so I'm going to close it.