ACP: let the client choose deferred for each MCP server (_meta)

Open Beginner friendly
#6,000 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
85/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript

Research direction

Start with packages/acp-server/src/convert.ts and inspect acpMcpServersToConfigRecord, especially its stdio and http/sse branches. Then read test/convert.test.ts and check how each branch converts server metadata. Done means a boolean kimi-code/deferred value is passed through for each server, while missing or non-boolean values leave the default behavior in place, with a test covering the conversion.

Written by the indexing model from the issue text.

Description

What feature would you like to see?

Let an ACP client choose deferred for each MCP server that it sends in session/new, session/load and session/resume.

Today acpMcpServersToConfigRecord (packages/acp-server/src/convert.ts) builds the config record without deferred, so every ACP server uses [mcp] default_deferred (default true). The config schema and the connection manager already support deferred for each server, but an ACP client cannot set it. In 2.9.0 I found no other way: the --mcp-config flags are gone, there is no environment variable for default_deferred, and tool _meta is not read.

Proposal: read an optional key from the ACP _meta of each server:

{ "name": "core", "command": "core-mcp", "args": [], "env": [], "_meta": { "kimi-code/deferred": false } }
  • false: the tools of this server stay inline.
  • true: the tools of this server are deferred.
  • missing or not a boolean: no change (default_deferred applies).

The ACP schema allows _meta on each MCP server, and clients other than Kimi Code ignore the key.

Additional information

My use case: I maintain OpenBot, which runs Kimi Code as an ACP agent. Each session gets a few MCP servers from OpenBot that the agent needs on each turn (chat, team and task tools), and also MCP servers that the user adds. I want the user's servers deferred, which saves prompt tokens, and OpenBot's own servers inline, so the agent does not need a search step before each core action. Today the only choice is one global setting for all servers.

I have a small change ready (a deferredFromMeta helper used by the stdio and http/sse branches, about 10 lines, and one test in test/convert.test.ts). I can send it as a PR if you invite me, or you can implement it in a different way.

Dominant language
TypeScript
Stars
8.3k
Forks
1.4k
Avg merge
15h 9m
Merged PRs (30d)
751

Getting set up

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.

More from MoonshotAI/kimi-code

All issues in MoonshotAI/kimi-code

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.