微信公众号内容搜索工具 (Weixin Search MCP)

by fancyboi999

基于 MCP 的工具,用于通过搜狗微信搜索界面搜索和检索微信公众号文章。支持关键词搜索、真实链接提取、全文内容提取以及批量获取多篇文章。

Search & researchstdioCommunity

Repository-wide counts · Cached 2026-03-09

Overview

The 微信公众号内容搜索工具 (Weixin Search MCP) MCP server is a publicly available project. Review the upstream repository for installation instructions, supported tools, compatibility, permissions, and current maintenance status.

Configuration

Configuration, transport, authentication, and runtime requirements vary by project. Open the repository before connecting and use the smallest set of credentials and permissions required.

Open the 微信公众号内容搜索工具 (Weixin Search MCP) repository to read the latest documentation.

KEEP EXPLORING

Compare source, connection, and authentication details before choosing an implementation.

View the complete category

Exa MCP 服务器

exa-labs

Community

一个模型上下文协议(MCP)服务器,允许像Claude这样的AI助手使用Exa AI Search API进行实时网页搜索、学术论文搜索、LinkedIn搜索等。需要通过环境变量EXA_API_KEY配置的Exa API密钥。

Tavily MCP 服务器

tavily-ai

Community

Tavily MCP 服务器是一个网页数据管理平台,提供搜索、提取、映射和爬取等工具。您可以: - **网页搜索**:使用实时网页搜索查找任何主题的最新信息 - **内容提取**:以 markdown 或文本格式从 URL 获取原始页面内容 - **网站爬取**:从 URL 开始爬取网站,提取内容并可配置深度 - **站点映射**:通过列出从基础 URL 开始的 URL 来映射网站结构 - **研究**:通过收集和整合多个来源的信息进行全面研究

Perplexity API Platform MCP Server

perplexityai

Community

The official MCP server implementation for the Perplexity API Platform, providing AI assistants with real-time web search, reasoning, and research capabilities through Sonar models and the Search API. Requires setting the PERPLEXITY_API_KEY environment variable for API access. Optional environment variables include PERPLEXITY_TIMEOUT_MS for request timeout and PERPLEXITY_PROXY for proxy configuration.

Perplexity Ask MCP Server

ppl-ai

Community

An MCP server implementation that integrates the Sonar API to provide Claude with unparalleled real-time, web-wide research. Requires setting the Sonar API key via the environment variable PERPLEXITY_API_KEY.

FROM THE SOURCE

Repository README

Build-time snapshot · Retrieved 2026-10-05

View original

微信公众号内容搜索工具 (Weixin Search MCP)

这是一个基于 MCP (Model Context Protocol) 的工具,用于搜索和获取微信公众号文章内容。通过搜狗微信搜索接口,可以方便地获取公众号文章并提取内容。

weixin_search_mcp 演示
▶️ 点击查看带打字声 + 配乐的高清 MP4(45s)

功能特点

  • 通过关键词在搜狗微信搜索中查找公众号文章
  • 自动获取文章的真实链接(从搜狗跳转链接转为微信原始链接)
  • 提取文章的完整正文内容
  • 支持批量获取多篇文章

安装方法

环境要求

  • Python 3.12 或更高版本
  • uv 包管理工具

安装步骤

使用 uv 创建虚拟环境并安装:

# 创建虚拟环境
uv venv

# 激活虚拟环境
source .venv/bin/activate  # Linux/Mac
# 或者在Windows上:
# .venv\Scripts\activate

# 安装项目
uv pip install -e .

使用方法

启动服务

启动HTTP服务器:

weixin_search_mcp --transport http --port 8809 --host 0.0.0.0

或者使用标准输入/输出模式(用于与其他应用集成):

weixin_search_mcp --transport stdio

通过 PyPI / uvx 直接运行:

uvx --from weixin-search-mcp weixin_search_mcp --transport stdio

4. 配置MCP服务

有两种方式可以配置和启动MCP服务:

方式一:使用stdio协议(直接连接)

在Claude配置中添加以下内容:

{
    "mcpServers": {
        "weixin_search_mcp": {
            "command": "uvx",
            "args": ["--from", "weixin-search-mcp", "weixin_search_mcp", "--transport", "stdio"]
        }
    }
}
方式二:使用HTTP协议
  1. 启动HTTP服务:
uvx --from weixin-search-mcp weixin_search_mcp --transport http --port 8809
  1. 在Claude配置中添加以下内容:
{
    "mcpServers": {
        "weixin_search_mcp": {
            "type": "http",
            "url": "http://localhost:8809/mcp"
        }
    }
}

工具使用说明

本项目提供了以下工具来搜索和获取微信公众号内容:

微信搜索工具

  • weixin_search: 在搜狗微信搜索中搜索指定关键词并返回结果列表
    • 参数:
      • query - 搜索关键词
      • page - 可选,页码,默认 1
    • 返回: 包含标题、链接、真实URL、发布时间、页码的文章列表

多页搜索工具

  • weixin_search_all: 自动翻页搜索多页微信公众号文章
    • 参数:
      • query - 搜索关键词
      • max_pages - 可选,最大页数,默认 10
    • 返回: 聚合后的多页结果列表

内容获取工具

  • get_weixin_article_content: 获取微信公众号文章的正文内容
    • 参数:
      • real_url - 真实微信公众号文章链接
      • referer - 可选,请求来源,通常为weixin_search返回的链接
    • 返回: 文章正文内容

使用示例

  1. 搜索关键词相关的微信公众号文章:
results = weixin_search("人工智能")

按指定页搜索:

results = weixin_search("人工智能", page=2)

自动翻页抓取:

all_results = weixin_search_all("人工智能", max_pages=3)
  1. 获取文章内容:
article_content = get_weixin_article_content(real_url="https://mp.weixin.qq.com/...", referer="https://weixin.sogou.com/...")

注意事项

  • 该工具依赖于搜狗微信搜索接口,如果接口变更可能会影响工具功能
  • 请合理控制请求频率,避免被搜狗或微信官方限制访问
  • 获取的内容仅供学习研究使用,请遵守相关法律法规

许可证

MIT