Skip to content

feat: add optional you.com search integration - #150

Open
mouse-value-add wants to merge 1 commit into
limecloud:mainfrom
mouse-value-add:feat/youcom-search-integration
Open

mouse-value-add wants to merge 1 commit into
limecloud:mainfrom
mouse-value-add:feat/youcom-search-integration

Conversation

@mouse-value-add

Copy link
Copy Markdown

变更摘要

在 MCP 配置页的预设列表中新增 You.com 条目, 为 web 搜索与内容提取场景提供一个免鉴权/开箱即用的远程 MCP 选项:

  • MCP_PAGE_PRESETS 增加 youcom 预设: streamable_http 传输, URL https://api.you.com/mcp?profile=free, tool_timeout: 60 -- 完全沿用现有 Context7 预设的结构
  • 该 profile 免鉴权, 选中预设并保存后即可启动, 无需任何 API key; 暴露 you-search / you-contents 两个工具
  • 需要完整能力时, 用户可以把 URL 换成 https://api.you.com/mcp 并在连接配置里填 bearer_token_env_var: "YDC_API_KEY" (streamable HTTP 配置原生支持该字段)
  • zh-CN / zh-TW / en-US / ja-JP / ko-KR 五个 locale 的 settings.json 同步新增预设文案
  • McpPage.test.tsx 增加一条预设创建回归测试 (对照 Context7 测试的写法)

纯增量改动: 预设只有被用户显式选中并保存才会生效, 默认行为与现有服务器列表完全不变, 没有引入任何新依赖

i18n 影响

  • 有用户可见文案变化, 已在 PR 描述中列出 namespace

新增 / 变更 namespace

  • settings (settings.mcpPage.preset.youcom.name / .description, 五个 locale 同步)

术语确认

  • 已对照 internal/roadmap/i18n/glossary.md ("You.com" 作为产品专名保持不译, 描述文案与 context7 预设句式一致)

验证

  • npm run i18n:check -- 100% coverage, missing=0 extra=0
  • npx vitest run src/components/mcp/McpPage.test.tsx -- 6/6 通过 (含新增用例)
  • npx vitest run src/components/mcp/mcpPageModel.unit.test.ts -- 5/5 通过
  • npx eslint src/components/mcp/mcpPageModel.ts src/components/mcp/McpPage.test.tsx --max-warnings 0 -- 通过
  • tsc --noEmit --project tsconfig.renderer.json -- 通过
  • 直连验证: initialize + tools/list 对 https://api.you.com/mcp?profile=free 走 streamable HTTP 均正常返回 (serverInfo: You.com 4.0.0, 工具含 you-search)
  • npm run verify:local -- 本地未跑全量门禁; 改动面限于 mcp 组件 + locale 资源, 如需要我可以补跑

架构图确认

  • 本次不属于重大架构变更

非重大原因: 仅在前端 MCP 预设目录追加一个条目, 不触碰 App Server / 协议 schema / Rust 侧或运行时行为

备注

You.com 也提供 agent skills 与插件形式的分发 (npx skills add youdotcom-oss/agent-skills), 但本 PR 刻意保持最小改动, 只走 Lime 已有的 MCP 预设机制. 如果维护者更希望预设直接指向鉴权端点 (https://api.you.com/mcp + bearer_token_env_var), 我可以调整预设默认值.

Tracking: youdotcom-oss/integration-tracking#307

在 MCP 配置页预设中新增 You.com 条目(streamable HTTP,免鉴权 free profile),
沿用 Context7 预设的既有结构,为 web_search / web_fetch 场景提供开箱即用的
远程 MCP 选项。默认行为不变,需用户显式选择预设并保存。

- MCP_PAGE_PRESETS 增加 youcom 预设(https://api.you.com/mcp?profile=free)
- zh-CN / zh-TW / en-US / ja-JP / ko-KR settings.json 同步新增文案
- McpPage.test.tsx 增加预设创建回归测试

This branch has not been deployed

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

Labels

None yet

1 participant