Skip to content

Custom stdio MCP server discovered by /mcp but tools not exposed to Desktop threads #19425

Open

Description

@arbenl

Summary

Codex Desktop sees a custom stdio MCP server and successfully discovers its tools via tools/list, but the tools are not exposed to Desktop threads or tool_search.

This appears to be a regression or exposure-layer bug in Desktop/App Server 0.124.0-alpha.2.

Environment

  • Codex Desktop client: 26.422.21637
  • Codex/App Server: 0.124.0-alpha.2
  • Platform: macOS
  • Server type: custom stdio MCP server
  • Config location: project-scoped .codex/config.toml

MCP config

[mcp_servers.interdomestik_qa]
command = "/bin/bash"
args = ["scripts/start-repo-qa.sh"]
cwd = "."

The wrapper script resolves the repo root, changes into it, and starts a TypeScript MCP server over stdio.

Expected behavior

The following custom MCP tools should be exposed to Desktop threads and callable via names like mcp__interdomestik_qa__project_map:

  • project_map
  • read_files
  • code_search
  • check_health
  • pr_verify
  • security_guard
  • e2e_gate

Actual behavior

  • Desktop /mcp shows the server enabled.
  • codex mcp list --json shows the server enabled.
  • Repo preflight passes, including live MCP tools/list discovery.
  • Desktop logs show the server starts and returns a ListToolsResult containing the expected custom QA tools.
  • tool_search returns 0 callable interdomestik_qa tools.
  • Thread request payloads do not include any mcp__interdomestik_qa__* tools.
  • The current thread's thread_dynamic_tools only contains generic Desktop tools such as automation_update, read_thread_terminal, load_workspace_dependencies, and install_workspace_dependencies.

Evidence collected locally

Manual/repo preflight confirms live MCP discovery works:

pnpm mcp:preflight

Desktop logs show the custom server is started and queried successfully:

  • custom QA server starts on stdio
  • client initializes against the server
  • ListToolsRequest is sent
  • ListToolsResult is received with the expected custom tools

But those discovered tools are not present in the thread/deferred tool surface.

Historical comparison from local Codex state/logs:

  • An Apr 20 thread on Codex 0.91.0 successfully called tools such as:
    • mcp__interdomestik_qa__read_files
    • mcp__interdomestik_qa__code_search
    • mcp__interdomestik_qa__project_map
  • Apr 24 threads on Codex 0.124.0-alpha.2 do not expose those tools, despite successful /mcp discovery.

I also checked whether stale Desktop workspace state was the cause. The active workspace root and thread cwd both point to the correct repo, but the custom MCP tools are still not exposed.

Suspected failure point

The failure appears to be after successful MCP tools/list discovery and before Desktop registers/indexes those tools into the per-thread/deferred tool surface.

It does not appear to be caused by the MCP server implementation, stdio transport, project config, or CLI discovery, because live tools/list discovery succeeds outside the Desktop thread tool surface.

