Crawl-MCP Server logo

Crawl-MCP Server

Community
wutongci

完整的微信文章抓取MCP服务器 - 基于Model Context Protocol (MCP)的智能网页抓取工具,专为Cursor IDE和AI工具设计。

Publisherwutongci
Repositorycrawl-mcp
LanguageTypeScript
Forks
7
Stars
38
Available tools
1
Transport typestdio
Categories
LicenseMIT
Links
  • Connect tools to AI workflows

    Crawl-MCP Server exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 1 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    38 stars and 7 forks from the linked repository.

Crawl-MCP Server

npm version License: MIT Node.js Version

🚀 真正能下载图片的微信文章抓取工具 - 基于Model Context Protocol (MCP)的智能抓取服务器,专为Cursor IDE和AI工具设计。

🎉 v1.1.0 重大升级:从"指令生成器"升级为"真正下载工具",支持完整的图片本地化!

✨ 主要特性

🎯 核心功能 (v1.1.0)

  • 真正的图片下载: ✅ 实际下载微信图片,不只是生成指令
  • 双模式设计: 指令模式(学习用)+ 自动模式(效率用)
  • 完整本地化: 图片下载 + 路径更新 + 离线可用的Markdown文档
  • 智能处理: 微信域名识别、正确Headers、并发控制、重试机制

🔧 技术特色 (v1.1.0)

  • 专业图片处理:
    • 🎯 微信图片域名识别(mmbiz.qpic.cn)
    • 🎯 正确的HTTP Headers(Referer, User-Agent)
    • 🎯 wx_fmt参数处理(jpeg, png, gif)
    • 🎯 并发控制(同时下载3张)+ 重试机制
  • MCP协议支持: 完整的Model Context Protocol实现
  • 模块化架构: ImageDownloader + ArticleProcessor + CrawlTool
  • TypeScript支持: 完整的类型定义和编译支持
  • Node.js 18+: 使用内置fetch API,无额外HTTP库依赖

🎮 Cursor IDE集成

  • 一键安装: npx crawl-mcp-server@1.1.0
  • 开箱即用: 无需复杂配置,直接可用
  • AI工具支持: 在Cursor中直接使用AI进行完整抓取
  • 工具自动识别: Agent自动调用相关抓取工具

🚀 快速开始

💻 安装使用

方法1: npx直接运行(推荐)

bash
# 使用最新的v1.1.0版本
npx crawl-mcp-server@1.1.0

方法2: 全局安装

bash
npm install -g crawl-mcp-server@1.1.0
crawl-mcp-server

方法3: 项目本地安装

bash
npm install crawl-mcp-server@1.1.0
npx crawl-mcp-server

💡 提示: 推荐使用 @1.1.0 版本,确保获得最新的图片下载功能

🔌 Cursor IDE配置

  1. 创建MCP配置文件 在项目根目录创建 .cursor/mcp.json:

    json
    {
      "mcpServers": {
        "crawl-mcp": {
          "command": "npx",
          "args": ["-y", "crawl-mcp-server@1.1.0"],
          "env": {
            "NODE_ENV": "production"
          }
        }
      }
    }
  2. 重启Cursor 重启Cursor让配置生效

  3. 开始使用 在Cursor中直接使用AI助手进行网页抓取:

    指令模式(学习推荐):

    请使用crawl mcp抓取这篇微信文章:https://mp.weixin.qq.com/s/xxxxx

    自动模式(效率优先):

    我已经获取了HTML内容,请使用crawl mcp自动模式处理并下载图片

🛠️ MCP工具说明

1. crawl_wechat_article

单篇文章抓取工具

参数:

  • url (必需): 微信文章链接
  • outputFormat (可选): 输出格式 (markdown/json/html,默认: markdown)
  • strategy (可选): 抓取策略 (basic/conservative/fast,默认: basic)
  • includeImages (可选): 是否包含图片 (默认: true)

示例:

json
{
  "url": "https://mp.weixin.qq.com/s/example123",
  "outputFormat": "markdown",
  "strategy": "basic",
  "includeImages": true
}

2. crawl_wechat_batch

批量文章抓取工具

