social-connect-mcp-poc
Social Connect MCP POC
POC en Node.js 22 sin dependencias npm para probar la conexión con Facebook + TikTok, OAuth y las herramientas de conexión de MCP.
1. Ejecutar al momento con el mock
cp .env.example .env
npm test
npm startAbra http://localhost:3000 y pulse Test Facebook, Test TikTok o Run test-all.
.env.example define MOCK_SOCIAL=true por defecto, así que la demo funciona de inmediato sin necesidad de secret.
Related MCP server: Meta Ads MCP Server
2. Probar el acceso a los endpoints reales
npm run probeUn HTTP 400/401 cuando no hay token también indica que el endpoint del proveedor es accesible.
3. Ejecutar Facebook LIVE
Cree una Meta Developer App, agregue Facebook Login y configúrela:
MOCK_SOCIAL=false
META_GRAPH_VERSION=v26.0
META_APP_ID=...
META_APP_SECRET=...
META_REDIRECT_URI=http://localhost:3000/api/facebook/callbackScopes de OAuth del POC:
pages_show_list
pages_read_engagement
pages_manage_posts
pages_manage_engagement
pages_messagingDespués abra:
http://localhost:3000/api/facebook/loginEl callback convierte el código de autorización en un user access token, llama a /me y /me/accounts, y luego guarda el token temporalmente en la memoria.
También puede omitir OAuth para probar el token/Page directamente:
META_USER_ACCESS_TOKEN=...
# hoặc
META_PAGE_ID=...
META_PAGE_ACCESS_TOKEN=...4. Ejecutar TikTok LIVE
Cree una TikTok Developer App + Login Kit y configúrela:
MOCK_SOCIAL=false
TIKTOK_CLIENT_KEY=...
TIKTOK_CLIENT_SECRET=...
TIKTOK_REDIRECT_URI=http://localhost:3000/api/tiktok/callback
TIKTOK_SCOPES=user.info.basic,video.listAbra:
http://localhost:3000/api/tiktok/loginEl callback usa el endpoint de token v2 y luego prueba /v2/user/info/. Si la app tiene video.list, el POC también prueba /v2/video/list/.
O pruebe el token directamente:
TIKTOK_ACCESS_TOKEN=...5. API interna
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 mcpHerramientas:
social_status
facebook_test_connection
tiktok_test_connectionsrc/mcp-server.js es una implementación mínima de MCP stdio JSON-RPC para que el POC no dependa de paquetes externos. Al pasar a producción conv res asign should reemplazarse por el SDK MCP oficial.
7. TODO para producción
El POC guarda a propósito el token de OAuth únicamente en memoria. En producción se necesita un almacén de secretos cifrados, rotación de refresh tokens, verificación de webhooks de Meta/TikTok, RBAC, log de auditoría, rate-limit/retry, App Review y un flujo de revocación de tokens.
8. Git
El repo ya está inicializado con git init. Para subirlo a GitHub después de crear el repositorio remoto:
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.
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
- 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