social-connect-mcp-poc
Social Connect MCP POC
Node.js 22 POC,无需 npm 依赖,用于测试 Facebook + TikTok 连接、OAuth 和 MCP 连接工具。
1. 立即使用 mock 运行
cp .env.example .env
npm test
npm start打开 http://localhost:3000,然后点击 Test Facebook、Test TikTok 或 Run test-all。
.env.example 默认设置 MOCK_SOCIAL=true,因此无需 secret 即可立即演示。
Related MCP server: Social MCP Connector
2. 测试访问真实 endpoint 的能力
npm run probe没有 token 时返回 HTTP 400/401 仍然表示 endpoint provider 是可访问的。
3. 运行 Facebook LIVE
创建 Meta Developer App,添加 Facebook Login 并配置:
MOCK_SOCIAL=false
META_GRAPH_VERSION=v26.0
META_APP_ID=...
META_APP_SECRET=...
META_REDIRECT_URI=http://localhost:3000/api/facebook/callbackOAuth 作用域(POC):
pages_show_list
pages_read_engagement
pages_manage_posts
pages_manage_engagement
pages_messaging然后打开:
http://localhost:3000/api/facebook/login回调会将 authorization code 兑换为 user access token,调用 /me 和 /me/accounts,并将 token 临时保存在内存中。
你也可以绕过 OAuth,直接测试 token/Page:
META_USER_ACCESS_TOKEN=...
# hoặc
META_PAGE_ID=...
META_PAGE_ACCESS_TOKEN=...4. 运行 TikTok LIVE
创建 TikTok Developer App + Login Kit 并配置:
MOCK_SOCIAL=false
TIKTOK_CLIENT_KEY=...
TIKTOK_CLIENT_SECRET=...
TIKTOK_REDIRECT_URI=http://localhost:3000/api/tiktok/callback
TIKTOK_SCOPES=user.info.basic,video.list打开:
http://localhost:3000/api/tiktok/login回调使用 token v2 endpoint,然后测试 /v2/user/info/。如果应用拥有 video.list 权限,POC 还会测试 /v2/video/list/。
或者直接测试 token:
TIKTOK_ACCESS_TOKEN=...5. 内部 API
GET /api/health
GET /api/facebook/login
GET /api/facebook/callback
GET /api/facebook/test
GET /api/tiktok/login
GET /api/tiktok/callback
GET /api/tiktok/test
GET /api/test-all6. MCP POC
npm run mcp工具:
social_status
facebook_test_connection
tiktok_test_connectionsrc/mcp-server.js 是一个极简的 stdio JSON-RPC MCP 实现,让 POC 不依赖外部包。升级到生产环境时,应替换为官方 MCP SDK。
7. 生产环境 TODO
POC 故意只将 OAuth token 保存在内存中。生产环境需要 database/encrypted secret store、refresh-token rotation、Meta/TikTok webhook verification、RBAC、audit log、rate-limit/retry、App Review 和 token revocation flow。
8. Git
仓库已预先 git init 好。创建 remote repository 后推送到 GitHub:
git remote add origin git@github.com:<username>/social-connect-mcp-poc.git
git push -u origin mainThis server cannot be deployed
Maintenance
Related MCP Connectors
OAuth MCP for Google, Meta, X, LinkedIn, Reddit, TikTok, GSC, GA4, WordPress and GHL.
Hosted TikTok ads MCP with OAuth, bounded reads, and prepare/confirm writes.
Create, schedule, and publish social posts, manage accounts, and read analytics as MCP tools.
Hosted Meta ads MCP with OAuth, bounded reads, and prepare/confirm writes.
Related MCP Servers
- -licenseNot gradedqualityNot gradedmaintenanceEnables posting text messages to Facebook business pages through MCP. Supports OAuth authentication and manual connection methods for managing Facebook page content.-
- FlicenseNot gradedqualityDmaintenanceA remote MCP server that provides tools to query live Meta (Facebook+Instagram) and TikTok organic social data, such as follower counts, insights, recent posts, and aggregated overviews.-

@fopost/mcpofficial
AlicenseAqualityBmaintenanceEnables managing social media posts, accounts, and AI-powered content features from any MCP client, including scheduling, publishing, analysis, and AI caption generation.1425 npmMIT- AlicenseNot gradedqualityCmaintenanceEnables retrieval and management of social media data from Instagram, TikTok, YouTube, X, and Facebook through MCP tools, supporting extractions, search, discovery, batches, schedules, and saved results.47 npmMIT