Skip to content
Conduit

mcp server

mpget

CLI & MCP server for searching WeChat articles via Sogou. Agent-ready with structured JSON output.

ZouZhao321/mpgetcommunitylistedunreviewed

Set up

Runs on your computer. Pick your agent and operating system.

Before you start

  • Node.js 20 or newer
~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "mpget": {
      "command": "npx",
      "args": [
        "-y",
        "mpget"
      ]
    }
  }
}

same format Cursor, GitHub Copilot CLI, Junie, JetBrains AI Assistant, Augment (Auggie CLI), Factory Droid, Kiro, Devin CLI +12

Values in angle brackets are placeholders. Restart Claude Desktop after editing its config.Claude Desktop docs

README

synced Oct 27, 2026

中文

mpget

CLI tool and MCP server for searching and fetching WeChat Official Account articles via Sogou.

Designed for agent integration — structured JSON output, MCP server support, and one-command skill injection for Claude Code.

Features

  • CLI + MCP dual interface — use as a command-line tool or as an MCP server for AI agents
  • Agent Skill — mpget init injects a skill file into .claude/skills/ with version sync
  • Multi-page search — automatic pagination with configurable max pages and rate limiting
  • Article content extraction — fetches WeChat article body as Markdown (headings, lists, code blocks, images, quotes, tables)
  • Album article listing — list all articles in an official account's album (with real mp.weixin.qq.com links)
  • Structured JSON output — all results to stdout, errors to stderr with typed exit codes

Install

npm install -g mpget

Requires Node.js >= 18.

Usage

CLI

# Search articles
mpget search "key"

# Search with pagination
mpget search "key" -p 2

# Multi-page search (up to 5 pages, 1s interval)
mpget search "key" -a -m 5

# Fetch article content
mpget content "https://mp.weixin.qq.com/s/xxx"

# List articles in an account's album (needs __biz and album_id from an article page)
mpget album "MzkxMTY4NTAyNQ==" "4371775694981152789" -c 10

# Fetch the whole album
mpget album "MzkxMTY4NTAyNQ==" "4371775694981152789" --all

Search options:

OptionDescriptionDefault
-p, --page <n>Page number1
-a, --allFetch all pagesfalse
-m, --max <n>Max pages when --all10
--no-resolveSkip resolving real mp.weixin.qq.com linksfalse

MCP Server

mpget mcp

Starts a stdio-based MCP server exposing three tools:

  • search — query, page, all, maxPages, resolve (default: resolve real links)
  • album — biz, albumId, count, beginMsgid, beginItemidx
  • content — url, referer

Compatible with any MCP-capable agent (Claude, Cursor, etc.).

Agent Skill (Claude Code)

mpget init

Injects a skill template into .claude/skills/mpget.md. The skill includes version sync — the agent checks mpget --version against the skill header on each use.

Output

All commands output JSON to stdout. Errors go to stderr as structured JSON.

Search result:

{
  "results": [
    {
      "title": "Article Title",
      "link": "https://weixin.sogou.com/link?url=...",
      "realUrl": "https://mp.weixin.qq.com/s?src=11&...",
      "publishTime": "2025-01-01",
      "account": "Account Name"
    }
  ],
  "total": 10,
  "page": 1
}

Content result:

{
  "content": "### 小标题\n\n正文段落,**加粗**文字。\n\n![示意图](https://mmbiz.qpic.cn/mmbiz_png/abc/0?wx_fmt=png)\n\n- 条目一\n- 条目二"
}

Exit codes:

CodeMeaning
0Success
1Anti-spider triggered or network error
2Invalid arguments

Tech Stack

License

LGPL-3.0

↑↓ navigate openesc close