codex - 💡(How to fix) Fix node_repl: tools/list returns js but runtime routes mcp__node_repl__js as unsupported call

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

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.


Error Message

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

Root Cause

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.

Code Example

[features]
      js_repl = true

---

$ codex mcp get node_repl
      enabled: true

---

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

---

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

---

codex mcp get node_repl => enabled: true

---

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

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

FieldValue
Codex Version@openai/codex v0.133.0
PlatformmacOS (Apple Silicon / arm64)
Providerollama
Modelqwen3.6:35b-nfp4
MCP Feature Flagjs_repl = true
MCP Configcodex mcp get node_repl => enabled: true

Steps to Reproduce

  1. Enable the node_repl MCP server in Codex configuration:

    [features]
     js_repl = true
  2. Verify the MCP server is enabled:

    $ codex mcp get node_repl
     enabled: true
  3. The tools/list call from the node_repl MCP server returns:

    • js
    • js_add_node_module_dir
    • js_reset
  4. Execute a tools/call for js manually (directly through the MCP protocol) — this works correctly:

    {"method": "tools/call", "params": {"name": "js", "arguments": {"code": "42 + 58"}}}
    // Response: 100
  5. 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.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

codex - 💡(How to fix) Fix node_repl: tools/list returns js but runtime routes mcp__node_repl__js as unsupported call