Skip to content

feat(tui): show MCP server summary in welcome panel and update /mcp hints#223

Open
kermanx wants to merge 1 commit into
mainfrom
feat/mcp-welcome-summary
Open

feat(tui): show MCP server summary in welcome panel and update /mcp hints#223
kermanx wants to merge 1 commit into
mainfrom
feat/mcp-welcome-summary

Conversation

@kermanx
Copy link
Copy Markdown
Collaborator

@kermanx kermanx commented May 29, 2026

Problem

用户在启动 Kimi Code 时,无法快速感知当前 MCP 服务器的整体状态;
同时 /mcp 命令的输出缺少明确的配置入口提示,且提示语中混用了 /skill:mcp-config/mcp-config

What changed

  1. Welcome 面板增加 MCP 状态行

    • 在欢迎框(WelcomeComponent)的 Directory / Session / Model / Version 下方新增一行 MCP:,实时展示当前会话的 MCP 服务器摘要,例如 1 connected · 2 disabled
    • session-event-handler 在启动同步 MCP 状态后,将摘要写入 AppState.mcpServersSummary,Welcome 面板随状态变化自动刷新。
  2. /mcp 输出面板增加配置入口提示

    • 无论是否有已配置的 MCP 服务器,面板底部都会输出一行 Configure with /mcp-config,让用户无需记忆命令即可找到配置入口。
  3. 统一 MCP 相关提示语

    • 将所有 MCP 相关提示(needs-auth action、空状态提示、OAuth 错误提示)统一使用 /mcp-config,去掉 /skill:mcp-config 的混用。

Checklist

  • I have read the CONTRIBUTING document.
  • I have explained the problem above.
  • I have added tests that prove my feature works.
  • Ran gen-changesets skill, or this PR needs no changeset.
  • Ran gen-docs skill, or this PR needs no doc update.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 29, 2026

🦋 Changeset detected

Latest commit: b2cf284

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@moonshot-ai/kimi-code Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 29, 2026

pnpm dlx https://pkg.pr.new/@moonshot-ai/kimi-code@b2cf284
npx https://pkg.pr.new/@moonshot-ai/kimi-code@b2cf284

commit: b2cf284

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b2cf284761

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

host.state.theme.colors.textMuted,
);
host.setAppState({
mcpServersSummary: formatMcpStartupStatusSummary(hidden, visible.length),
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Include visible servers in welcome MCP summary

In syncMcpServerStatusSnapshot, mcpServersSummary is built from hidden, which explicitly excludes every server selected for the startup status rows. As a result, the welcome panel shows no MCP line for the common case of four or fewer non-disabled servers (for example, one connected server), and when disabled servers are present it summarizes only disabled/overflow servers rather than the current overall MCP state advertised by the feature.

Useful? React with 👍 / 👎.

availableModels: {},
availableProviders: {},
sessionTitle: null,
mcpServersSummary: null,
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Clear MCP summary before rendering a new session

This summary is stored in shared AppState, but resetSessionRuntime/syncRuntimeState never clears it before clearTranscriptAndRedraw() renders the next session's welcome panel. After switching from a session with an MCP summary to another session, the old summary remains visible until this async snapshot finishes, and it can remain indefinitely if listMcpServers() fails, so the welcome panel can show MCP state from the previous session.

Useful? React with 👍 / 👎.

Comment on lines +165 to +167
host.setAppState({
mcpServersSummary: formatMcpStartupStatusSummary(hidden, visible.length),
});
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Recompute welcome MCP counts on status events

This only seeds mcpServersSummary from the startup snapshot; later mcp.server.status events still go through renderMcpServerStatus() and never update the app-state summary. In a startup where a hidden server is initially pending/failed and then connects (or needs auth), the welcome panel continues to show the stale count until another full snapshot is taken, so the advertised live MCP summary becomes misleading.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant