MCP tools silently unavailable with DeepSeek official setup (custom models.json: supports_search_tool=true + tool_mode=null)
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 55/100
Research direction
Start in codex-rs/core/src/tools/spec_plan.rs and codex-rs/core/src/mcp_tool_exposure.rs, then trace build_model_visible_specs* and effective_tool_mode. Reproduce with the DeepSeek models.json configuration and an enabled stdio MCP server. Done means custom models expose MCP tools directly or through tool_search without breaking native catalog behavior.
Written by the indexing model from the issue text.
Description
Summary
Following DeepSeek's official one-command setup (irm https://cdn.deepseek.com/api-docs/codex-deepseek-setup-en.ps1 | iex), the generated ~/.codex/models.json registers deepseek-v4-flash / deepseek-v4-pro with "supports_search_tool": true and "tool_mode": null. On Codex 0.145.0 this combination makes all configured MCP tools silently unavailable: the session exposes web search and MCP resources, but no mcp__* callable tools and no tool_search.
Native OpenAI catalog models (e.g. gpt-5.6-sol, tool_mode: code_mode) can call the same MCP servers fine, so this only shows up with custom models registered through model_catalog_json.
Environment
- Codex CLI
0.145.0on Windows - Custom provider in
config.toml:[model_providers.deepseek]withbase_url = "https://api.deepseek.com/"andwire_api = "responses" model = "deepseek-v4-flash",model_catalog_json = "C:/Users/<user>/.codex/models.json"(written by the DeepSeek setup script)- MCP servers:
codegraph(stdio),idalib-mcp(stdio),universal-memory(stdio) — allenabled;codex mcp listshowsAuth: Unsupported(expected for stdio) - The MCP server handshake succeeds:
idalib-mcp --stdioinitialize +tools/listworks, and in-sessionlist_mcp_resourcesreturns the server's resources
Reproduction
- Run the DeepSeek setup script and choose model 1.
- Add any stdio server under
[mcp_servers.*]inconfig.toml. - Start a new session with
deepseek-v4-flash. - Ask the model to call any MCP tool (e.g.
mcp__idalib__server_health).
Actual: the model reports the tool is not in its available tool set. The session's tool surface contains web search and the MCP resource tools but neither mcp__* tools nor tool_search.
Expected: MCP tools registered in [mcp_servers.*] should be directly callable (or at least discoverable via tool_search) for custom models, matching catalog models.
Root cause (client-side)
codex-rs/core/src/tools/spec_plan.rs:search_tool_enabled = model_info.supports_search_tool && provider.capabilities().namespace_toolscodex-rs/core/src/mcp_tool_exposure.rs: whensearch_tool_enabledis true, every MCP tool is registered withToolExposure::Deferredbuild_model_visible_specs*only emits tools whose exposureis_direct(); Deferred tools are excluded from the model-visible listeffective_tool_mode:tool_mode: nullplus no code-mode feature flags resolves toToolMode::Direct, so there is no code-mode exec tool into which the deferred tools could be nested- The DeepSeek setup script hardcodes
"supports_search_tool": true(and"tool_mode": null) in themodels.jsonit writes
Net effect: official DeepSeek setup + any MCP server = MCP tools silently invisible, with the tool_search escape hatch also absent from the session.
Workaround
Set "supports_search_tool": false in both entries of ~/.codex/models.json. MCP tools are then registered with ToolExposure::Direct and appear in a new session. Hosted web search is unaffected (it is driven by provider capabilities + web_search_tool_type, not supports_search_tool).
Related
- #33609 (closed): gpt-5.6-sol hides MCP tools without exposing
tool_search - #31750: custom
model_provider, notool_search/ dynamic tool discovery - #32101: Code Mode omits
tool_searchfrom exec, degrading deferred MCP discovery - #34018: Windows Desktop custom stdio MCP tools pass discovery but are not exposed
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.5k
- Avg merge
- 1m
- Merged PRs (30d)
- 1k
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from openai/codex
-
enhancement remote
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
bug CLI windows-os
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
macOS sandbox blocks hw.optional.arm64 sysctl, causing Flutter to misdetect Apple Silicon as x64 Openbug CLI sandbox
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug CLI TUI
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
CLI config enhancement skills
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
kwakseongjae/auto-hwp#319 ·
-
area:cli bug filter-quality good first issue priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
bevyengine/bevy#25861 ·
-
comp-datalake
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/ClickHouse#121222 ·
-
A-linter
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
oxc-project/oxc#26863 ·