social-connect-mcp-poc
Social Connect MCP POC
Node.js 22 の POC で、npm 依存なしで Facebook + TikTok 接続、OAuth、MCP 接続ツールをテストします。
1. モックですぐ実行
cp .env.example .env
npm test
npm starthttp://localhost:3000 を開き、Test Facebook、Test TikTok、または Run test-all をクリックします。
.env.example は、デフォルトで MOCK_SOCIAL=true になっているため、secret を用意しなくてもすぐにデモできます。
Related MCP server: Meta Ads MCP Server
2. 実アクセスの可用性をテスト
npm run probeトークンがない場合に HTTP 400/401 が返っても、プロバイダーのエンドポイントに到達できていることを意味します。
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 を呼び出して、トークンを一時的にメモリ上に保持します。
OAuth をバイパスしてトークン/ページを直接テストすることもできます:
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 エンドポイントを使用し、その後に /v2/user/info/ をテストします。アプリに video.list がある場合、POC は /v2/video/list/ もテストします。
または、トークンを直接テストします:
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 は、POC が外部パッケージに依存しないための最小限の stdio JSON-RPC MCP 実装です。本番環境に移行する場合は、公式の MCP SDK に置き換えることを推奨します。
7. 本番化に向けた TODO
POC では意図的に OAuth トークンをメモリのみに保持しています。本番環境では、データベース/暗号化された secret store、refresh-token のローテーション、Meta/TikTok の webhook 検証、RBAC、監査ログ、rate-limit/retry、App Review、トークン失効フローが必要です。
8. Git
リポジトリはすでに git init 済みです。リモートリポジトリを作成した後に GitHub へプッシュするには:
git remote add origin git@github.com:<username>/social-connect-mcp-poc.git
git push -u origin mainTool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This 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.
One-link client onboarding & ad-access MCP server for digital agencies (OAuth 2.1).
Human-approved social media publishing and AI media Studio via hosted OAuth MCP.
Related MCP Servers
- 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.-
- AlicenseNot gradedqualityAmaintenanceEnables connecting to the Meta Marketing API to manage ad accounts, campaigns, ad sets, creatives, audiences, reporting, and batch workflows through an authenticated, multi-tenant MCP endpoint.39 npmMIT
- AlicenseNot gradedqualityAmaintenanceEnables connecting Meta Ads accounts to an MCP client so users can manage ad accounts, campaigns, ad sets, creatives, audiences, reporting, and batch workflows through the Meta Marketing API.39 npmMIT
- AlicenseNot gradedqualityAmaintenanceEnables connecting to the Meta Marketing API to manage ad accounts, campaigns, ad sets, creatives, audiences, reporting, and batch workflows through authenticated MCP tools.39 npmMIT