Facebook API MCP
A Node.js client for Facebook & Messenger web protocols, plus a typed Model Context Protocol server so AI agents can use them.
Problem
Agents and bots that live in Messenger have no practical official API for personal accounts and group chats. Existing community clients were untyped, unmaintained and not usable by AI agents.
How it flows
- AI agent
- MCP tools
- Typed client
- Session & protocol layer
- Messenger
What I built
- A cookie-session client reimplementing the messaging, publishing and discovery flows of the web app.
- A typed MCP server exposing those capabilities as tools, so any MCP-capable agent can read threads, reply and post.
- Capability limits documented per feature, with live checks on core messaging and an API reference, changelog and examples.
- Released under MIT; used as the transport for the Chika 2.0 group agent.
Stack
JavaScriptTypeScript typesMCP SDKNode.jsWebSockets