Skip to main content
Glama

qwen-web-research-mcp

用于网络研究的 MCP 服务器:给定一个 URL(或一个站点 + 要搜索的短语),它会获取完整页面内容,并使用本地 Qwen 模型(通过 Ollama)来提取/回答有关该页面的问题。长页面会自动拆分成多个块,并使用 map-reduce 策略进行分析,因此不会遗漏任何内容。

内容提取使用 trafilatura,它基于内容启发式规则(而非针对特定站点的 CSS 选择器)去除导航、广告和样板内容——因此即使站点布局发生变化,它也能继续工作。站点范围内的搜索使用 DuckDuckGo 的 site: 操作符,因此任何域名都可以工作,无需为每个站点编写自定义抓取代码。

工具

  • analyze_page(url, question) — 获取一个页面,并回答关于其完整内容的 question。

  • search_site_and_analyze(site, phrase, question, max_results) — 在 site 上查找包含 phrase 的页面,然后对每个匹配项运行 analyze_page 风格的提取。

  • list_available_models() — 列出所配置 Ollama 服务器上可用的 Qwen/Ollama 模型。

Related MCP server: searxng-mcp

要求

  • Python 3.11+

  • 一个 Ollama 服务器,且已拉取至少一个 Qwen 模型(默认为 qwen3:14b)

配置(环境变量)

变量

默认值

描述

QWEN_MODEL

qwen3:14b

要使用的 Ollama 模型

OLLAMA_PORT

11434

Ollama 服务器的端口

OLLAMA_HOST_IP

自动检测

覆盖 Ollama 主机 IP。如果未设置,则从 ip route show default 读取(在 WSL 内运行且 Ollama 运行在 Windows 主机上时很有用)

MCP_TRANSPORT

stdio

stdio、sse 或 streamable-http

MCP_HOST

127.0.0.1

绑定主机(仅 HTTP 传输)

MCP_PORT

8000

绑定端口(仅 HTTP 传输)

在本地运行

python3 -m venv .venv
.venv/bin/pip install -e .
.venv/bin/python -m qwen_web_research.server

使用 Docker 运行

docker build -t qwen-web-research-mcp .
docker run -p 8001:8000 \
  -e MCP_TRANSPORT=streamable-http \
  -e MCP_HOST=0.0.0.0 \
  -e OLLAMA_HOST_IP=host.docker.internal \
  qwen-web-research-mcp

或者作为 docker-compose.yml 中的一项服务,与其他工具(例如 Open WebUI)一起运行:

qwen-web-research:
  build: ./qwen-web-research-mcp
  ports:
    - "8001:8000"
  extra_hosts:
    - "host.docker.internal:host-gateway"
  environment:
    - MCP_TRANSPORT=streamable-http
    - MCP_HOST=0.0.0.0
    - MCP_PORT=8000
    - OLLAMA_HOST_IP=host.docker.internal
    - QWEN_MODEL=qwen3:14b

然后将你的 MCP 客户端(例如 Open WebUI 的 Tools/Connections 设置)指向 http://qwen-web-research:8000/mcp(Docker 内部网络)或 http://localhost:8001/mcp(从宿主机访问)。

Available Tools

3 tools
analyze_pageA

Fetch a web page, and use a local Qwen model to extract/answer question about its full content. Long pages are automatically split into chunks and analyzed piece by piece (map-reduce), so no content is skipped.

Reports progress while working (page fetch retries, per-chunk analysis), so a client that respects MCP progress notifications won't time out waiting on a long page -- this can take 30s-3min or more.

Args: url: The page to fetch and analyze. question: What to extract or answer about the page's content.

Inputs: url (required), question (required). Returns: result

list_available_modelsA

List the Qwen/Ollama models currently available on the local Ollama server.

Inputs: no named parameters. Returns: result

search_site_and_analyzeA

Search a specific site for pages/listings containing phrase, then run analyze_page-style extraction on each match to answer question.

Works on any site without site-specific scraping code: it uses DuckDuckGo's site: search to find matches, then trafilatura + Qwen to read and filter each page's content, so it keeps working even if the site's layout changes.

Each match takes roughly 30s-3min to fetch and analyze (more for long pages), so a large max_results will take proportionally long to return. Progress is reported per match and per chunk, for MCP clients that respect it.

Args: site: Domain to search within, e.g. "example.com". phrase: Exact phrase the publication/listing must contain. question: What information to extract from each matching page. max_results: Max number of matching pages to analyze (default 5).

Inputs: site (required), phrase (required), question (required), max_results. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.1/5.0

    Scored across 3 tools

    Disambiguation5/5

    The two analysis tools are cleanly separated by input: analyze_page targets one explicit URL, while search_site_and_analyze first discovers matching pages on a domain and then analyzes them. list_available_models is clearly a separate utility, so there is no real ambiguity between tools.

    Naming Consistency4/5

    All names use snake_case and lead with a verb, making the set predictable and readable. The main deviation is that search_site_and_analyze combines two actions into one name, while the other tools use a simpler verb_noun pattern.

    Tool Count4/5

    Three tools is small but defensible for a focused web-research helper: two research workflows plus a model discovery utility. It is slightly minimal, but there is no obvious bloat or unnecessary duplication.

    Completeness3/5

    The server covers single-page analysis and site-scoped search, which are useful core pieces. However, it lacks a general web-search flow or multi-site research capability, so open-ended web research requests would have no obvious tool to use.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      MCP server for local semantic search over web content, enabling AI agents to ingest, index, and query pages with hybrid retrieval and token budget control.
      4
      GPL 2.0
    • A
      license
      A
      quality
      B
      maintenance
      MCP server for private web search via self-hosted SearXNG with local reranking, full-page content fetching via Firecrawl, and optional Ollama-powered query expansion and summaries.
      7
      609 npm
      29
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      A self-contained web-research MCP server that lets local LLM agents search, fetch, and synthesize web content using tools like web_search, web_fetch, and web_research.
      2
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Semantic web search MCP server that navigates the live web using a cheap LLM and local embeddings, caching results for fast responses to similar queries without relying on general search engines.
      MIT