Repository navigation
Description
Summary
Since 2.6.3, tools coming from an MCP server are registered by the CLI but never reach the model: the LLM request contains zero mcp__* entries, so the agent cannot call any MCP tool at all. The exact same configuration works on 2.5.3.
This is not specific to deferred / default_deferred / the tool-select experimental flag — with a completely default config.toml and a default mcp.json (no deferred field at all), MCP tools are still dropped in 2.6.3.
Environment
-
Kimi Code CLI 2.6.3 (regression) — 2.5.3 works with a byte-identical config
-
Platform:
Linux 5.10.246-android12-9-g9c94fefc2317-dirty aarch64 unknown(Android 16 / Termux, CLI launched through the Termux glibc loader) -
Subscription: custom OpenAI-compatible gateway (no managed Kimi Code plan)
-
Model: custom gateway model,
capabilities = ["image_in", "thinking", "tool_use"](nodynamically_loaded_tools) -
MCP server: one HTTP server in
~/.kimi-code/mcp.json:{ "mcpServers": { "mt": { "url": "http://127.0.0.1:8787/mcp" } } }67 tools. The server itself is healthy —
initialize,tools/listandtools/callall succeed over raw JSON-RPC (curl).
Steps to reproduce
- Install 2.5.3, configure the MCP server as above, run a one-shot prompt (
kimi -p "...") → the agent has all 67 MCP tools. - Upgrade to 2.6.3, run the same command with the same config → the agent has 0 MCP tools.
Both runs are print mode against the same MCP server, same model, same config.toml.
Actual behaviour
Session journal agents/main/wire.jsonl of the 2.6.3 run:
| record | content |
|---|---|
mcp.tools_discovered |
67 tools discovered, all enabled |
tool_select.initialized |
94 entries = 27 built-in + 67 mcp__mt__*; every MCP entry carries "source": "mcp", "origin": "initial", "disclosure": "inline" |
llm.tools_snapshot |
26 entries — built-in only, zero mcp__* entries |
So the registry knows about the tools and reports them as active, but the request that reaches the provider carries none of them. The schemas are absent, so the model cannot call them even by name.
The same journal on 2.5.3 shows llm.tools_snapshot with 93 entries = 26 built-in + 67 MCP.
Expected behaviour
Per docs/en/customization/mcp.md:
By default, every tool of a server goes straight into the model's top-level tool list.
Servers without
deferredtake the global default (falseunless changed).
With no deferred field in mcp.json and no [mcp] default_deferred in config.toml, all 67 tools must be present in the request's tools[].
Things I tried that did not help
- Adding
dynamically_loaded_toolsto the model'scapabilities→ still 26 tools / 0 MCP. - Enabling the experimental tool-select (
KIMI_CODE_EXPERIMENTAL_TOOL_SELECT=1) → 27 tools (select_toolsis added), still 0 MCP, and the session is told "No tools are currently available for dynamic loading in this session." - Moving the server to a project-level
.kimi-code/mcp.jsonwithKIMI_CODE_TRUST_WORKSPACE=1→ still 26 / 0. - Adding an explicit global allowlist
[tools] enabled = [..., "mcp__mt__mt_apk_build"]→ still 26 / 0. - The MCP server itself is not at fault: a raw
tools/callformt_apk_workspace_list/mt_apk_list_installed_appsreturns correct results at the same moment the CLI is dropping the tools.
Where I would look
In packages/agent-core-v2 the request tool list is assembled through the tool-select service, and 2.6.3 changed that path — the 2.5.3 bundle contains no requestTools( at all:
toolSelectService.requestTools(base, disclosure, dynamic = true, ...);dynamicTools: trueis hard-wired inagent/loop/requester.ts.operationTools(baseline, capabilities)filtersbaselinedown to the names present indefaultTools(disclosure).capableTools(includeRuntime)only appendsorigin === "runtime"tools whenincludeRuntimeis true — andincludeRuntimeis thedisclosureargument.shapeToolsForDisclosure()returns all active entries unchanged whendisclosure === false, so the drop must happen either incapableTools()/state.initialclassification (MCP entries ending up classified as runtime tools) or in the policy filter (activeEntries()→toolPolicy.isToolActive(name, "mcp")).
With disclosure === false (model without dynamically_loaded_tools, tool-select flag off) the MCP entries have to be part of state.initial to survive; if they are classified as runtime tools they vanish from the request entirely. When disclosure === true they are hidden as "dynamically loadable", but select_tools cannot materialise them for a model without dynamically_loaded_tools — which matches the "No tools are currently available for dynamic loading in this session" reminder.
For reference, the profile's activeToolNames in this setup does contain the wildcard mcp__*, and picomatch.isMatch("mcp__mt__mt_apk_build", "mcp__*") is true with the bundled picomatch@4.0.4, so the plain policy matcher does not appear to be the blocker.
Related issues
- [Bug]
default_deferred = truedrops all MCP tools on models withoutdynamically_loaded_tools, instead of falling back #5008 — same symptom (MCP tools missing fromtools[]while present in the registry), but there it requires[mcp] default_deferred = true. Here it happens with default settings, so the default path itself seems to be affected in 2.6.3. - /reload can resume before MCP tools are ready, leaving the first turn with an incomplete tool list #3442 —
/reloadcan resume before MCP tools are ready, leaving the first turn with an incomplete tool list. - ACP resume advertises initial MCP tools after connections are replaced #5036 — ACP resume advertises initial MCP tools after connections are replaced.
Workaround
Run 2.5.3 — the auto-updater keeps the previous binary as ~/.kimi-code/bin/kimi.bak, and with that binary all 67 MCP tools are exposed to the model again. Alternatively call the MCP endpoint directly over JSON-RPC.
Activity
defaultuser233 commentedon Nov 19, 2026
Thanks for the report — reproduced on the same setup (2.6.3, Termux/glibc loader, custom OpenAI-compatible gateway,
capabilities = ["image_in", "thinking", "tool_use"], the same 67-toolmtHTTP server). The journal lines match exactly:mcp.tools_discovered67 tools →tool_select.initialized94 entries (27 built-in + 67mcp__mt__*) →llm.tools_snapshot26 entries, 0mcp__*.A workaround does work on 2.6.3 without downgrading: mark the server
deferred, so its tools land in the tool-select manifest instead of the (broken) top-level path.Verified end to end:
llm.tools_snapshotgoes from 26 to 27 entries (the extra one beingselect_tools), the model callsselect_tools, and the MCP tool then executes —mcp__mt__mt_file_listreturned real directory entries in the same run.Two notes that may help with the fix:
No tools are currently available for dynamic loadingreminder seen withKIMI_CODE_EXPERIMENTAL_TOOL_SELECT=1is what the client emits when the tool-select manifest is empty. With nodeferredfield, 2.6.3 places the entries in neither the top-level list nor the manifest, so tool-select has nothing to materialize. Settingdeferred: truepopulates the manifest and the path works.dynamically_loaded_toolsabsent from the model, the load still succeeded in my runs. So [Bug]default_deferred = truedrops all MCP tools on models withoutdynamically_loaded_tools, instead of falling back #5008 (default_deferred = truedrops all MCP tools on models withoutdynamically_loaded_toolsinstead of falling back) may share this root cause — the non-disclosure fallback that should copy the entries intostate.initiallooks missing.Note for anyone trying this: the tools are still not in the top-level
tools[]; they are materialized on demand throughselect_tools, so the model has to load them explicitly before the first call.Local binary versions for reference:
~/.kimi-code/bin/kimi= 2.6.3,~/.kimi-code/bin/kimi.bak= 2.5.3 (MCP tools exposed correctly there).defaultuser233 commentedon Nov 19, 2026
One more data point that may help with the root cause: whether the session is fresh or resumed changes the outcome, so "MCP tools missing" and "MCP tools present" can both be true in the same journal.
All timestamps below are UTC; 2.6.3 landed on this device at 2026-11-19 03:32 (binary mtime). Read from the session journals (
<session>/agents/main/wire.jsonl):tool_select.initializedmcp.tools_discoveredllm.tools_snapshotmcp__*in snapshotdeferred: true+select_tools)select_tools--continueThe resumed session still exposes all 67 MCP tools under 2.6.3, while every freshly created session under 2.6.3 drops them from the request. The resumed session's
tool_select.initialized/mcp.tools_discovered(94 / 67) are carried over from the persisted manifest written by the older binary, so those entries are already classified asinitialand survive intotools[].That is consistent with the hypothesis that in 2.6.3 a fresh session never classifies the MCP entries as
initial(they end up asruntime), which is exactly the symptom: present intool_select.initialized, absent fromllm.tools_snapshot. If so, the fix may be the non-disclosure fallback that copies the entries intostate.initial— the same fallback #5008 seems to be missing.The
deferred: trueworkaround is confirmed working locally: withdeferred: trueon the server,[experimental] tool-select = trueanddynamically_loaded_toolsin the model capabilities, the model callsselect_tools, the following<tools_added>block lists all 67mcp__mt__*tools, and they execute (verified withmcp__mt__mt_file_list).picolino commentedon Nov 20, 2026
Same problem, checked in 2.7.1. Omg, it's critical issue guys, MCP servers are completely gone from usage on latest kimi code versions.
Only workaround that works for me is to launch subagent from session, all MCP tools are available there.