参数:

  • urls (必需): 文章链接数组
  • outputFormat (可选): 输出格式
  • strategy (可选): 抓取策略
  • maxConcurrent (可选): 最大并发数 (默认: 3)

示例:

json
{
  "urls": [
    "https://mp.weixin.qq.com/s/example1",
    "https://mp.weixin.qq.com/s/example2"
  ],
  "outputFormat": "markdown",
  "maxConcurrent": 2
}

3. crawl_get_status

状态查询工具

参数:

  • sessionId (可选): 会话ID,不提供则返回所有会话状态

⚙️ 抓取策略说明

策略速度稳定性适用场景
fast⚡ 最快🔸 一般网络良好,页面简单
basic🚀 中等⭐ 平衡大多数情况(推荐)
conservative🐌 较慢💎 最稳定网络不稳定,复杂页面

📦 项目结构

crawl-mcp/
├── src/
│   ├── core/              # 核心模块
│   │   ├── CrawlMCPServer.ts    # MCP服务器
│   │   ├── CallOrchestrator.ts  # 调用编排器
│   │   └── StateManager.ts     # 状态管理
│   ├── adapters/          # 输出适配器
│   │   ├── MCPOutputAdapter.ts  # MCP格式转换
│   │   └── FileOutputAdapter.ts # 文件输出
│   ├── clients/           # 客户端
│   │   └── PlaywrightMCPClient.ts # Playwright客户端
│   ├── processors/        # 内容处理器
│   │   ├── ContentExtractor.ts  # 内容提取
│   │   ├── MarkdownConverter.ts # Markdown转换
│   │   └── ImageProcessor.ts    # 图片处理
│   ├── tools/             # MCP工具定义
│   ├── types/             # TypeScript类型
│   └── utils/             # 工具函数
├── docs/                  # 文档
├── examples/              # 示例代码
└── tests/                 # 测试文件

🧪 开发和测试

安装依赖

bash
pnpm install

构建项目

bash
pnpm build

运行测试

bash
pnpm test

本地开发

bash
pnpm dev

📊 测试覆盖

  • ✅ 25个测试 全部通过
  • 🧪 单元测试: 核心组件功能验证
  • 🔗 集成测试: MCP协议完整性测试
  • 📋 配置测试: 所有配置文件验证

🤝 贡献指南

  1. Fork 这个仓库
  2. 创建你的特性分支 (git checkout -b feature/AmazingFeature)
  3. 提交你的更改 (git commit -m 'Add some AmazingFeature')
  4. 推送到分支 (git push origin feature/AmazingFeature)
  5. 开启一个 Pull Request

📄 许可证

本项目采用 MIT 许可证 - 查看 LICENSE 文件了解详情。

🔗 相关链接

📞 支持

如果你遇到任何问题或有建议,请:


⭐ 如果这个项目对你有帮助,请给我们一个星标!

Made with ❤️ by wutongci

Installation

TypingMind
Prerequisites:

Node.js 18+

{
  "mcpServers": {
    "wutongci-crawl-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "crawl-mcp"
      ]
    }
  }
}

Available Tools

  • crawl_wechat_article

    🕷️ [微信文章抓取器] 智能抓取单篇微信公众号文章 - 返回抓取指令给Cursor Agent,让Agent调用playwright-mcp执行实际抓取。

Use Crawl-MCP Server MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once Crawl-MCP Server is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add Crawl-MCP Server as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the Crawl-MCP Server MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "wutongci-crawl-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "crawl-mcp"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the Crawl-MCP Server MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the Crawl-MCP Server MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use Crawl-MCP Server to help me with this task?
Crawl-MCP Server
Sure. I read it.
Here is what I found using Crawl-MCP Server.

Frequently asked questions

What is the Crawl-MCP Server MCP server used for?

Crawl-MCP Server is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use Crawl-MCP Server MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use Crawl-MCP Server with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use Crawl-MCP Server MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With Crawl-MCP Server connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect Crawl-MCP Server MCP to TypingMind?

Crawl-MCP Server runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does Crawl-MCP Server MCP provide in TypingMind?

Crawl-MCP Server exposes 1 MCP tools that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use Crawl-MCP Server MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If Crawl-MCP Server requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