Content
# Social Publisher MCP
Social Publisher MCP is a local MCP service for automatic content publishing across multiple platforms. It encapsulates content preparation, material verification, platform login checks, publishing confirmation, and publishing execution into standard tools that can be called by Codex, Claude, Cursor, self-developed Agents, or any intelligent body that supports MCP/stdio.
The project aims to enable intelligent bodies to complete multi-platform publishing of short videos and graphic content safely and uniformly after user confirmation.
## Features
- Multi-platform content preparation and field adaptation
- Verification of local material paths for videos, images, etc.
- Platform login and login status checks
- Pre-publishing confirmation mechanism to avoid accidental publishing
- Local publishing records and status queries
- Supports Codex, other general intelligent bodies, and self-built intelligent bodies to call through MCP
Currently supported platforms include:
- Douyin
- Xiaohongshu / Rednote
- Kuaishou
- Bilibili
- Video Number
- YouTube
The available capabilities of different platforms depend on local configuration and adapter access.
## Applicable Scenarios
- Let Codex help you prepare and publish video or graphic content
- Uniformly integrate multi-platform publishing capabilities into your Agent workflow
- Connect content production scripts, operation backends, or automated pipelines to the MCP publishing service
- Provide standardized social media publishing tools for self-built intelligent bodies
## Installation
```powershell
npm install
npm run build
```
If you need to use Python-related platform adaptation capabilities, it is recommended to use Python 3.10-3.12. Windows users can create an independent environment through conda:
```powershell
conda create -n social-publisher python=3.12
conda activate social-publisher
```
## Configuration
Copy the example configuration file:
```powershell
Copy-Item .env.example .env
```
Then modify the `.env` file according to your platform account, browser path, and operating environment.
Common configuration items include:
```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
```
Before first use, it is recommended to complete the corresponding platform login and use a backup account to verify the publishing process.
## Using in Codex
After construction, configure the MCP server to start the `dist/index.js` of this project:
```json
{
"mcpServers": {
"social-publisher": {
"command": "node",
"args": [
"D:\\path\\to\\social-publisher-mcp\\dist\\index.js"
]
}
}
}
```
Replace the path with your local project path. After configuration, Codex can call the MCP tool provided by this project to complete login checks, content preparation, and publishing.
## Using in Self-Built Intelligent Bodies
Any intelligent body or application that supports MCP stdio can start this service:
```powershell
node dist/index.js
```
After startup, call the tool through the MCP protocol. The typical process is:
1. Call `list_platforms` to view platform capabilities.
2. Call `login_platform` or `check_platform_auth` to complete login checks.
3. Call `prepare_post` to prepare publishing content.
4. Display platform, account, title, material, tags, and other publishing summaries to the user.
5. Call `publish_post` to execute publishing after user confirmation.
6. Call `check_publish_status` to query publishing records.
## MCP Tools
- `list_platforms`: View supported platforms and adapter status
- `login_platform`: Start platform login process
- `check_platform_auth`: Check platform login status
- `prepare_post`: Verify content and generate platform publishing parameters
- `publish_post`: Execute publishing after user confirmation
- `check_publish_status`: Query local publishing records and status
## Local Development
```powershell
npm install
npm run check
npm run build
npm run dev
```
## Security Instructions
- Users should clearly confirm platform, account, title, material, tags, and publishing time before publishing.
- Do not submit account cookies, tokens, keys, or local login data to Git.
- When accessing a new platform for the first time, it is recommended to use a backup account to verify the complete process.
- When using automated publishing capabilities, please comply with each platform's service terms, content specifications, and account security requirements.
## License
MIT