Social Publisher MCP

Social Publisher MCP

A local MCP service for safely preparing, validating, and executing multi-platform social media auto-publishing, with dry-run mode and real adapter for Douyin.

Category
Visit Server

README

Social Publisher MCP

Social Publisher MCP 是一个用于多平台内容自动发布的本地 MCP 服务。它把内容准备、素材校验、平台登录检查、发布确认和发布执行封装成标准工具,供 Codex、Claude、Cursor、自研 Agent 或任何支持 MCP/stdio 的智能体调用。

项目目标是让智能体可以在用户确认后,安全、统一地完成短视频和图文内容的多平台发布。

功能

  • 多平台发布内容准备与字段适配
  • 视频、图片等本地素材路径校验
  • 平台登录和登录状态检查
  • 发布前确认机制,避免误发
  • 本地发布记录和状态查询
  • 支持 Codex、其他通用智能体以及自己构建的智能体通过 MCP 调用

当前支持的平台包括:

  • 抖音
  • 小红书 / Rednote
  • 快手
  • Bilibili
  • 视频号
  • YouTube

不同平台的可用能力取决于本地配置和适配器接入情况。

适用场景

  • 让 Codex 帮你准备并发布视频或图文内容
  • 在自己的 Agent 工作流中统一接入多平台发布能力
  • 将内容生产脚本、运营后台或自动化流水线接入 MCP 发布服务
  • 为自建智能体提供标准化的社交媒体发布工具

安装

npm install
npm run build

如果需要使用 Python 相关的平台适配能力,建议使用 Python 3.10-3.12。Windows 用户可以通过 conda 创建独立环境:

conda create -n social-publisher python=3.12
conda activate social-publisher

配置

复制示例配置文件:

Copy-Item .env.example .env

然后根据自己的平台账号、浏览器路径和运行环境修改 .env。

常见配置项包括:

SOCIAL_PUBLISHER_DOUYIN_ENGINE=sau
SOCIAL_PUBLISHER_DOUYIN_ACCOUNT=creator
SOCIAL_PUBLISHER_PYTHON_BIN=C:\Path\To\python.exe
SAU_LOCAL_CHROME_PATH=C:\Program Files\Google\Chrome\Application\chrome.exe
SAU_LOCAL_CHROME_HEADLESS=false

首次使用前,建议先完成对应平台登录,并使用备用账号验证发布流程。

在 Codex 中使用

构建完成后,将 MCP server 配置为启动本项目的 dist/index.js:

{
  "mcpServers": {
    "social-publisher": {
      "command": "node",
      "args": [
        "D:\\path\\to\\social-publisher-mcp\\dist\\index.js"
      ]
    }
  }
}

把路径替换成你本机的项目路径即可。配置完成后,Codex 就可以调用本项目提供的 MCP 工具完成登录检查、内容准备和发布。

在自建智能体中使用

任何支持 MCP stdio 的智能体或应用都可以启动这个服务:

node dist/index.js

启动后,通过 MCP 协议调用工具即可。典型流程是:

  1. 调用 list_platforms 查看平台能力。
  2. 调用 login_platform 或 check_platform_auth 完成登录检查。
  3. 调用 prepare_post 准备发布内容。
  4. 向用户展示平台、账号、标题、素材、标签等发布摘要。
  5. 用户确认后调用 publish_post 执行发布。
  6. 调用 check_publish_status 查询发布记录。

MCP 工具

  • list_platforms:查看支持的平台和适配器状态
  • login_platform:启动平台登录流程
  • check_platform_auth:检查平台登录状态
  • prepare_post:校验内容并生成平台发布参数
  • publish_post:在用户确认后执行发布
  • check_publish_status:查询本地发布记录和状态

本地开发

npm install
npm run check
npm run build
npm run dev

安全说明

  • 发布前应由用户明确确认平台、账号、标题、素材、标签和发布时间。
  • 不要把账号 Cookie、Token、密钥或本地登录数据提交到 Git。
  • 首次接入新平台时,建议先使用备用账号验证完整流程。
  • 使用自动化发布能力时,请遵守各平台服务条款、内容规范和账号安全要求。

License

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured