BT

baguskto/threads-mcp

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

10 stars 5 forks 品質 82 トレンド 22MIT

An MCP server for the . Let Claude (or any MCP client) publish posts, carousels, polls, replies and quotes, read your posts, replies, mentions and insights, search public posts, and schedule posts —...

概要

An MCP server for the . Let Claude (or any MCP client) publish posts, carousels, polls, replies and quotes, read your posts, replies, mentions and insights, search public posts, and schedule posts — using only endpoints Meta documents. - Built on the MCP TypeScript SDK v2 (@modelcontextprotocol/server), works with clients on protocol 2024-11-05 through 2025-11-25 - 42 tools, each annotated as read-only or write so clients can auto-approve reads and confirm writes - Waits for media processing before publishing, retries transient errors, and validates posts before anything goes live - Optional read-only mode, and no token required just to start the server and list tools Tools that called endpoints the Threads API does not have (likes, follows, blocks, follower lists, trending) were removed, and several were renamed or merged. See Migrating from v5. 1. Create an app at developers.facebook.com and add the use case. 2.

README

以下は原文 README の抜粋です。原文を見る。

Threads MCP Server

An MCP server for the official Meta Threads API. Let Claude (or any MCP client) publish posts, carousels, polls, replies and quotes, read your posts, replies, mentions and insights, search public posts, and schedule posts — using only endpoints Meta documents.

  • Built on the MCP TypeScript SDK v2 (@modelcontextprotocol/server), works with clients on protocol 2024-11-05 through 2025-11-25
  • 42 tools, each annotated as read-only or write so clients can auto-approve reads and confirm writes
  • Waits for media processing before publishing, retries transient errors, and validates posts before anything goes live
  • Optional read-only mode, and no token required just to start the server and list tools

v6 is a rewrite. Tools that called endpoints the Threads API does not have (likes, follows, blocks, follower lists, trending) were removed, and several were renamed or merged. See Migrating from v5.

Quick start

1. Get an access token

  1. Create an app at developers.facebook.com and add the Threads API use case.
  2. Add yourself as a Threads tester and accept the invite in Threads (Settings → Account → Website permissions).
  3. Request the scopes you need (see Permissions); threads_basic and threads_content_publish cover posting.
  4. Generate a user token, then turn it into a long-lived token (60 days). You can do the exchange from the server with exchange_for_long_lived_token if you set THREADS_APP_SECRET.

A Threads profile no longer needs a linked Instagram account, except for follower counts and demographics.

2. Add the server to your client

Claude Code

claude mcp add threads --env THREADS_ACCESS_TOKEN=your_token -- npx -y threads-mcp-server

Claude Desktop (claude_desktop_config.json) and other clients that use the same format:

{
  "mcpServers": {
    "threads": {
      "command": "npx",
      "args": ["-y", "threads-mcp-server"],
      "env": {
        "THREADS_ACCESS_TOKEN": "your_long_lived_token"
      }
    }
  }
}

Requires Node.js 20 or newer.

3. Check the setup

Ask the assistant to run validate_setup. It confirms the token works, shows when it expires, and lists missing scopes together with the tools they unlock.

Configuration

Variable Required Description
THREADS_ACCESS_TOKEN yes Long-lived Threads user token
THREADS_USER_ID no Your Threads user ID; skips one /me lookup
THREADS_APP_SECRET no Enables exchange_for_long_lived_token
THREADS_READ_ONLY no true to expose only read tools (no publishing, deleting or scheduling)
THREADS_PUBLISH_WAIT_SECONDS no How long a publish call waits for media processing before returning the pending container (default 45)
GitHub で README 全文を見る

インストール

npx -y threads-mcp-server
MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "mcpServers": { "threads": { "command": "npx", "args": ["-y", "threads-mcp-server"], "env": { "THREADS_ACCESS_TOKEN": "your_long_lived_token" } } } }