bug(desktop): workspace trust prompt not shown for project MCP on Windows
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 48/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- typescript
調査の方向性
Start by tracing Desktop session startup for an untrusted workspace and the project-level .kimi-code/mcp.json loading path, then compare it with GET and POST /api/v1/workspaces/{workspace_id}/trust. Reproduce on Windows 11 using the provided MCP configuration; done means the Desktop flow visibly prompts for trust and persists the user's trust or decline decision before enabling project MCP configuration.
索引モデルが issue の本文から書いたものです。
説明
What version of Kimi Code is running?
Desktop app 1.0.2 (Windows x64, packaged), embedded server host_version 2.0.1.
Which open platform/subscription were you using?
Kimi subscription. The exact paid tier was not shown in the Desktop UI used for this reproduction.
Which model were you using?
K2.8 Preview.
What platform is your computer?
Windows 11 x64.
What issue are you seeing?
A project-level MCP server is correctly discovered from:
<workspace>\.kimi-code\mcp.json
but when the workspace is untrusted, Kimi Code Desktop does not show the documented Workspace Trust prompt at session start.
Observed state:
- Desktop session starts normally.
- No Workspace Trust dialog is shown.
- Project MCP server is not registered in the session while the workspace remains untrusted.
- The local Server API reports:
{"code":0,"msg":"success","data":{"trusted":false}} - After explicitly marking the workspace trusted through the documented local Server API, a new Desktop session registers the project MCP server and exposes its
mcp__<server>__authenticatetool, confirming that trust was the gating condition.
No OAuth authorization or external MCP calls are required to reproduce the missing trust prompt.
What steps can reproduce the bug?
-
On Windows 11, create a new dedicated folder, for example:
C:\work\mcp-trust-repro -
Create:
C:\work\mcp-trust-repro\.kimi-code\mcp.json -
Put a project-level remote HTTP MCP entry in it, for example:
{ "mcpServers": { "example-api": { "url": "https://example.com/mcp" } } } -
Open that folder as a workspace in Kimi Code Desktop 1.0.2.
-
Start a new session.
-
Observe:
- no Workspace Trust prompt is shown;
- the project MCP server is not registered in the agent session.
-
Read the workspace trust state through the documented local Server API:
GET /api/v1/workspaces/{workspace_id}/trustResult:
{"code":0,"msg":"success","data":{"trusted":false}} -
Workaround: explicitly grant trust through the documented local Server API:
POST /api/v1/workspaces/{workspace_id}/trust Content-Type: application/json {} -
Verify:
GET /api/v1/workspaces/{workspace_id}/trustnow returns
trusted:true. -
Start a new Desktop session. The project MCP server is now registered and, for an OAuth MCP server, its
mcp__<server>__authenticatetool is announced.
This reproduces the difference between the expected trust UI flow and the actual Desktop behavior.
What is the expected behavior?
When Kimi Code Desktop starts a session in an untrusted workspace containing project-level MCP servers, it should surface the documented Workspace Trust prompt before project MCP configuration is enabled.
The prompt should identify the project MCP launch target / remote URL, allow the user to explicitly trust or decline the folder, and persist that decision.
If Desktop intentionally uses a different trust UX than CLI/TUI, there should be a visible documented Desktop control for the same state.
Additional information
I searched existing issues before filing. The closest result I found was #2976, which covers trust not being inherited by subdirectories/worktrees. That is different from this reproduction: here the exact workspace itself remains trusted:false, no trust prompt is displayed, and project MCP loading is blocked until trust is granted manually.
The workaround above is reversible with:
POST /api/v1/workspaces/{workspace_id}/untrust
Content-Type: application/json
{}
One implementation detail that may help narrow the problem: the server-side trust API behaves as expected once called directly; the apparent failure is in surfacing/reaching the trust decision from Desktop UI/session startup, not in trust persistence itself.
No credentials, tokens, account identifiers, local usernames, or production endpoints are included in this report.
- 主要言語
- TypeScript
- スター
- 7.9k
- フォーク
- 1.3k
- 平均マージ
- 1日 14時間
- マージ済み PR(30日)
- 93
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
MoonshotAI/kimi-code のほかの issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 60/100
MoonshotAI/kimi-code#4225 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
MoonshotAI/kimi-code#4177 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
MoonshotAI/kimi-code#4170 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
MoonshotAI/kimi-code#4147 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Workspace fs:grep loses surrounding lines for multiple matches with ripgrep対応中かも @chenqing0106 が 1 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
MoonshotAI/kimi-code#4146 ·
メンテナーはふだん 1 日以内に返信
MoonshotAI/kimi-code の issue をすべて見る
似ている issue
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
equinor/prisma-decision-web#919 ·
メンテナーはふだん 1 日以内に返信
-
[DC] OneLogin sync imports a partial user list when an API request fails対応中かも @RaphaelFakhri が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
bitwarden/directory-connector#1276 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
home-assistant/installer#324 ·
メンテナーはふだん 1 日以内に返信
-
Mondriaan
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
knaw-huc/textannoviz#733 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信