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

facebook-post-inbox-fetch-mcp

v1.0.0

Published

Dependency-free MCP server that reads Facebook for AI agents — fetch a post with its comments and images via a logged-in browser relay (Tampermonkey), and the Page Messenger inbox (conversations, messages, attachments) via the Graph API.

Readme

facebook-post-inbox-fetch-mcp

npm

One dependency-free MCP server to read Facebook — both public/group posts and a Page's Messenger inbox — in a single server. Two engines:

  1. Browser relay (a Tampermonkey userscript ⇄ localhost:8765): uses your real logged-in session, so it bypasses login walls. Reads a post structured (author, content, images + every comment with author/content/images) or screenshots any page.
  2. Graph API (a Page access token): reads the inbox — list/resolve conversations and read a thread's full messages + image attachments. No browser needed.

Node 18+ / bun. No npm dependencies.

Tools

| Tool | Engine | What it does | |------|--------|--------------| | fb_read_post(url) | relay | Structured { post:{author,content,images[]}, comments:[{author,content,images[]}], commentCount }. Expands "view more comments/replies" first. Images are URLs. | | fb_screenshot(url) | relay | PNG of the page as rendered in your browser (good for any tricky page). | | fb_relay_status() | relay | Is the userscript connected (last poll)? | | fb_list_conversations(limit) | graph | Recent inbox threads: id, link, threadId, snippet, participants. | | fb_resolve_conversation(query) | graph | Find a thread by name / link / threadId / PSID / id (paginates). | | fb_get_conversation(id) | graph | A thread's full messages, oldest-first, + attachment URLs. | | fb_page_info() | graph | The Page the token belongs to. | | fb_find_conversation_by_user(psid) | graph | Thread by PSID. |

Setup

Add to your MCP config — no install step, npx fetches it on first run:

{
  "mcpServers": {
    "facebook": {
      "command": "npx",
      "args": ["-y", "facebook-post-inbox-fetch-mcp"],
      "env": {
        "FB_PAGE_TOKEN": "EAA... (Page token, pages_messaging)",
        "FB_GRAPH_VERSION": "v21.0",
        "FB_RELAY_PORT": "8765"
      }
    }
  }
}

For the relay (posts/screenshots): install Tampermonkey, add facebook.user.js, and keep one Facebook tab open. The inbox (Graph) needs only the token — no browser.

Only reading the inbox? FB_PAGE_TOKEN is enough — skip Tampermonkey. Only reading posts/screenshots? The relay is enough — FB_PAGE_TOKEN is optional.

Reading workflow

  • Postfb_read_post(url), then download + view each image URL (post + every comment).
  • Inboxfb_resolve_conversation("<name>")fb_get_conversation(<id>) (whole thread) → download + view any image attachments.

Notes & limits

  • ⚠️ Relay needs the FB tab VISIBLE/foreground for the ~15s of the call (background tabs throttle their timers → timeout). fb_screenshot is the reliable fallback; fb_read_post's structured scrape is best-effort (FB's DOM is obfuscated).
  • A Business-Suite inbox URL's selected_item_id is a real UID that the Graph API can't map to a thread — resolve by participant name instead.
  • Token: regenerating it invalidates older ones; for stability use a System User token (never expires).

License

MIT © Vorakorn Kosidphokin