kimi-code/packages/agent-core/test/mcp
7Sageer 527d485d92
Some checks are pending
CI / build (push) Waiting to run
CI / test (1) (push) Waiting to run
CI / test (2) (push) Waiting to run
CI / test (3) (push) Waiting to run
CI / test (4) (push) Waiting to run
CI / test (5) (push) Waiting to run
CI / test-pi-tui (push) Waiting to run
CI / test-windows (push) Waiting to run
CI / lint (push) Waiting to run
CI / typecheck (push) Waiting to run
Nix Build / Check flake.nix workspace sync (push) Waiting to run
Nix Build / nix build .#kimi-code (push) Blocked by required conditions
Release / Native release artifact (push) Blocked by required conditions
Release / Release (push) Waiting to run
Release / Deploy docs (push) Blocked by required conditions
Release / Publish native release assets (push) Blocked by required conditions
feat: add global default MCP server timeout configs (#2065)
* feat: add global default MCP server startup timeout config

Add a `[mcp] startup_timeout_ms` config.toml section with a
`KIMI_MCP_STARTUP_TIMEOUT_MS` env override as the global default MCP
server connection (startup + tool discovery) timeout. Precedence:
per-server `startupTimeoutMs` in mcp.json > env var > config.toml >
built-in 30s default.

* feat: add global default MCP tool call timeout config

Extend the `[mcp]` section with `tool_timeout_ms` and the
`KIMI_MCP_TOOL_TIMEOUT_MS` env override as the global default for
single MCP tool calls, mirroring the startup timeout: a per-server
`toolTimeoutMs` in mcp.json still wins, and unset entries fall back to
the SDK built-in 60s default.

* chore: shorten the mcp timeouts changeset

* feat(agent-core): add global default MCP server timeout configs

Port the `[mcp]` section (`startup_timeout_ms` / `tool_timeout_ms`)
and the `KIMI_MCP_STARTUP_TIMEOUT_MS` / `KIMI_MCP_TOOL_TIMEOUT_MS` env
overrides to agent-core (v1), mirroring the v2 semantics: per-server
fields in mcp.json > env vars > config.toml > built-in defaults. The
v1 TOML loader gains explicit `mcp` read/write mappings, and both
connection-manager construction sites (Session, testGlobalMcpServer RPC)
pass the resolved defaults through.

* fix(agent-core): validate and apply MCP timeout defaults

* fix: propagate MCP startup timeout to SDK requests

* refactor(agent-core-v2): resolve MCP default timeouts at connect time

Keep the session connection manager synchronously lazy instead of gating
its existence on config readiness: resolveDefaultTimeouts is read from the
mcp config section at each (re)connect, so AgentMcpService's eager
construction stays unconditionally safe and reconnects pick up changed
preferences. The initial connect still awaits config.ready for a
deterministic snapshot. Also restore the ISessionMcpService method docs,
bump the changeset to minor, and fix the v1 env-parse comment.

* chore(agent-core-v2): regenerate config manifest for the mcp section

* Add global default MCP server timeouts configuration

Specify the new global default MCP server timeouts in both the config file and environment variables.

Signed-off-by: 7Sageer <sag77r@hotmail.com>

---------

Signed-off-by: 7Sageer <sag77r@hotmail.com>
2026-07-23 12:41:08 +08:00
..
fixtures feat: add global default MCP server timeout configs (#2065) 2026-07-23 12:41:08 +08:00
auth-tool.test.ts Kimi For Coding 2026-05-22 15:54:50 +08:00
client-http.test.ts Kimi For Coding 2026-05-22 15:54:50 +08:00
client-sse.test.ts mcp suport sse (#744) 2026-06-14 18:04:26 +08:00
client-stdio.test.ts feat(vscode): migrate extension to Node SDK (#1769) 2026-07-16 17:27:21 +08:00
config-loader.test.ts feat(vscode): migrate extension to Node SDK (#1769) 2026-07-16 17:27:21 +08:00
connection-manager.test.ts feat: add global default MCP server timeout configs (#2065) 2026-07-23 12:41:08 +08:00
oauth-store.test.ts feat(vscode): migrate extension to Node SDK (#1769) 2026-07-16 17:27:21 +08:00
output.test.ts fix: refuse unsupported image formats instead of poisoning sessions (#1536) 2026-07-10 19:36:00 +08:00
session-config-merge.test.ts feat(acp): implement ACP server with session lifecycle, tool streaming, and IDE integration (#368) 2026-06-03 21:11:30 +08:00
tool-manager-mcp.test.ts fix: restore goal resume state from agent records (#552) 2026-06-09 10:02:19 +08:00
tool-naming.test.ts Kimi For Coding 2026-05-22 15:54:50 +08:00