npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@langgpt/weixin-mcp-server

v1.1.2

Published

一站式微信公众号内容抓取、生成与多平台内容迁移的智能中台,基于 Model Context Protocol (MCP) 实现内容自动化流转

Readme

微信公众号 MCP Server

weixin-mcp-server —— 一站式微信公众号内容抓取、生成与多平台内容迁移的智能中台,基于 Model Context Protocol (MCP) 实现内容自动化流转。

✨ 核心功能

🕷️ 内容抓取与搜索

  • 网页内容抓取 - 智能提取微信公众号文章、知乎等平台内容
  • Web信息搜索 - 基于关键词的网页信息检索
  • 主要内容提取 - AI智能过滤广告和无关信息,提取核心内容

📝 内容生成与创作

  • 微信公众号文章生成 - 根据主题自动创作完整文章
  • 小红书文案创作 - 生成符合平台特色的种草文案
  • 多风格适配 - 支持专业、休闲、叙事、教程、新闻等多种写作风格

🔄 跨平台内容转换

  • 公众号 → 小红书 - 将长文转换为适合小红书的短文案
  • 网页内容 → 公众号文章 - 将网页内容改写为公众号文章
  • 任意内容 → 小红书文案 - 通用内容到小红书文案的智能转换

🛠️ 辅助工具

  • 内容摘要 - 多种格式的智能摘要生成
  • 配图生成 - 根据内容自动生成配图
  • 个性化定制 - 支持风格、长度、目标受众等参数调整

🚀 快速开始

安装

# 通过 npx 直接使用
npx @langgpt/weixin-mcp-server

# 或全局安装
npm install -g @langgpt/weixin-mcp-server

环境配置

  1. 获取 SiliconFlow API Key

  2. 设置环境变量

    export SILICONFLOW_API_KEY="your_api_key_here"

MCP 客户端配置

在 Claude Desktop 中配置使用:

macOS/Linux

{
  "mcpServers": {
    "weixin-mcp-server": {
      "command": "npx",
      "args": ["-y", "@langgpt/weixin-mcp-server@latest"],
      "env": {
        "SILICONFLOW_API_KEY": "your_api_key_here"
      }
    }
  }
}

Windows

{
  "mcpServers": {
    "weixin-mcp-server": {
      "command": "npx",
      "args": ["-y", "@langgpt/weixin-mcp-server@latest"],
      "env": {
        "SILICONFLOW_API_KEY": "your_api_key_here"
      }
    }
  }
}

🛠️ 工具列表

| 工具名称 | 功能描述 | 典型用例 | |---------|---------|---------| | crawl_url | 抓取网页内容 | 获取微信公众号文章、知乎回答等 | | search_web | 搜索网页信息 | 查找相关资料和素材 | | generate_redbook_content | 生成小红书文案 | 创作种草文案、生活分享 | | generate_wechat_article | 生成微信公众号文章 | 根据主题创作完整文章 | | rewrite_to_redbook | 任意内容转小红书 | 将长文改写为小红书格式 | | wechat_article_to_redbook | 公众号转小红书 | 公众号文章改写为小红书文案 | | rewrite_to_wechat_article | 网页转公众号文章 | 将网页内容改写为公众号文章 | | summarize_content | 内容摘要 | 生成文章摘要和要点提取 | | generate_article_image | 生成配图 | 为文章生成合适的配图 |

💡 使用示例

1. 抓取并转换微信公众号文章

// 1. 先抓取公众号文章
const article = await crawl_url({
  url: "https://mp.weixin.qq.com/s/...",
  extract_main: true
});

// 2. 转换为小红书文案
const redBookContent = await wechat_article_to_redbook({
  wechat_article: article.content,
  extract_highlights: true,
  split_multiple: false
});

2. 根据主题创作内容

// 生成微信公众号文章
const article = await generate_wechat_article({
  topic: "如何提高工作效率",
  style: "tutorial",
  length: "medium",
  target_audience: "职场人士"
});

// 生成小红书文案
const redBookPost = await generate_redbook_content({
  content: "分享我的高效工作方法",
  style: "lifestyle",
  include_hashtags: true
});

3. 内容搜索与改写

// 搜索相关内容
const searchResults = await search_web({
  query: "人工智能发展趋势",
  max_results: 5
});

// 改写为公众号文章
const article = await rewrite_to_wechat_article({
  web_content: searchResults.content,
  add_personal_insights: true,
  target_length: "expand"
});

🎯 功能特色

智能内容理解

  • 使用 AI 技术智能提取网页主要内容
  • 自动识别和过滤广告、导航等无关信息
  • 保持内容的完整性和准确性

多风格适配

  • 微信公众号:专业、休闲、叙事、教程、新闻等风格
  • 小红书:生活方式、科技、美食、旅行、美妆、健身等风格
  • 支持自定义目标受众和内容长度

跨平台优化

  • 深度理解不同平台的内容特点
  • 自动调整语言风格和表达方式
  • 优化排版和结构以适配平台阅读习惯

智能配图

  • 根据内容自动生成配图描述
  • 支持多种图片风格和色调
  • 适配不同类型的配图需求

🔧 开发与贡献

本地开发

# 克隆项目
git clone https://github.com/yzfly/weixin-mcp-server.git
cd weixin-mcp-server

# 安装依赖
npm install

# 设置环境变量
cp .env.example .env
# 编辑 .env 文件,添加你的 API Key

# 开发模式
npm run dev

# 构建
npm run build

# 启动
npm start

项目结构

weixin-mcp-server/
├── src/
│   └── index.ts          # 主服务器文件
├── dist/                 # 编译后的文件
├── package.json          # 项目配置
├── tsconfig.json         # TypeScript 配置
└── README.md            # 说明文档

📋 API 参考

环境变量

| 变量名 | 必需 | 描述 | |--------|------|------| | SILICONFLOW_API_KEY | ✅ | SiliconFlow API 密钥 |

工具参数说明

详细的工具参数说明请参考源代码中的 Zod 模式定义。每个工具都有完整的参数验证和说明。

🤝 贡献指南

我们欢迎各种形式的贡献!

  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 文件。

🙏 致谢

📧 联系方式


⭐ 如果这个项目对你有帮助,请不要忘记给个 Star!