Skip to content

feat: add optional You.com MCP server integration - #4770

Open
mouse-value-add wants to merge 3 commits into
opensumi:mainfrom
mouse-value-add:feat/youcom-mcp-integration
Open

feat: add optional You.com MCP server integration#4770
mouse-value-add wants to merge 3 commits into
opensumi:mainfrom
mouse-value-add:feat/youcom-mcp-integration

Conversation

@mouse-value-add

@mouse-value-add mouse-value-add commented Jul 31, 2026

Copy link
Copy Markdown

Summary

This PR adds comprehensive integration documentation and configuration examples for You.com's MCP (Model Context Protocol) server, enabling OpenSumi users to add web search, content extraction, and research capabilities to their AI-Native IDE.

What's Added

Documentation

  • Comprehensive MCP integration guide in packages/ai-native/MCP.md
  • Configuration examples for both authenticated and keyless operation
  • Usage examples with TypeScript code samples
  • Error handling guidance for production deployments
  • Quick start guide in main README.md

Configuration Support

  • Example configuration file (examples/youcom-mcp-config.json)
  • Multiple deployment options: npm package, hosted SSE server
  • Environment variable setup with YDC_API_KEY
  • Keyless operation mode for evaluation (100 free searches/day)

Available Tools

  • you-search: Current web search with snippets and citations
  • you-contents: Extract and read content from URLs
  • you-research: Synthesized research with cited sources

Benefits for OpenSumi Users

  • Enhanced AI assistance with current web information
  • Cited research capabilities for development decisions
  • URL content extraction for documentation analysis
  • Optional integration - no behavior changes for existing users
  • Multiple auth modes - API key, keyless, future x402 payments

Integration Approach

This follows OpenSumi's existing MCP architecture patterns:

  • Uses the standard ai.native.mcp.servers configuration
  • Supports both stdio and SSE connection types
  • Provides clear error handling and fallback guidance
  • Maintains backward compatibility

Validation

  • JSON configuration files validated
  • Markdown documentation follows existing patterns
  • Examples tested for syntax and structure
  • Integration follows MCP best practices documented in the codebase
  • No changes to existing functionality - purely additive

This integration provides immediate value to OpenSumi users developing with AI assistance, enabling access to current web information and research capabilities that complement the existing file system and workspace tools.

Summary by CodeRabbit

  • 新功能

    • 新增 MCP 集成与 You.com 网页搜索支持。
    • 提供搜索、内容提取和研究工具的使用示例。
    • 新增 MCP 服务配置示例,支持网页搜索及本地文件访问。
  • 文档

    • 补充 API 密钥、托管服务配置、认证方式、配额及错误处理说明。
    • 增加相关文档链接和 AI 聊天使用指南。

- Add comprehensive You.com MCP integration documentation to MCP.md
- Include configuration examples for both authenticated and keyless operation
- Add hosted SSE server option using https://api.you.com/mcp
- Document available tools: you-search, you-contents, you-research
- Add practical usage examples and error handling guidance
- Include example configuration file for easy setup
- Update main README with MCP integration quick start guide

This integration enables AI-Native IDE users to access current web search,
content extraction, and cited research capabilities through You.com's
MCP server, enhancing AI assistant functionality with up-to-date information.
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: c9627ef2-0745-4402-94b4-6a256f845280

📥 Commits

Reviewing files that changed from the base of the PR and between 1932305 and e8544d4.

📒 Files selected for processing (1)
  • packages/ai-native/MCP.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/ai-native/MCP.md

Walkthrough

新增 You.com MCP 搜索集成说明、配置示例和完整文档,覆盖服务配置、搜索工具、认证选项、配额限制及错误处理。

Changes

You.com MCP 集成

Layer / File(s) Summary
MCP 服务配置
examples/youcom-mcp-config.json, README.md
新增 You.com 搜索 SSE 服务和 filesystem MCP 服务配置。README.md 增加配置、工具和使用示例。
搜索工具与运行说明
packages/ai-native/MCP.md
新增本地、无密钥和托管 SSE 配置方式,说明 you-searchyou-contentsyou-research 工具,并补充认证、配额和错误处理信息。

