本项目为 RAG Web Browser Actor 实现了 MCP 服务器。该 Actor 作为大型语言模型(LLMs)和 RAG 浏览器之间的桥梁,支持通过标准输入输出(stdin/stdout)进行通信,为相关应用提供了便捷的交互方式。
git clone git@github.com:apify/mcp-server-rag-web-browser.git
cd mcp-server-rag-web-browser
npm install
npm run build
打开 Claude Desktop 的配置文件:
~/Library/Application\ Support/Claude/claude_desktop_config.json%APPDATA%/Claude/claude_desktop_config.json在配置文件中添加以下内容:
"mcpServers": {
"rag-web-browser": {
"command": "npx",
"args": [
"@apify/mcp-server-rag-web-browser"
],
"env": {
"APIFY_TOKEN": "your-apify-api-token"
}
}
}
重启 Claude Desktop 并检查连接状态。
git clone git@github.com:apify/mcp-server-rag-web-browser.git
cd mcp-server-rag-web-browser
npm install
npm run build
使用 MCP 监视器 进行调试:
export APIFY_TOKEN=your-apify-api-token
npx @modelcontextprotocol/inspector npx -y @apify/mcp-server-rag-web-browser
使用 example_client_stdio.ts 脚本测试:
export APIFY_TOKEN=your-apify-api-token
node dist/example_client_stdio.js
直接调用 RAG Web Browser Actor:
export APIFY_TOKEN=your-apify-api-token
node dist/example_call_web_browser.js
npm run build
使用 MCP 监视器 进行调试:
export APIFY_TOKEN=your-apify-api-token
npx @modelcontextprotocol/inspector node dist/index.js
通过以上步骤,您可以成功配置和运行 MCP 服务器,并与 RAG Web Browser Actor 进行交互。