MoonshotAI / MoonshotAI/kimi-code

Bug: [tools].disabled in config.toml does not filter MCP tools from the request

Open
#2,421 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
7.5k
Forks
1.2k
Avg merge
11h 53m
Merged PRs (30d)
350

Description

Summary

Setting [tools].disabled in config.toml (e.g. disabled = ["mcp__higgsfield__*"]) has no effect on MCP tools: they are still sent on the wire with every request. Filtering appears to happen before provider conversion, but MCP tools are merged in after that point.

Discovered while investigating #2328 (Anthropic 400 on top-level oneOf/anyOf/allOf MCP schemas) — this makes the global tool switch useless as a workaround for a single non-conforming MCP tool, since the only effective lever is per-server disabledTools in mcp.json.

Steps to reproduce

  1. Configure an MCP server in mcp.json (e.g. Higgsfield).
  2. Add to config.toml:
    [tools]
    disabled = ["mcp__higgsfield__*"]
    
  3. Start a session and inspect the outgoing request (wire log) → the MCP tools are still present in the tools array.

Expected

[tools].disabled patterns apply to MCP tools too, removing them from the request payload sent to the provider.

Environment

  • kimi-code 0.29.2
  • Linux (WSL2, Ubuntu 24.04)

Related: #2328

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the tool-filtering path described in the issue and trace where MCP tools are merged after provider conversion. Reproduce with config.toml's [tools].disabled pattern and an MCP server from mcp.json, then verify in the wire log that matching MCP tools are absent from the provider request.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.