Skip to content

Add MCP section to config web UI#2770

Open
Gabrielsv01 wants to merge 11 commits intosipeed:mainfrom
Gabrielsv01:feat/config-mcp-section
Open

Add MCP section to config web UI#2770
Gabrielsv01 wants to merge 11 commits intosipeed:mainfrom
Gabrielsv01:feat/config-mcp-section

Conversation

@Gabrielsv01
Copy link
Copy Markdown

📝 Description

Add a dedicated MCP section to the web Config page so users can manage MCP enable/discovery settings and MCP servers directly from the UI.

This removes the need to edit raw config for common MCP setup tasks and fixes server removal persistence by sending null entries in patch payloads.

🗣️ Type of Change

  • 🐞 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 📖 Documentation update
  • ⚡ Code refactoring (no functional changes, no api changes)

🤖 AI Code Generation

  • 🤖 Fully AI-generated (100% AI, 0% Human)
  • 🛠️ Mostly AI-generated (AI draft, Human verified/modified)
  • 👨‍💻 Mostly Human-written (Human lead, AI assisted or none)

🔗 Related Issue

N/A

📚 Technical Context (Skip for Docs)

  • Reference URL: N/A
  • Reasoning:
    • Add MCP controls to Config UI (enabled/discovery/ttl/max_search_results/use_bm25/use_regex).
    • Add MCP server editor for stdio/http modes with validation.
    • Serialize MCP servers into tools.mcp.servers patch payload.
    • Preserve delete semantics by sending removed servers as null in merge patch payload.

🧪 Test Environment

  • Hardware: PC
  • OS: macOS
  • Model/Provider: N/A (UI/config feature)
  • Channels: N/A (launcher web config page)

📸 Evidence (Optional)

Click to view Logs/Screenshots

Frontend build succeeded after changes (vite build completed successfully).

☑️ Checklist

  • My code/docs follow the style of this project.
  • I have performed a self-review of my own changes.
  • I have updated the documentation accordingly.

Copilot AI review requested due to automatic review settings May 5, 2026 01:48
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented May 5, 2026

CLA assistant check
All committers have signed the CLA.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a new MCP section to the web config UI so users can manage MCP discovery settings and server definitions from the visual editor instead of editing raw config.

Changes:

  • Added MCP-related form fields and config serialization/parsing for discovery settings and server lists.
  • Added a new MCP section in the config page with controls for enabling discovery and editing stdio/http servers.
  • Added English and Chinese locale strings for the new MCP UI.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
web/frontend/src/i18n/locales/zh.json Adds Chinese translations for the new MCP config section and fields.
web/frontend/src/i18n/locales/en.json Adds English translations for the new MCP config section and fields.
web/frontend/src/components/config/form-model.ts Extends the visual config form model to load/store MCP settings and server entries.
web/frontend/src/components/config/config-sections.tsx Introduces the MCP UI section and server editor controls.
web/frontend/src/components/config/config-page.tsx Wires MCP form state into save/reset flows and builds the MCP patch payload.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread web/frontend/src/components/config/form-model.ts
Comment thread web/frontend/src/components/config/config-page.tsx Outdated
Comment thread web/frontend/src/components/config/config-page.tsx
Copilot AI review requested due to automatic review settings May 5, 2026 01:57
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread web/frontend/src/components/config/config-sections.tsx Outdated
Comment thread web/frontend/src/components/config/config-page.tsx
Comment thread web/frontend/src/components/config/config-page.tsx Outdated
Copilot AI review requested due to automatic review settings May 5, 2026 02:05
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread web/frontend/src/components/config/config-sections.tsx Outdated
Comment thread web/frontend/src/components/config/config-page.tsx Outdated
Comment thread web/frontend/src/components/config/config-page.tsx Outdated
Comment thread web/frontend/src/components/config/config-page.tsx Outdated
Comment thread web/frontend/src/components/config/form-model.ts Outdated
Copilot AI review requested due to automatic review settings May 5, 2026 02:15
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread web/frontend/src/components/config/config-page.tsx Outdated
Comment thread web/frontend/src/components/config/config-page.tsx
Comment thread web/frontend/src/components/config/config-sections.tsx
Comment thread web/frontend/src/components/config/config-sections.tsx
@afjcjsbx afjcjsbx requested a review from wj-xiao May 5, 2026 06:54
Comment thread web/frontend/src/components/config/config-page.tsx Outdated
Comment thread web/frontend/src/components/config/config-page.tsx Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 7 comments.

Comment thread web/frontend/src/i18n/locales/en.json Outdated
Comment thread web/frontend/src/i18n/locales/zh.json Outdated
Comment thread web/frontend/src/components/config/config-sections.tsx Outdated
Comment thread web/frontend/src/components/config/config-sections.tsx Outdated
Comment thread web/frontend/src/components/config/config-page.tsx Outdated
Comment thread web/frontend/src/components/config/config-page.tsx Outdated
Comment thread web/frontend/src/components/config/config-sections.tsx
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 6, 2026 19:30
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Comment thread web/frontend/src/i18n/locales/en.json Outdated
Comment thread web/frontend/src/components/config/config-page.tsx Outdated
Comment thread web/frontend/src/components/config/config-page.tsx
Comment thread web/frontend/src/components/config/config-page.tsx Outdated
Comment thread web/frontend/src/i18n/locales/en.json Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Comment on lines +385 to +387
<SelectTrigger
aria-label={t("pages.config.mcp_server_discovery_mode")}
>
Comment on lines +46 to +58
function buildStringMapMergePatch(
next: Record<string, string>,
previous: Record<string, string>,
): Record<string, string | null> {
const patch: Record<string, string | null> = { ...next }

for (const key of Object.keys(previous)) {
if (!(key in next)) {
patch[key] = null
}
}

return patch
Comment on lines +444 to +447
const mcpServersPatch = Object.fromEntries([
...upsertServerEntries,
...removedServerEntries,
])
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.

4 participants