What version of Kimi Code is running?
0.41.0
Which open platform/subscription were you using?
Kimi Code subscription
Which model were you using?
k3
What platform is your computer?
macOS
What issue are you seeing?
Kimi Code appears to route MCP tool calls to the wrong MCP server when multiple MCP servers share the same name prefix.
In my configuration, several MCP servers use the common prefix app-ai-h5-, for example:
app-ai-h5-figma
app-ai-h5-figma-desktop
app-ai-h5-chrome-devtools
app-ai-h5-showdoc
When I explicitly ask Kimi Code to use app-ai-h5-showdoc, it may repeatedly invoke tools from app-ai-h5-figma-desktop instead.
This happens even when the instruction is explicit and the project AGENTS.md also states that ShowDoc MCP should be used for backend/API documentation.
For example, Kimi Code correctly reasons that it should call the ShowDoc MCP:
The user wants to read a ShowDoc page. Per AGENTS.md, use ShowDoc MCP. The URL: item 664394860, page 206610030. Use get_page with page_id 206610030.
However, the actual tool invocation is:
Used get_figjam
MCP/app-ai-h5-figma-desktop
which fails with:
get_figjam is only available for FigJam files.
Even after repeatedly telling Kimi Code to use app-ai-h5-showdoc, it continues selecting app-ai-h5-figma-desktop.
This makes it look like MCP server selection/routing may be matching or confusing servers based on their common name prefix.
What steps can reproduce the bug?
- Configure multiple MCP servers with the same prefix, for example:
{
"mcpServers": {
"app-ai-h5-figma": {
"type": "http",
"url": "https://mcp.figma.com/mcp"
},
"app-ai-h5-figma-desktop": {
"type": "http",
"url": ...
},
"app-ai-h5-chrome-devtools": {
"command": "npx",
"args": [
"-y",
"chrome-devtools-mcp@1.8.0"
]
},
"app-ai-h5-showdoc": {
...
}
}
}
-
Start Kimi Code in a project where AGENTS.md explicitly says that ShowDoc MCP must be used for backend/API documentation.
-
Ask Kimi Code to read a ShowDoc page, and explicitly mention that it should use app-ai-h5-showdoc.
Example:
"Use app-ai-h5-showdoc to read ShowDoc page 206610030."
-
Observe that Kimi Code may invoke a tool from app-ai-h5-figma-desktop, such as get_figjam, instead of invoking the ShowDoc MCP.
-
Repeat the instruction and explicitly correct the MCP server name.
-
The wrong MCP server may still be selected repeatedly.
What is the expected behavior?
When an MCP server is explicitly specified by name, Kimi Code should invoke tools from that exact MCP server.
For example, when the user requests:
"Use app-ai-h5-showdoc"
Kimi Code should only select tools exposed by app-ai-h5-showdoc, and should not invoke tools from app-ai-h5-figma-desktop merely because the MCP servers share the app-ai-h5- prefix.
MCP server routing should use an exact server identity rather than an ambiguous or fuzzy prefix-based match.
Additional information
The issue seems correlated with MCP servers sharing the same prefix.
Current naming pattern:
app-ai-h5-figma
app-ai-h5-figma-desktop
app-ai-h5-chrome-devtools
app-ai-h5-showdoc
The model's reasoning appears to identify the correct MCP server and even the expected ShowDoc tool (get_page), but the actual tool dispatch goes to another MCP server.
Example session output:
The user wants to read a ShowDoc page. Per AGENTS.md, use ShowDoc MCP.
The URL: item 664394860, page 206610030.
Use get_page with page_id 206610030.
Actual invocation:
Used get_figjam
MCP/app-ai-h5-figma-desktop
Error:
get_figjam is only available for FigJam files.
This suggests the problem may be in MCP tool/server resolution or dispatch rather than in model intent alone.
As a workaround, renaming the MCP servers so they do not share the same prefix appears worth testing, but ideally exact MCP server names should remain unambiguous regardless of naming similarity.
The important point is that the model appears to understand that app-ai-h5-showdoc should be used, but the actual dispatched tool belongs to app-ai-h5-figma-desktop.
Contribution
What version of Kimi Code is running?
0.41.0
Which open platform/subscription were you using?
Kimi Code subscription
Which model were you using?
k3
What platform is your computer?
macOS
What issue are you seeing?
Kimi Code appears to route MCP tool calls to the wrong MCP server when multiple MCP servers share the same name prefix.
In my configuration, several MCP servers use the common prefix
app-ai-h5-, for example:app-ai-h5-figmaapp-ai-h5-figma-desktopapp-ai-h5-chrome-devtoolsapp-ai-h5-showdocWhen I explicitly ask Kimi Code to use
app-ai-h5-showdoc, it may repeatedly invoke tools fromapp-ai-h5-figma-desktopinstead.This happens even when the instruction is explicit and the project AGENTS.md also states that ShowDoc MCP should be used for backend/API documentation.
For example, Kimi Code correctly reasons that it should call the ShowDoc MCP:
However, the actual tool invocation is:
Used
get_figjamMCP/app-ai-h5-figma-desktop
which fails with:
get_figjam is only available for FigJam files.
Even after repeatedly telling Kimi Code to use
app-ai-h5-showdoc, it continues selectingapp-ai-h5-figma-desktop.This makes it look like MCP server selection/routing may be matching or confusing servers based on their common name prefix.
What steps can reproduce the bug?
{
"mcpServers": {
"app-ai-h5-figma": {
"type": "http",
"url": "https://mcp.figma.com/mcp"
},
"app-ai-h5-figma-desktop": {
"type": "http",
"url": ...
},
"app-ai-h5-chrome-devtools": {
"command": "npx",
"args": [
"-y",
"chrome-devtools-mcp@1.8.0"
]
},
"app-ai-h5-showdoc": {
...
}
}
}
Start Kimi Code in a project where AGENTS.md explicitly says that ShowDoc MCP must be used for backend/API documentation.
Ask Kimi Code to read a ShowDoc page, and explicitly mention that it should use
app-ai-h5-showdoc.Example:
"Use app-ai-h5-showdoc to read ShowDoc page 206610030."
Observe that Kimi Code may invoke a tool from
app-ai-h5-figma-desktop, such asget_figjam, instead of invoking the ShowDoc MCP.Repeat the instruction and explicitly correct the MCP server name.
The wrong MCP server may still be selected repeatedly.
What is the expected behavior?
When an MCP server is explicitly specified by name, Kimi Code should invoke tools from that exact MCP server.
For example, when the user requests:
"Use app-ai-h5-showdoc"
Kimi Code should only select tools exposed by
app-ai-h5-showdoc, and should not invoke tools fromapp-ai-h5-figma-desktopmerely because the MCP servers share theapp-ai-h5-prefix.MCP server routing should use an exact server identity rather than an ambiguous or fuzzy prefix-based match.
Additional information
The issue seems correlated with MCP servers sharing the same prefix.
Current naming pattern:
app-ai-h5-figma
app-ai-h5-figma-desktop
app-ai-h5-chrome-devtools
app-ai-h5-showdoc
The model's reasoning appears to identify the correct MCP server and even the expected ShowDoc tool (
get_page), but the actual tool dispatch goes to another MCP server.Example session output:
The user wants to read a ShowDoc page. Per AGENTS.md, use ShowDoc MCP.
The URL: item 664394860, page 206610030.
Use get_page with page_id 206610030.
Actual invocation:
Used get_figjam
MCP/app-ai-h5-figma-desktop
Error:
get_figjam is only available for FigJam files.
This suggests the problem may be in MCP tool/server resolution or dispatch rather than in model intent alone.
As a workaround, renaming the MCP servers so they do not share the same prefix appears worth testing, but ideally exact MCP server names should remain unambiguous regardless of naming similarity.
The important point is that the model appears to understand that app-ai-h5-showdoc should be used, but the actual dispatched tool belongs to app-ai-h5-figma-desktop.
Contribution