🌐 Web Browser MCP Server
镜像
📦 安装
# 使用 pip
pip install web-browser-mcp-server
# 或使用 uv(推荐)
uv pip install web-browser-mcp-server
🔌 Claude 桌面集成
将以下配置添加到您的 Claude 桌面配置中:
{
"mcpServers": {
"web-browser-mcp-server": {
"command": "uv",
"args": [
"--directory",
"/path/to/web-browser-mcp-server",
"run",
"web-browser-mcp-server"
],
"env": {
"REQUEST_TIMEOUT": "30"
}
}
}
}
💡 将
/path/to/web-browser-mcp-server
替换为您的实际安装路径
🎮 基本用法
# 基本网页抓取
result = browse_webpage(url="https://example.com")
# 使用选择器定位特定内容
result = browse_webpage(
url="https://example.com",
selectors={
"headlines": "h1, h2",
"main_content": "article.content",
"navigation": "nav a"
}
)
⚙️ 配置选项
主要环境变量:
变量 | 描述 | 默认值 |
---|---|---|
REQUEST_TIMEOUT | 请求超时时间(秒) | 30 |
USER_AGENT | 用户代理字符串 | Modern Chrome UA |
LOG_LEVEL | 日志级别 | "info" |
🔗 资源链接
- 查看完整文档获取更多信息
- 报告问题或贡献代码请访问 GitHub 仓库
由 MCP 社区制作 | MIT 许可证