Social Media MCP
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Social Media MCPstart the Douyin channel and help me log in"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Social Media MCP
面向社交媒体渠道的本地 MCP adapter 集合。当前已提供抖音通道,MCP Client 通过 stdio 调用 douyin.* tools,完成通道启动、登录辅助、消息、通知和本地直播弹幕轮询。
私信/通知仍使用既有 channel-server 链路;直播弹幕轮询是本地 MCP 能力,不依赖 channel-server。MCP 与 RPA 必须共享控制目录和 RPA 的 messages.sqlite3 文件。
当前支持
渠道 | Adapter 路径 | MCP tools |
抖音 |
|
|
更多渠道会以独立 adapter 的形式加入本仓库。
Related MCP server: Social Publisher MCP
前置条件
Python 3.10 或更高版本
Git
已在控制台创建的 API Key
控制台提供的 channel-server 地址
安装
git clone https://github.com/hisou-tabibituo/social_meadia_mcp.git social-media-mcp
cd social-media-mcp
python3 --version
# 确认输出为 Python 3.10 或更高版本
python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install -r requirements.txtWindows PowerShell:
git clone https://github.com/hisou-tabibituo/social_meadia_mcp.git social-media-mcp
cd social-media-mcp
py -3 --version
# 确认输出为 Python 3.10 或更高版本
py -3 -m venv .venv
.venv\Scripts\Activate.ps1
python -m pip install --upgrade pip
python -m pip install -r requirements.txt配置 MCP Client
将下列内容添加到 AI Client 的 MCP 配置中,并替换路径、服务地址和 API Key。
macOS / Linux:
{
"mcpServers": {
"byering-social-media-mcp": {
"command": "/absolute/path/social-media-mcp/.venv/bin/python",
"args": [
"/absolute/path/social-media-mcp/mcp_data/mcp_adapter.py",
"--channel-server-url", "https://yydsagent.com:8800",
"--api-key", "byk_xxx",
"--rpa-agent-id", "<uid>",
"--rpa-message-db", "/absolute/path/rpa-core-douyin/rpa_data/runtime/messages.sqlite3",
"--rpa-live-polling-control-dir", "/absolute/path/rpa-core-douyin/cache/live_polling"
]
}
}
}Windows:
{
"mcpServers": {
"byering-social-media-mcp": {
"command": "C:\\path\\to\\social-media-mcp\\.venv\\Scripts\\python.exe",
"args": [
"C:\\path\\to\\social-media-mcp\\mcp_data\\mcp_adapter.py",
"--channel-server-url", "https://yydsagent.com:8800",
"--api-key", "byk_xxx",
"--rpa-agent-id", "<uid>",
"--rpa-message-db", "C:\\path\\to\\rpa-core-douyin\\rpa_data\\runtime\\messages.sqlite3",
"--rpa-live-polling-control-dir", "C:\\path\\to\\rpa-core-douyin\\cache\\live_polling"
]
}
}
}--channel-server-url 填服务基础地址,不要附加 /v1;adapter 会自行拼接 API 路径。--session-id 可选,不传时 adapter 会使用 API Key 自动创建或绑定会话。
直播轮询相关参数:
--rpa-agent-id或DOUYIN_AGENT_ID:必须与 RPA 的agent_id/uid一致。--rpa-message-db或RPA_MESSAGE_DB:RPA 使用的同一个messages.sqlite3文件。--rpa-live-polling-control-dir或RPA_LIVE_POLLING_CONTROL_DIR:RPA 与 MCP 共享的live_polling控制目录。
用户明确要求监控直播弹幕时,Agent 调用 douyin.start_live_polling。该工具由 RPA 主进程在 run() 中消费本地命令,并按 actionType=22 启动 main2.py。MCP 随后每 60 秒调用 douyin.pull_live_messages,只在有新消息时报告 secid、name、content。
main2.py 启动后未发现直播时持续等待;只有曾经发现过有效直播,之后连续 5 次正常获取不到 room_id,才认为直播结束并退出。用户可以随时调用 douyin.stop_live_polling 主动结束,主动停止不影响主 RPA、私信或通知监听,也不释放整个会话。
本地验证
激活虚拟环境后,可以先在终端启动 adapter:
python -m mcp_data.mcp_adapter \
--channel-server-url https://yydsagent.com:8800 \
--api-key byk_xxx也可以使用交互式 REPL 检查工具是否可用:
python -m mcp_data.mcp_client_repl \
--channel-server-url https://yydsagent.com:8800 \
--api-key byk_xxx进入 mcp> 后输入 tools 查看已注册工具。工具说明可在 MCP Client 中通过 tools 命令查看。
安全说明
API Key 只放在本地 MCP Client 配置或本地环境变量中,不要提交到 Git。
mcp_data/runtime/是本地运行数据,不应提交。messages.sqlite3和cache/live_polling/是本地运行数据,不应提交。退订会释放云端沙箱并清理抖音登录态;调用
douyin.unsubscribe前必须向用户二次确认。
This server cannot be deployed
Maintenance
Related MCP Connectors
- MysocialOAuthio.mysocial
Social media MCP server: your Instagram, TikTok, YouTube, LinkedIn and Threads history for your AI.
MCP server aggregating hot-search boards from 8 Chinese platforms (Weibo, Zhihu, Bilibili, Douyin).
MCP server: AI-agent access to Chinese social & trend signals — Douyin, Weibo, Xiaohongshu/RedNote,
Remote MCP server for China brand visibility, destination demand, and KOL discovery workflows.
Related MCP Servers
- AlicenseNot gradedqualityFmaintenanceAutomates video and image-text publishing on Douyin's creator platform using Chrome DevTools Protocol, exposed as MCP tools.80AGPL 3.0
- AlicenseAqualityBmaintenanceA local MCP service for safely preparing, validating, and executing multi-platform social media auto-publishing, with dry-run mode and real adapter for Douyin.61MIT
- AlicenseNot gradedqualityCmaintenanceAn MCP adapter for reading and carefully operating Douyin and Creator Center through structured IDs and verified browser state, with safety boundaries.1MIT
- AlicenseAqualityAmaintenanceMCP server that provides AI agents with access to public social media data, including hot lists, searches, content details, user profiles, posts, and comments from platforms like Douyin, Xiaohongshu, Bilibili, and Weibo.616MIT