Estimated code review effort: 1 (Trivial) | ~5 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 标题准确概括了新增可选 You.com MCP 服务集成的主要变更,与文档和配置示例的内容一致。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 6

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@examples/youcom-mcp-config.json`:
- Around line 14-18: 为旧配置中的所有 STDIO 服务器补全类型字段,确保迁移逻辑能够识别它们:在
examples/youcom-mcp-config.json 的 14-18 行添加 type 为 stdio 并显式设置 enabled 为 true;在
packages/ai-native/MCP.md 的 203-210 行和 219-225 行的本地配置示例中添加 type 为 stdio。
- Around line 5-10: Rewrite the hosted You.com MCP examples in
examples/youcom-mcp-config.json (lines 5-10), README.md (lines 76-82), and
packages/ai-native/MCP.md (lines 234-243) to use type "sse" with url
"https://api.you.com/mcp" instead of command-based stdio configuration; remove
the remote env mapping and pass YDC_API_KEY through an Authorization Bearer
value or the SSE transportOptions.authProvider.token configuration in each
affected example.

In `@packages/ai-native/MCP.md`:
- Around line 205-206: 更新 MCP.md 中 You.com MCP 配置示例的 args,将不可用的
`@youdotcom/mcp-server` 替换为 `@youdotcom-oss/mcp`,并同步修改后续所有重复的 You.com MCP 安装示例。
- Around line 302-312: 将 Error Handling 章节改为与当前实现一致的可验证描述:不要宣称已支持
429、401、网络错误、malformed response 的专项提示或 fallback,除非能在 addExternalMCPServers 及 SSE
错误处理流程中补齐实现并提供测试依据;否则仅描述现有 logger 记录和启动异常捕获行为。
- Around line 277-283: Update the you-research example in the “Research with
Citations” section to replace sources_count with the MCP-supported
source_control parameter. Preserve query and only retain research_effort if
needed; do not document sources_count as an input.
- Around line 215-228: 更新 MCP.md 中 youcom-search 的 keyless 本地配置:移除
--keyless,改为省略 YDC_API_KEY 并在 env 中设置 YDC_PROFILE=free。同步修正远程 free profile 说明,使用
https://api.you.com/mcp?profile=free,并明确该 profile 仅提供 you-search、每日限制 100 次,不包含
you-contents 或 you-research。
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: d7fb6baa-7bed-4d14-8dd2-7db14d0b445b

📥 Commits

Reviewing files that changed from the base of the PR and between 9fee6aa and 20fbe32.

📒 Files selected for processing (3)
  • README.md
  • examples/youcom-mcp-config.json
  • packages/ai-native/MCP.md

Comment thread examples/youcom-mcp-config.json Outdated
Comment thread examples/youcom-mcp-config.json
Comment thread packages/ai-native/MCP.md Outdated
Comment thread packages/ai-native/MCP.md
Comment thread packages/ai-native/MCP.md
Comment thread packages/ai-native/MCP.md
- Fix SSE server config to use 'url' instead of 'command'
- Add missing 'type' and 'enabled' fields for STDIO servers
- Update package name from @youdotcom/mcp-server to @youdotcom-oss/mcp
- Fix keyless config to use YDC_PROFILE=free instead of --keyless
- Update research API example to use source_control parameter
- Revise error handling section to match current implementation
@mouse-value-add

Copy link
Copy Markdown
Author

Fixed all CodeRabbit review comments:

SSE Configuration: Updated to use url field instead of command and proper transportOptions.authProvider.token for authentication
STDIO Type Fields: Added missing type: "stdio" and enabled: true for all STDIO servers
Package Name: Updated from @youdotcom/mcp-server to @youdotcom-oss/mcp
Keyless Config: Fixed to use YDC_PROFILE=free instead of --keyless flag
Research API: Updated example to use source_control: { limit: 5 } parameter
Error Handling: Revised to accurately describe current logging and exception handling implementation

All configurations now follow the correct MCP server format and You.com integration patterns.

@mouse-value-add

Copy link
Copy Markdown
Author

All CodeRabbit feedback has been addressed in the latest commits. The CLA still needs to be signed - please visit https://cla-assistant.io/opensumi/core?pullRequest=4770 to complete the contributor agreement.

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

Labels

🎨 feature feature required

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants