node_repl: tools/list returns js but runtime routes mcp__node_repl__js as unsupported call

Open 💬 3 comments Opened May 24, 2026 by choreoatlas

Summary

When js_repl = true is set in the Codex features config, the node_repl MCP server correctly:

  1. Reports itself as enabled via codex mcp get node_repl
  2. Returns js, js_add_node_module_dir, and js_reset tools via tools/list
  3. Successfully executes tool calls when made manually through the MCP protocol

However, the Codex agent runtime fails to resolve these tools: requests for mcp__node_repl__js (and variants like mcp__node_repl__.js) return "unsupported call" errors. This means agents cannot use the JavaScript REPL at runtime despite it being properly registered and functional through the manual MCP lifecycle.

---

Environment

| Field | Value |
|-------|-------|
| Codex Version | @openai/codex v0.133.0 |
| Platform | macOS (Apple Silicon / arm64) |
| Provider | ollama |
| Model | qwen3.6:35b-nfp4 |
| MCP Feature Flag | js_repl = true |
| MCP Config | codex mcp get node_repl => enabled: true |

---

Steps to Reproduce

  1. Enable the node_repl MCP server in Codex configuration:

``
[features]
js_repl = true
``

  1. Verify the MCP server is enabled:

``
$ codex mcp get node_repl
enabled: true
``

  1. The tools/list call from the node_repl MCP server returns:
  • js
  • js_add_node_module_dir
  • js_reset
  1. Execute a tools/call for js manually (directly through the MCP protocol) — this works correctly:

``json
{"method": "tools/call", "params": {"name": "js", "arguments": {"code": "42 + 58"}}}
// Response: 100
``

  1. Now attempt to use mcp__node_repl__js through the Codex agent runtime. This fails with an "unsupported call" error.

---

Expected Behavior

The node_repl MCP tools should be properly injected and callable by the Codex agent runtime using the expected tool name format:

  • mcp__node_repl__js should resolve to the js tool from node_repl
  • The agent should be able to invoke JavaScript REPL commands at runtime

Actual Behavior

The Codex runtime fails to route requests to these tools:

mcp__node_repl__js          => unsupported call
mcp__node_repl__.js         => unsupported call
mcp__node_repl___js         => unsupported call (any variant)

The node_repl namespace/description is visible but the tools within it are not exposed as callable to the agent runtime. The MCP server works end-to-end when invoked manually, confirming the server itself is not at fault.

---

Root Cause Analysis

This appears to be a tool name routing mismatch in the Codex agent's MCP tool router:

  1. The node_repl server advertises tools named js, js_add_node_module_dir, js_reset.
  2. When tools/list is called, these tools are correctly returned.
  3. However, the runtime's tool lookup mechanism does not properly map the tools/list results to a callable namespace in the format mcp__{server_name}__{tool_name}.

Possible root causes:

  • The node_repl server name may contain special characters or use a different internal identifier that doesn't match the routing key.
  • The tool injection logic may skip tools when certain conditions are met (e.g., feature flags, server metadata).
  • There could be a bug in how the mcp__ namespace prefix is generated for node_repl specifically.

---

Evidence

1. MCP Server Status

codex mcp get node_repl => enabled: true

2. Manual tools/list Works

The node_repl MCP server returns tools successfully via the standard MCP protocol.

3. Manual tools/call Works

{"method": "tools/call", "params": {"name": "js", "arguments": {"code": "42 + 58"}}}
// Response: 100

4. Runtime Tool Resolution Fails

When the agent runtime attempts to call mcp__node_repl__js, it returns "unsupported call" — indicating the tool name was not registered or resolved in the runtime's tool registry, despite being listed by tools/list.

---

Additional Notes

  • This is specific to the node_repl MCP server; other MCP servers may be unaffected.
  • The bug is in the runtime routing layer, not the MCP server itself (which works correctly when invoked directly).
  • This prevents agents from executing JavaScript at runtime, which could be critical for coding tasks requiring JS execution.

---

Suggested Fix

Investigate the MCP tool injection/routing code that maps tools/list results to the mcp__{namespace}__{tool_name} format. Specifically:

  1. Check how node_repl server name is normalized/transformed for routing.
  2. Verify that tools from enabled MCP servers are added to the runtime tool registry.
  3. Ensure no conditionals or feature flag checks accidentally filter out node_repl tools during injection.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