MCP resource reads require server names that differ from exposed tool namespaces
What happened
In a Codex session using Unity MCP, callable MCP tools were exposed to the model under the namespace mcp__unityMCP, for example:
mcp__unityMCP.read_consolemcp__unityMCP.refresh_unitymcp__unityMCP.validate_script
The Unity MCP instructions also said to read MCP resources such as:
mcpforunity://custom-toolsmcpforunity://instances
When the agent attempted to read those resources through the generic read_mcp_resource tool using server: "mcp__unityMCP", Codex returned:
resources/read failed: unknown MCP server 'mcp__unityMCP'
The actual resource server key was unityMCP, as discovered later via list_mcp_resources.
Why this is confusing
Codex exposes the same underlying MCP integration with two different identifiers:
- Tool namespace:
mcp__unityMCP - Resource server key:
unityMCP
That distinction may be valid internally, but it is not obvious from the tool surface. The model naturally inferred that the tool namespace was also the resource server key.
Impact
This causes avoidable failed tool calls, extra discovery steps, token overhead, and user confusion. It is especially likely when an MCP server's instructions ask the agent to read resources before using tools.
Suggested fixes
Any of these would help:
- Accept
mcp__unityMCPas an alias forunityMCPin generic MCP resource tools. - Include the resource server key beside MCP tool namespaces in the tool description or session metadata.
- Improve the
read_mcp_resourceerror message to list available server keys, e.g.unknown MCP server 'mcp__unityMCP'; available servers: unityMCP, codex_apps. - Add guidance to the generic MCP resource tools: use
list_mcp_resourcesfirst and pass the returnedservervalue exactly.
Environment
- Codex CLI:
codex-cli 0.140.0 - MCP server involved: Unity MCP / MCP For Unity
- Resource reads worked after using
server: "unityMCP"