npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@luminarylane/facebook-mcp-server

v1.6.9

Published

Standalone Facebook Pages MCP Server — SENSE + ACT tools for the Graph API

Readme

Facebook Pages MCP Server

MCP TypeScript License

A Model Context Protocol (MCP) server for the Facebook Graph API (Pages). Enables Claude Desktop and other MCP clients to read insights, create posts, manage comments, and more — all through the Facebook Pages API.

Features

SENSE Tools (Read)

| Tool | Description | | ---------------------- | ------------------------------------------------------------------- | | fb_get_page_insights | Page-level metrics: impressions, reach, engagements, follower count | | fb_get_post_insights | Post-level metrics: impressions, clicks, reactions | | fb_get_comments | Comments on a post with author info, likes, replies | | fb_get_page_feed | Your published posts with permalinks, shares, timestamps |

ACT Tools (Write)

| Tool | Description | | ------------------ | ------------------------------------------------------------------------- | | fb_create_post | Create text, link, photo, or video posts. Supports first-comment for CTAs | | fb_reply_comment | Reply to a comment on a post | | fb_delete_post | Delete a post you published |

Quick Start

Prerequisites

  • Node.js 22.14+
  • A Facebook Page Access Token (how to get one)
  • Your Facebook Page ID

Install

Published package: @luminarylane/facebook-mcp-server on npm

Run without a global install:

FACEBOOK_ACCESS_TOKEN=your-token FACEBOOK_PAGE_ID=your-page-id npx --yes @luminarylane/facebook-mcp-server

To run from source:

git clone https://github.com/luminarylane/facebook-mcp-server.git
cd facebook-mcp-server
npm install
npm run build

Configure

cp .env.example .env
# Edit .env with your credentials:
#   FACEBOOK_ACCESS_TOKEN=your_long_lived_facebook_page_token_here
#   FACEBOOK_PAGE_ID=your_facebook_page_id_here

Run

# Development
npm run dev

# Production
npm start

Claude Desktop Configuration

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "facebook": {
      "command": "npx",
      "args": ["--yes", "@luminarylane/facebook-mcp-server"],
      "env": {
        "FACEBOOK_ACCESS_TOKEN": "your_token_here",
        "FACEBOOK_PAGE_ID": "your_page_id_here"
      }
    }
  }
}

Architecture

  • Transport: stdio (standard MCP protocol)
  • API: Facebook Graph API v21.0
  • Rate Limiting: Built-in token-bucket rate limiter (200 calls/hour global, 25 publishes/day) with per-tenant isolation
  • Retry: Automatic exponential backoff on 429s (up to 3 retries)
  • Security: Input sanitization against prompt injection (zero-width chars, whitespace abuse, context flooding)
  • Error Handling: Structured errors with actionable action hints for agents

Development

# Run tests
npm test

# Development server (auto-reload)
npm run dev

# Type check
npx tsc --noEmit

# Build
npm run build

Testing

The test suite covers:

  • client.test.ts — Graph API HTTP client, URL construction, error parsing
  • create-post.test.ts — Post creation validation and endpoint routing
  • errors.test.ts — Error mapping and agent-action hint strings
  • first-comment.test.ts — First-comment partial-success contract
  • handlers.test.ts — Full tool handler integration tests
  • rate-limiter.test.ts — Token bucket, per-tenant isolation, retry logic
  • response.test.ts — MCP response formatting
  • sanitize.test.ts — Prompt injection protection
  • tools.test.ts — safeHandler and credential resolution
npm test

License

MIT