Skip to content

feat(mcp): add MCP runtime configuration#252

Open
GatewayJ wants to merge 21 commits into
OpenCSGs:mainfrom
GatewayJ:docs/openclaw-mcp-restart-plan
Open

feat(mcp): add MCP runtime configuration#252
GatewayJ wants to merge 21 commits into
OpenCSGs:mainfrom
GatewayJ:docs/openclaw-mcp-restart-plan

Conversation

@GatewayJ

@GatewayJ GatewayJ commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add shared MCP config support across agent profile and hub resource flows.
  • Wire MCP config generation into OpenClaw, PicoClaw, and Codex runtime adapters, including remote/stdio server payload handling.
  • Improve MCP runtime observability with tool progress handling and timeout behavior.
  • Add UI for managing MCP configs, including JSON highlighting and inline JSON validation for MCP resource config editing.
  • Document the OpenClaw MCP restart/configuration plan.

Validation

  • pnpm vitest run tests/components/HubDetailPane.test.tsx tests/models/mcpHub.test.ts tests/components/AgentActions.test.tsx
  • pnpm exec eslint web/app/src/pages/HubPage/components/HubDetailPane/HubDetailPane.tsx web/app/src/pages/HubPage/components/HubDetailPane/HubDetailPane.css web/app/src/models/mcpHub.ts web/app/src/shared/i18n/messages.ts tests/components/HubDetailPane.test.tsx tests/models/mcpHub.test.ts tests/components/AgentActions.test.tsx tests/setup.ts
  • pnpm exec prettier --check web/app/src/pages/HubPage/components/HubDetailPane/HubDetailPane.tsx web/app/src/pages/HubPage/components/HubDetailPane/HubDetailPane.css web/app/src/models/mcpHub.ts web/app/src/shared/i18n/messages.ts tests/components/HubDetailPane.test.tsx tests/models/mcpHub.test.ts tests/components/AgentActions.test.tsx tests/setup.ts package.json pnpm-lock.yaml
  • pnpm exec tsc --noEmit
  • git diff --check
  • GitHub check: validate-pr-message

Notes

  • Updated the PR head from the older fork branch state to the current local branch with --force-with-lease.
  • The previous merge conflict was resolved by updating the PR branch onto the current upstream main history.

@GatewayJ GatewayJ changed the title docs(openclaw): add MCP restart plan docs(mcp): add MCP restart plan Jun 26, 2026
@GatewayJ GatewayJ force-pushed the docs/openclaw-mcp-restart-plan branch from 9d759e2 to 225ab73 Compare July 2, 2026 07:08
@GatewayJ GatewayJ changed the title docs(mcp): add MCP restart plan feat(mcp): add MCP Jul 3, 2026
@GatewayJ GatewayJ force-pushed the docs/openclaw-mcp-restart-plan branch from 225ab73 to 0637e30 Compare July 3, 2026 06:20
@GatewayJ GatewayJ marked this pull request as ready for review July 3, 2026 15:20
@GatewayJ GatewayJ requested a review from RussellLuo July 3, 2026 15:20
@GatewayJ GatewayJ force-pushed the docs/openclaw-mcp-restart-plan branch from ee54079 to 2600e4a Compare July 6, 2026 15:38
Comment thread internal/agent/service.go
@GatewayJ GatewayJ force-pushed the docs/openclaw-mcp-restart-plan branch from 2600e4a to a357e9c Compare July 10, 2026 02:55
@GatewayJ GatewayJ changed the title feat(mcp): add MCP feat(mcp): add MCP runtime configuration Jul 10, 2026
@GatewayJ

Copy link
Copy Markdown
Collaborator Author

MCP light-theme screenshots

Captured from the local CSGClaw service at http://127.0.0.1:18080/ using Playwright MCP. For each screenshot I verified the page state before capture:

  • light theme: document.documentElement.dataset.theme === "light"
  • Chinese: document.documentElement.lang === "zh-CN"
  • English: document.documentElement.lang === "en"
Page 中文 / Light English / Light
Resources MCP Resources MCP zh light Resources MCP en light
Agent Profile MCP Agent Profile MCP zh light Agent Profile MCP en light

Comment thread internal/api/handler.go Outdated
Comment thread internal/agent/service_profiles.go
@GatewayJ GatewayJ force-pushed the docs/openclaw-mcp-restart-plan branch from fc7cd27 to 41b2037 Compare July 10, 2026 08:22
Comment thread internal/agent/model.go Outdated
@GatewayJ

Copy link
Copy Markdown
Collaborator Author

已完成本轮 review 修复并更新分支 docs/openclaw-mcp-restart-plan(commit: 30d5ca8)。

已处理内容:

  1. Create 路径也严格拒绝 legacy runtime_options.mcp(与 Update 一致),避免 create/update 行为分裂。
  2. 在 CreateAgentSpec.UnmarshalJSON 增加反序列化期校验,避免低层解析后流入服务层。
  3. 修正并补充 service 单测,覆盖:
    • runtime_options.mcp 触发显式 deprecation 错误;
    • MCPConfig(top-level mcp_config)正常创建。

影响评估:MCP 功能可用路径(mcp_config)未改动;仅对 deprecated 路径失败 fast fail。架构保持一致,清晰明确。

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.

3 participants