Activity

  1. added
    bug
    app
    mcp
    app-server
    on Apr 24, 2026
  2. arbenl commented on Apr 24, 2026

    @arbenl
    Author

    Update after full Codex Desktop restart:

    Outcome is still: Discovery works, exposure still fails.

    Fresh thread details:

    • cwd: /Users/arbenlila/development/interdomestik-crystal-home
    • current thread id: 019dc0ed-8043-78b1-badb-e1a5aa5e6f02
    • tool_search for expected QA tools returned 0 tools, both initially and after rechecking.
    • codex mcp list --json shows interdomestik_qa enabled.
    • pnpm mcp:preflight passed, including live tools/list discovery.
    • thread_dynamic_tools for the current thread contains only:
      • automation_update
      • read_thread_terminal
      • load_workspace_dependencies
      • install_workspace_dependencies
    • thread_dynamic_tools contains 0 interdomestik_qa, project_map, read_files, or code_search entries.
    • Recent Desktop logs show the stdio server started and initialized as interdomestik-qa version 1.0.0.
    • Recent logs show ListToolsResult for this same thread containing the expected QA tool names.
    • Only MCP warnings found were unsupported resources/resource templates methods, not tools/list failure.

    Versions after restart:

    • codex --version: codex-cli 0.124.0
    • current thread cli_version: 0.125.0-alpha.3
    • Desktop client: Codex.app 26.422.30944, build 2080

    Most precise failure boundary:

    Desktop/RMCP can start interdomestik_qa and receive ListToolsResult, but those tools are not persisted/indexed into the current thread's callable dynamic tools, so tool_search exposes none of them.

  3. arbenl commented on Apr 24, 2026

    @arbenl
    Author

    Reviewed the potential duplicates suggested by the bot. I do not think this is an exact duplicate, though it is likely related to the same MCP exposure/indexing area.

    Comparison:

    So the narrower failure here remains: Desktop/RMCP successfully starts the stdio server and receives ListToolsResult, but the discovered tools are not persisted/indexed into the thread's callable dynamic tools.

  4. arbenl commented on Apr 24, 2026

    @arbenl
    Author

    Additional cross-client comparison from the same local repo/machine:

    Gemini/Antigravity is able to mount and use MCP tools successfully in this repo context. Verified working there:

    • mcp-context-server/project_map
    • mcp-context-server/read_files
    • context7/resolve-library-id
    • playwright/browser_tabs
    • e2e-test-generator/generate_basic_test

    This further suggests the MCP server/environment is not the root problem. Other MCP clients can index and call repo/context/playwright-style MCP tools on the same machine, while Codex Desktop still discovers interdomestik_qa via tools/list but does not expose the tools to the thread/tool_search surface.

    One separate note: Gemini's repo-qa wrapper hit a JSON parsing/encoding issue (invalid character 'â') for some QA commands, which looks like command-output formatting inside that wrapper. That is distinct from this Codex issue, where the tools are not mounted at all despite successful ListToolsResult discovery.

  5. arbenl commented on Apr 26, 2026

    @arbenl
    Author

    Additional related issue with a useful version boundary: #19649

    That report describes the same core failure class: MCP servers are registered and visible via codex mcp list / codex mcp get, but their tools are not injected into Codex threads.

    Important detail from #19649:

    • known working: codex-cli 0.120.0
    • broken: codex-cli 0.122.0-alpha.13 and later
    • same config works again after downgrading to 0.120.0

    That lines up with this Desktop report:

    • older Interdomestik thread on 0.91.0 had usable mcp__interdomestik_qa__... calls
    • current Desktop/App runtimes around 0.124.x / 0.125.x discover tools/list but do not expose the tools to tool_search / thread_dynamic_tools

    So this issue may be the Desktop/app-server manifestation of the same regression family as #19649. This issue still adds Desktop-specific evidence: the logs show ListToolsResult for the same current thread, while thread_dynamic_tools remains missing the discovered MCP tools.

  6. rnett commented on May 1, 2026

    @rnett

    This may be #20574, are you using a custom or older model?

  7. arbenl commented on May 3, 2026

    @arbenl
    Author

    Thanks. I do not think this is #20574.

    In this repro I am not using a custom provider like Ollama/LiteLLM/Bifrost. The failing Desktop thread is using the normal Codex Desktop / ChatGPT path with gpt-5.5.

    The failure signature is also different:

    • tool_search aborts with 'unsupported payload' when using non-native API endpoints (Ollama/Bifrost) #20574: tool_search is present but aborts with unsupported payload when called through a non-native provider.
    • This issue: tool_search executes successfully, but returns an empty result for interdomestik_qa.
    • The same session can discover other MCP/tool sources such as Context7, Playwright, and OpenAI docs.
    • codex mcp list --json shows interdomestik_qa enabled.
    • pnpm mcp:preflight passes, including live tools/list discovery from the stdio server.
    • Desktop logs have shown ListToolsResult containing the expected interdomestik_qa tool names.
    • The missing step is still that those discovered tools are not inserted into the thread/deferred tool index, so no mcp__interdomestik_qa__... namespace becomes callable.

    So this still looks like a Desktop/app-server MCP exposure/indexing issue, not the custom-provider tool_search payload bug from #20574.

  8. arbenl commented on May 3, 2026

    @arbenl
    Author

    Additional update: I also tested a repo-side hardening for a possible stale-workspace-root factor.

    Originally the project-scoped MCP entry used a relative cwd:

    [mcp_servers.interdomestik_qa]
    command = "/bin/bash"
    args = ["scripts/start-repo-qa.sh"]
    cwd = "."

    I changed it to pin the server cwd to the absolute repository root while keeping the launcher argument unchanged:

    [mcp_servers.interdomestik_qa]
    command = "/bin/bash"
    args = ["scripts/start-repo-qa.sh"]
    cwd = "/Users/arbenlila/development/interdomestik-crystal-home"

    I also added a local preflight guard so pnpm mcp:preflight fails if interdomestik_qa resolves with a relative cwd or a cwd outside this repo.

    Verification after that hardening:

    • codex mcp list --json resolves interdomestik_qa with the absolute repo cwd.
    • pnpm mcp:preflight passes.
    • live stdio tools/list discovery still passes and returns the expected QA tools.
    • launching the same MCP command from a different parent directory works when the child cwd is pinned to the repo.

    However, this did not fix Desktop thread exposure. In the running Desktop session, tool_search still returns 0 results for interdomestik_qa / project_map / read_files / code_search.

    So the absolute-cwd change is a useful repo-side mitigation that removes stale root ambiguity, but it is not a complete fix for this issue. The remaining failure is still in the Desktop/app-server exposure/indexing step after successful MCP discovery.

  9. arbenl commented on May 3, 2026

    @arbenl
    Author

    Additional update from the repo side: I hardened the interdomestik_qa MCP configuration to remove possible local blockers, but the Desktop exposure failure remains in the current thread.

    Repo-side changes made and verified:

    • interdomestik_qa is pinned to the absolute repository cwd instead of cwd = ".".
    • The project-scoped Codex config now declares a focused enabled_tools allowlist for the core agent tools:
      • project_map
      • read_files
      • read_file_range
      • code_search
      • git_status_compact
      • git_branch_info
      • changed_files
      • scope_audit
      • check_health
      • pr_verify
      • security_guard
      • e2e_gate
    • All QA MCP tool input schemas are now strict object schemas with additionalProperties: false.
    • pnpm mcp:preflight now verifies codex mcp get interdomestik_qa --json, including the parsed enabled_tools allowlist.

    Verification results:

    • codex mcp get interdomestik_qa --json shows the server enabled with the absolute cwd and the parsed enabled_tools allowlist.
    • pnpm mcp:preflight passes.
    • Live stdio tools/list discovery passes.
    • Live tools/list returns 35 tools, all with strict object schemas, and the core allowlisted tools are present.

    However, this existing Codex Desktop thread still returns 0 results from tool_search for interdomestik_qa project_map read_files code_search ....

    So the repo/server side is now exposure-ready: no relative cwd, no unbounded Codex tool surface, and no permissive input schemas. If a fresh Desktop thread still does not surface mcp__interdomestik_qa__..., the remaining failure is still in Desktop/app-server MCP indexing/injection after successful discovery.

  10. arbenl commented on May 4, 2026

    @arbenl
    Author

    Additional update from the current Desktop session after restart and after testing the local-plugin/CLI distinction.

    Current state:

    • Codex Desktop now shows the Interdomestik QA plugin as available/enabled in the session metadata.
    • tool_search still returns 0 results for interdomestik_qa, project_map, read_files, and code_search.
    • There is still no callable mcp__interdomestik_qa__... namespace in the Desktop session.
    • The hyphen/underscore distinction does not appear to be the root cause: the local plugin name can be interdomestik-qa, while the MCP server id remains interdomestik_qa; Desktop can know about the plugin/server, but the tools still are not admitted into the callable tool index.

    CLI / local stdio contrast from the same repo and machine:

    • The same MCP server config is startable from the CLI path.
    • The repo-local stdio server can be initialized, can return tools/list, and can execute tool calls.
    • Verified via a thin local bridge using the same launcher:
      • pnpm mcp:tool list returns the expected QA tools.
      • pnpm mcp:tool call read_file_range '{"file":"package.json","startLine":1,"endLine":8}' succeeds.
    • The app-bundled Codex CLI also sees interdomestik_qa as enabled with the expected command/cwd/env configuration.

    So the current narrowed boundary is:

    1. MCP server startup works.
    2. MCP initialize works.
    3. MCP tools/list works.
    4. Direct stdio tool calls work.
    5. Desktop can have the local plugin/server present in session metadata.
    6. Desktop still does not insert those discovered tools into tool_search / the callable mcp__... namespace.

    I also checked public issues/docs for evidence that Codex Desktop has started admitting local custom MCPs into tool_search; I did not find a confirmed fix or documented supported path for that yet. This still looks like a Desktop/app-server MCP admission/indexing bug, not a repo MCP implementation problem.

  11. 23 remaining items

  12. TeaShaman-cyber commented on Aug 8, 2026

    @TeaShaman-cyber

    Control comparison after restart: Gramps exposed, GitHub unavailable

    After a full restart of the current Codex Desktop build (26.803.5235.0), the live Gramps MCP control became available in the same Desktop context:

    • 57 mcp__family_gramps__* tools appeared in the native manifest;
    • a read-only mcp__family_gramps__get_metadata call succeeded;
    • the GitHub server remained absent from the native manifest;
    • the runtime audit now reports github in unavailable_servers.

    This control comparison rules out a generic inability to refresh the Desktop manifest after restart. The refreshed Desktop can expose and call one external MCP server, while the configured GitHub MCP server remains unavailable. The remaining boundary is therefore GitHub-specific admission, authentication, transport handling, or exposure rather than a universal stale-manifest problem.

    No credentials or private payloads are included here.

  13. bbingz commented on Aug 8, 2026

    @bbingz

    @TeaShaman-cyber the Gramps vs GitHub control after the same restart is the decisive pin:

    • Gramps: 57 mcp__family_gramps__* tools in the native manifest + live call OK
    • GitHub: still absent from the manifest; now also listed under unavailable_servers

    That rules out a universal stale-manifest / “Desktop never re-binds external MCPs” story. Remaining failure is GitHub-specific admission (auth/env inheritance for bearer_token_env_var, transport handling, or exposure), not Desktop MCP plumbing in general. CLI path with explicit GH_TOKEN remains the working fallback.

  14. m13v commented on Sep 2, 2026

    @m13v

    the always_defer_mcp_tools path is the swallow here: it routes all 3 tools into tool_search, and when tool_search isn't mounted in the thread they land on a surface that doesn't exist. tool_count=3 logs like a clean handoff while the tools sit nowhere callable, which is why flipping the flag to false changed nothing. defer has to assert the target surface is live before it hands off, else fall back to direct exposure.

  15. m13v commented on Sep 2, 2026

    @m13v

    your root cause has tool_search filtered out, but arbenl's repro has it executing and returning 0 for interdomestik_qa. a hidden bridge errors on call, it doesn't return empty. so the DirectModelOnly patch closes a real exposure gap, just maybe not this one, and the passing e2e goes green on a search->deferred path that was already open in this trace, leaving the empty index at thread_dynamic_tools unaudited.

  16. m13v commented on Sep 2, 2026

    @m13v

    the supports_search_tool:false path that works 2/2 looks like the fix, but going direct under Lite reintroduces exactly what deferred tool_search exists to avoid: every MCP schema serialized into every request. fine at 3 tools, not at 30.

  17. m13v commented on Sep 2, 2026

    @m13v

    unknown MCP server linear on a resource probe while mcp list says enabled is the swallow: the migration carried the connector into the catalog every green light reads, never into the thread's server registry that actually gates the call. so 'existing connections unaffected' is true about the catalog and false about the surface, and every health check keeps reading the catalog.

  18. m13v commented on Sep 2, 2026

    @m13v

    an auth test wouldn't catch this though. it asserts tools/list round-trips, which succeeds here, so it stays green while thread_dynamic_tools comes back empty. the layer that fails is registration, and nothing in the harness asserts on it. green check, wrong layer.

  19. m13v commented on Sep 2, 2026

    @m13v

    resources/list returning scratchpads and todos is what keeps this quiet: Codex reports connected, resources render, so every check reads green while the action-tool surface comes back empty. that's a partial mount presenting as a healthy connection. it's also why flipping tool_search_always_defer_mcp_tools = false does nothing, the defer flag isn't the layer dropping the tools, registration is, and nothing downstream asserts on it.

  20. m13v commented on Sep 2, 2026

    @m13v

    the cache fallback you'd give capture_binding_with_metadata is exactly what makes /mcp read green while the thread stays empty. copy it into the binding and you don't close the gap, you invert it: the model gets a spec for a server whose client isn't ready, so the tool shows up and fails at call time instead of never appearing. silent-absent becomes silent-broken.

  21. m13v commented on Sep 2, 2026

    @m13v

    the gramps control narrows it, but it still confounds two variables: the bearer-token auth and the remote-vs-local path. if the real cause is the same registration drop keyed on transport or manifest, treating this as an auth-admission gate patches the wrong layer and the exposure gap survives it. the cleaner isolation is an unauthenticated remote streamable_http server: same transport, no token. if that one also fails to mount, auth isn't the discriminator.

  22. m13v commented on Sep 2, 2026

    @m13v

    the contract as listed already passes today. configured, authenticated, tools/list all come back green, and Desktop treats that same green as "registered." that's the silent partial: the registration link no-ops without erroring, so the chain reports done while the thread surface stays empty. the one link that actually gates a call, tools indexed into thread_dynamic_tools, is the only one nothing asserts on. a contract that doesn't diff the post-registration surface against the ListToolsResult just formalizes the gap.

  23. m13v commented on Sep 2, 2026

    @m13v

    the restart is the tell: it completes clean and mcp list re-reads green, but a full restart only re-runs discovery, not the index step that feeds the mention picker. so it reports healthy while the broken layer stays untouched. open-design being another server with the same tools/list-green, picker-empty split points at the indexer, not any one server.

  24. m13v commented on Sep 2, 2026

    @m13v

    cache-fallback is the half to watch: on a bind Err it serves the 30-min-stale catalog, so a server that's actually failing to bind reads 'present' and only errors at call time. the exposure event surfaces the skip; the fallback quietly re-buries it.

  25. m13v commented on Sep 2, 2026

    @m13v

    the HTTP + node_repl tools mounting alongside the missing STDIO set in the same thread is the tell: init treats a partial registration as ready. nothing diffs mounted sources against discovered, so 2-of-3 reads identical to 3-of-3, and the STDIO drop passes as done with no exposure error to catch it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    appapp-serverbugmcp

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions