网络搜索与内容提取服务

MCP WebScout是一个提供DuckDuckGo网络搜索和基于LLM的智能内容提取的服务,适用于需要高级网络数据抓取和分析的场景。

  • by rainyuniverse
  • Python
  • 本地部署
  • 2 星标
  • 更新于
在 GitHub 查看 rainyuniverse/mcp-webscout

使用说明

MCP WebScout

模型上下文协议(MCP)服务器,提供网络搜索(DuckDuckGo)和基于LLM的分析的智能内容提取。

特性

  • 搜索:使用DuckDuckGo搜索网络
  • 获取:使用Crawl4AI和LLM提取进行高级网络提取

系统要求

要求 版本 注释
Python >=3.10 所需的运行时环境
pip latest 包管理器(Python附带)
Playwright 最新版本 Crawl4AI要求浏览器自动化
DeepSeek API密钥 - LLM提取模式所需
Proxy(可选) - 中国大陆用户需要

Python依赖关系(14个包)

包装 版本 用途
mcp >=1.0.0 mcp协议实现
duckduckgo-search >=3.0.0 duckduckgo搜索API
请求 >=2.32.0 HTTP请求
beautifulsoup4 >=4.12.0 HTML解析
openai >=1.3.0 深度搜索的openai API客户端
crawl4ai >=0.5.0 高级网页抓取

快速开始

通过5个步骤开始:

1.克隆和设置环境

git clone <repository>
cd mcp-webscout
python -m venv .venv

在Windows上:

.venv\Scripts\activate

在macOS/Linux上:

source .venv/bin/activate

2.安装依赖项

pip install -e ".[dev]"

3.安装Playwright浏览器

playwright install chromium

4.配置环境变量

cp .env.example .env

编辑 .env 并添加您的配置:

# Required for LLM extraction
DEEPSEEK_API_KEY=sk-your-actual-key-here

# Required for mainland China users
PROXY_URL=http://127.0.0.1:7890
USE_PROXY=true

5.验证安装

# Run tests
pytest tests/ -v

# Test the server
python -m mcp_webscout --help

详细配置

有关详细的环境设置说明,请参阅 ENV_SETUP.md.

用法

作为一个命令

mcp-webscout

作为Python模块

python -m mcp_webscout

使用克劳德桌面

添加到您的 claude_desktop_config.json:

基本配置

{
  "mcpServers": {
    "webscout": {
      "command": "mcp-webscout"
    }
  }
}

带环境变量(推荐)

{
  "mcpServers": {
    "webscout": {
      "command": "mcp-webscout",
      "env": {
        "DEEPSEEK_API_KEY": "sk-your-key-here",
        "PROXY_URL": "http://127.0.0.1:7890",
        "USE_PROXY": "true",
        "DEFAULT_MAX_LENGTH": "5000",
        "PYTHONUTF8": "1"
      }
    }
  }
}

Windows配置

{
  "mcpServers": {
    "webscout": {
      "command": "python",
      "args": ["-m", "mcp_webscout"],
      "env": {
        "DEEPSEEK_API_KEY": "sk-your-key-here",
        "PROXY_URL": "http://127.0.0.1:7890",
        "USE_PROXY": "true",
        "PYTHONUTF8": "1"
      }
    }
  }
}

工具

搜索

使用DuckDuckGo搜索网络。

参数:

名称 类型 必填 描述
query string Yes 搜索查询
max_results 整数 否 最大结果(1-10,默认值:5)

退货:

带有标题、URL和片段的格式化搜索结果。

例子:

{
  "query": "Python programming",
  "max_results": 3
}

获取

使用Crawl4AI和LLM提取进行高级网络提取。

参数:

名称 类型 必填 描述
url string 是 要获取的url
mode string No 提取模式:简单,llm(默认:简单)
prompt string No LLM模式的自定义提取提示
max_length 整数 否 最大字符数(默认值:5000)
use_proxy boolean 否 使用代理(默认值:true)

退货:

提取和可选提取的内容。