此 MCP(模型上下文协议)服务器为 AI 助手提供了使用 You.com API 搜索网页、获取新闻和进行研究的功能。欢迎反馈。
特征
- 网页搜索:访问 You.com 的网页搜索功能
- 智能搜索:人工智能答案,提供引文支持
- 研究:针对学术疑问提供全面的、有引证依据的答案
- 新闻搜索:任何主题的最新新闻文章
先决条件
- Node.js(v16 或更高版本)
- npm 或 yarn
- You.com API 密钥(从api.you.com获取)
安装
- 克隆此存储库:
git clone https://github.com/jimbul/youcom-mcp.git
cd youcom-mcp
- 安装依赖项:
- 根据示例创建一个
.env
文件: - 将您的 You.com API 密钥添加到
.env
文件:YOU_API_KEY=your_actual_api_key_here
- 构建项目:
本地运行(可选)
您可以在本地运行服务器进行测试:
与 Claude 一起设置
要将此 MCP 服务器与 Claude(Anthropic Assistant)一起使用,您需要配置 Claude 以使用此服务器:
- 在 VS Code 中打开 Claude 扩展设置:
- 单击 VS Code 侧栏中的 Claude 图标
- 点击设置图标 (⚙️) 并选择“MCP 设置”
- 将以下配置添加到
mcpServers
部分:
"youcom-mcp": {
"autoApprove": [],
"disabled": false,
"command": "node",
"args": [
"/absolute/path/to/your/youcom-mcp/dist/index.js"
],
"env": {
"YOU_API_KEY": "your_actual_api_key_here"
},
"transportType": "stdio"
}
重要提示:
- 将
/absolute/path/to/your/youcom-mcp/dist/index.js
替换为系统上的实际路径 - 将
your_actual_api_key_here
替换为您的 You.com API 密钥
使用示例
配置完成后,您可以在与 Claude 的对话中直接使用 MCP 工具:
网页搜索
<use_mcp_tool>
<server_name>youcom-mcp</server_name>
<tool_name>web_search</tool_name>
<arguments>
{
"query": "latest research on renewable energy"
}
</arguments>
</use_mcp_tool>
智能搜索
<use_mcp_tool>
<server_name>youcom-mcp</server_name>
<tool_name>smart_search</tool_name>
<arguments>
{
"query": "how do quantum computers work",
"instructions": "explain in simple terms"
}
</arguments>
</use_mcp_tool>
研究
<use_mcp_tool>
<server_name>youcom-mcp</server_name>
<tool_name>research</tool_name>
<arguments>
{
"query": "effects of climate change on ocean ecosystems",
"instructions": "focus on coral reefs"
}
</arguments>
</use_mcp_tool>
新闻搜索
<use_mcp_tool>
<server_name>youcom-mcp</server_name>
<tool_name>news_search</tool_name>
<arguments>
{
"query": "latest developments in AI"
}
</arguments>
</use_mcp_tool>
贡献
欢迎贡献代码!欢迎提交 Pull 请求。
执照
麻省理工学院
致谢
该项目使用You.com API实现搜索功能。