1. home
  2. work
  3. facebook-api-mcp

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.

Role
Author & maintainer
Status
Released · 2026
Visibility
Open source
Area
AI & agents, Reverse engineering, Open source

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

  1. AI agent
  2. MCP tools
  3. Typed client
  4. Session & protocol layer
  5. Messenger

What I built

  1. A cookie-session client reimplementing the messaging, publishing and discovery flows of the web app.
  2. A typed MCP server exposing those capabilities as tools, so any MCP-capable agent can read threads, reply and post.
  3. Capability limits documented per feature, with live checks on core messaging and an API reference, changelog and examples.
  4. Released under MIT; used as the transport for the Chika 2.0 group agent.

Stack

JavaScriptTypeScript typesMCP SDKNode.jsWebSockets

Links

↑↓ navigate ↵ open Esc close