ต้นแบบ · รุ่นทดลอง: มีทุก server ในทะเบียนทางการ อัปเดตทุก 30 นาที รีวิวและบัญชีผู้ใช้จะมาในขั้นถัดไป
PopNx MCPที่รวม MCP สำหรับคนใช้ AI · อธิบายเป็นภาษาคน

X MCP AI

โดย IvanBBaevรุ่น 0.8.0i★ –iรันบนเครื่อง
ชื่อใน registryio.github.IvanBBaev/x-mcp-ai

ติดตั้ง

ภาพรวม

คำอธิบายจากผู้ทำ (ภาษาอังกฤษตามต้นฉบับ)

Safety-first X (Twitter) API v2 MCP server: 41 typed tools across 12 packages, policy-gated.

สามเสาของ PopNx MCP

สามเรื่องนี้ไม่รวมเป็นคะแนนเดียว เพราะความเห็น การวัด และความนิยม เป็นคนละเรื่องกัน

ใช้ทำอะไรได้

ตัวนี้ยังไม่ได้เรียบเรียงเป็นภาษาไทย ด้านล่างคือข้อเท็จจริงที่เราอ่านจาก registry

  • การเชื่อมต่อ: รันบนเครื่อง
  • ช่องทาง (transport): stdio
  • หมวด: การตลาดและโซเชียล
  • ต้องใส่ค่าเหล่านี้: X_MCP_CLIENT_SECRET, X_MCP_BEARER_TOKEN

ติดตั้ง

เลือกโปรแกรม AI ที่คุณใช้ แล้วคัดลอกค่าตั้งไปวาง

ก่อนติดตั้ง

  • ผลตรวจเบื้องต้น: ผ่าน 1 จาก 1 ข้อ
  • รันในเครื่องคุณด้วยสิทธิ์ของผู้ใช้คุณ (ไฟล์ อินเทอร์เน็ต แอปต่าง ๆ)
  • ค่าที่คุณต้องใส่เอง: X_MCP_AUTH_MODE, X_MCP_CLIENT_ID, X_MCP_CLIENT_SECRET, X_MCP_BEARER_TOKEN, X_MCP_TOKEN_FILE, X_MCP_TOKEN_KEYCHAIN, X_MCP_POLICY, X_MCP_POLICY_ALLOW, X_MCP_POLICY_DENY, X_MCP_HIDE_DENIED, X_MCP_MEDIA_DIR, X_MCP_AVAILABILITY, X_MCP_PROFILES_FILE, X_MCP_PROFILE, X_MCP_TIMEOUT_MS, X_MCP_LOG_LEVEL, X_MCP_CREDIT_BUDGET, X_MCP_BUDGET_MODE

ค่าที่ติดป้ายความลับคือกุญแจของบัญชีคุณ อย่าส่งให้ใคร และอย่าวางในแชต

ต้องเตรียมก่อน

  • npmติดตั้ง Node.js (มีคำสั่ง npx) ในเครื่อง

คุณใช้แอปไหน

เลือกแอปด้านบน เราจำไว้ให้ ครั้งหน้าปุ่มจะขึ้นว่า “ติดตั้งลง …”

เปิด Claude Desktop → Settings → Developer → Edit Config แล้ววางค่านี้ในไฟล์ claude_desktop_config.json

{
  "mcpServers": {
    "x-ai": {
      "command": "npx",
      "args": [
        "-y",
        "x-mcp-ai"
      ],
      "env": {
        "X_MCP_AUTH_MODE": "ใส่ค่าของคุณ",
        "X_MCP_CLIENT_ID": "ใส่ค่าของคุณ",
        "X_MCP_CLIENT_SECRET": "ใส่ค่าของคุณ",
        "X_MCP_BEARER_TOKEN": "ใส่ค่าของคุณ",
        "X_MCP_TOKEN_FILE": "ใส่ค่าของคุณ",
        "X_MCP_TOKEN_KEYCHAIN": "ใส่ค่าของคุณ",
        "X_MCP_POLICY": "ใส่ค่าของคุณ",
        "X_MCP_POLICY_ALLOW": "ใส่ค่าของคุณ",
        "X_MCP_POLICY_DENY": "ใส่ค่าของคุณ",
        "X_MCP_HIDE_DENIED": "ใส่ค่าของคุณ",
        "X_MCP_MEDIA_DIR": "ใส่ค่าของคุณ",
        "X_MCP_AVAILABILITY": "ใส่ค่าของคุณ",
        "X_MCP_PROFILES_FILE": "ใส่ค่าของคุณ",
        "X_MCP_PROFILE": "ใส่ค่าของคุณ",
        "X_MCP_TIMEOUT_MS": "ใส่ค่าของคุณ",
        "X_MCP_LOG_LEVEL": "ใส่ค่าของคุณ",
        "X_MCP_CREDIT_BUDGET": "ใส่ค่าของคุณ",
        "X_MCP_BUDGET_MODE": "ใส่ค่าของคุณ"
      }
    }
  }
}

พิมพ์คำสั่งนี้ใน Terminal

claude mcp add x-ai --env X_MCP_AUTH_MODE='ใส่ค่าของคุณ' --env X_MCP_CLIENT_ID='ใส่ค่าของคุณ' --env X_MCP_CLIENT_SECRET='ใส่ค่าของคุณ' --env X_MCP_BEARER_TOKEN='ใส่ค่าของคุณ' --env X_MCP_TOKEN_FILE='ใส่ค่าของคุณ' --env X_MCP_TOKEN_KEYCHAIN='ใส่ค่าของคุณ' --env X_MCP_POLICY='ใส่ค่าของคุณ' --env X_MCP_POLICY_ALLOW='ใส่ค่าของคุณ' --env X_MCP_POLICY_DENY='ใส่ค่าของคุณ' --env X_MCP_HIDE_DENIED='ใส่ค่าของคุณ' --env X_MCP_MEDIA_DIR='ใส่ค่าของคุณ' --env X_MCP_AVAILABILITY='ใส่ค่าของคุณ' --env X_MCP_PROFILES_FILE='ใส่ค่าของคุณ' --env X_MCP_PROFILE='ใส่ค่าของคุณ' --env X_MCP_TIMEOUT_MS='ใส่ค่าของคุณ' --env X_MCP_LOG_LEVEL='ใส่ค่าของคุณ' --env X_MCP_CREDIT_BUDGET='ใส่ค่าของคุณ' --env X_MCP_BUDGET_MODE='ใส่ค่าของคุณ' -- npx -y x-mcp-ai

เติมค่าที่เว้นว่างไว้ก่อนรัน

เปิดใน Cursor

หรือคัดลอกค่าตั้งเอง

วางในไฟล์ .cursor/mcp.json ของโปรเจกต์ หรือ ~/.cursor/mcp.json

{
  "mcpServers": {
    "x-ai": {
      "command": "npx",
      "args": [
        "-y",
        "x-mcp-ai"
      ],
      "env": {
        "X_MCP_AUTH_MODE": "ใส่ค่าของคุณ",
        "X_MCP_CLIENT_ID": "ใส่ค่าของคุณ",
        "X_MCP_CLIENT_SECRET": "ใส่ค่าของคุณ",
        "X_MCP_BEARER_TOKEN": "ใส่ค่าของคุณ",
        "X_MCP_TOKEN_FILE": "ใส่ค่าของคุณ",
        "X_MCP_TOKEN_KEYCHAIN": "ใส่ค่าของคุณ",
        "X_MCP_POLICY": "ใส่ค่าของคุณ",
        "X_MCP_POLICY_ALLOW": "ใส่ค่าของคุณ",
        "X_MCP_POLICY_DENY": "ใส่ค่าของคุณ",
        "X_MCP_HIDE_DENIED": "ใส่ค่าของคุณ",
        "X_MCP_MEDIA_DIR": "ใส่ค่าของคุณ",
        "X_MCP_AVAILABILITY": "ใส่ค่าของคุณ",
        "X_MCP_PROFILES_FILE": "ใส่ค่าของคุณ",
        "X_MCP_PROFILE": "ใส่ค่าของคุณ",
        "X_MCP_TIMEOUT_MS": "ใส่ค่าของคุณ",
        "X_MCP_LOG_LEVEL": "ใส่ค่าของคุณ",
        "X_MCP_CREDIT_BUDGET": "ใส่ค่าของคุณ",
        "X_MCP_BUDGET_MODE": "ใส่ค่าของคุณ"
      }
    }
  }
}

เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง

เปิดใน VS Code

หรือคัดลอกค่าตั้งเอง

วางในไฟล์ .vscode/mcp.json ของโปรเจกต์

{
  "servers": {
    "x-ai": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "x-mcp-ai"
      ],
      "env": {
        "X_MCP_AUTH_MODE": "ใส่ค่าของคุณ",
        "X_MCP_CLIENT_ID": "ใส่ค่าของคุณ",
        "X_MCP_CLIENT_SECRET": "ใส่ค่าของคุณ",
        "X_MCP_BEARER_TOKEN": "ใส่ค่าของคุณ",
        "X_MCP_TOKEN_FILE": "ใส่ค่าของคุณ",
        "X_MCP_TOKEN_KEYCHAIN": "ใส่ค่าของคุณ",
        "X_MCP_POLICY": "ใส่ค่าของคุณ",
        "X_MCP_POLICY_ALLOW": "ใส่ค่าของคุณ",
        "X_MCP_POLICY_DENY": "ใส่ค่าของคุณ",
        "X_MCP_HIDE_DENIED": "ใส่ค่าของคุณ",
        "X_MCP_MEDIA_DIR": "ใส่ค่าของคุณ",
        "X_MCP_AVAILABILITY": "ใส่ค่าของคุณ",
        "X_MCP_PROFILES_FILE": "ใส่ค่าของคุณ",
        "X_MCP_PROFILE": "ใส่ค่าของคุณ",
        "X_MCP_TIMEOUT_MS": "ใส่ค่าของคุณ",
        "X_MCP_LOG_LEVEL": "ใส่ค่าของคุณ",
        "X_MCP_CREDIT_BUDGET": "ใส่ค่าของคุณ",
        "X_MCP_BUDGET_MODE": "ใส่ค่าของคุณ"
      }
    }
  }
}

เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง

ตัวนี้รันในเครื่องคุณ แต่ ChatGPT ต่อได้เฉพาะ server บนอินเทอร์เน็ต ลองเลือกแอปอื่น

ตัวเลือกเก็บในคุกกี้บนเครื่องนี้ ไม่ต้องมีบัญชี

ค่าที่ต้องใส่เอง

  • X_MCP_AUTH_MODE env
    Authentication mode: oauth2 (default) or app-only.
  • X_MCP_CLIENT_ID env
    OAuth 2.0 client ID (oauth2 mode).
  • X_MCP_CLIENT_SECRET ความลับ env
    OAuth 2.0 client secret (confidential clients only).
  • X_MCP_BEARER_TOKEN ความลับ env
    Application-only bearer token (app-only mode).
  • X_MCP_TOKEN_FILE env
    Path to the rotating OAuth 2.0 token store (default: OS-resolved).
  • X_MCP_TOKEN_KEYCHAIN env
    Set to 1 to keep OAuth 2.0 tokens in the OS keychain (macOS, Linux) instead of a token file. Mutually exclusive with an explicit X_MCP_TOKEN_FILE.
  • X_MCP_POLICY env
    Policy preset: read-only (default), engage, publish, manage, or full.
  • X_MCP_POLICY_ALLOW env
    Comma-separated op:domain cells to allow on top of the preset (e.g. read:dm,write:dm).
  • X_MCP_POLICY_DENY env
    Comma-separated op:domain cells to deny; deny beats allow beats preset.
  • X_MCP_HIDE_DENIED env
    Set to 1 to drop policy-denied tools from registration entirely instead of registering them annotated as denied.
  • X_MCP_MEDIA_DIR env
    Directory uploads must resolve inside. Media upload is disabled unless this is set.
  • X_MCP_AVAILABILITY env
    Comma-separated specially-provisioned access classes to declare: pilot, premium-user, enterprise. Unset means the conservative default (app+user, user-only).
  • X_MCP_PROFILES_FILE env
    Path to a profiles file holding named configuration blocks.
  • X_MCP_PROFILE env
    Name of the profile to select from the profiles file.
  • X_MCP_TIMEOUT_MS env
    Per-HTTP-request timeout in milliseconds (default 30000).
  • X_MCP_LOG_LEVEL env
    Diagnostic verbosity on stderr: silent, error, info (default), or debug.
  • X_MCP_CREDIT_BUDGET env
    Session spend cap in USD.
  • X_MCP_BUDGET_MODE env
    Budget enforcement: warn (default) or hard.

ค่าตั้งนี้สร้างจากข้อมูลใน registry ของผู้ทำ ถ้าไม่ตรงกับ README ให้เชื่อ README

ทำอะไรได้บ้าง

รันในเครื่องคุณ รายการเครื่องมือจะขึ้นในแอป AI หลังติดตั้ง

ผลตรวจเบื้องต้นi

เราตรวจจากข้อมูลที่ใครก็เปิดดูได้ ยังไม่ได้อ่านโค้ด ข้อที่ไม่เกี่ยวกับตัวนี้ไม่นับในตัวหาร · ตรวจเมื่อ 6 พ.ย. 2569

  • ✓ ผ่าน

    ตัวตนผู้ทำตรงกับ repo

    ชื่อใน registry ยืนยันด้วยบัญชี GitHub IvanBBaev ซึ่งเป็นเจ้าของ repo

  • … ยังไม่ตรวจ

    ยังมีคนดูแล

    ยังไม่ได้อ่านข้อมูล repo จาก GitHub

  • … ยังไม่ตรวจ

    มีสัญญาอนุญาต (license)

    ยังไม่ได้อ่านข้อมูล repo จาก GitHub

  • – ไม่เกี่ยว

    endpoint ตอบ

    ตัวนี้รันบนเครื่องคุณ ไม่มี endpoint บนอินเทอร์เน็ต

  • – ไม่เกี่ยว

    ล็อกอินแบบ OAuth

    ตัวนี้รันบนเครื่อง ใช้ค่าที่ตั้งในเครื่องแทน

  • … ยังไม่ตรวจ

    คำอธิบายเครื่องมือไม่มีคำสั่งแอบแฝง

    รันในเครื่องคุณ เราอ่านรายการเครื่องมือได้เฉพาะตัวที่มี endpoint บนอินเทอร์เน็ต

เทียบกับตัวอื่นในหมวด การตลาดและโซเชียลi

  • ดาวมากกว่า 0% ของอีก 2966 ตัวในหมวดนี้
  • ส่งรุ่นใหม่เข้า registry ล่าสุดกว่า 30% ของอีก 2966 ตัวในหมวดนี้
  • ผลตรวจเบื้องต้นดีกว่าหรือเท่ากับ 100% ของอีก 2966 ตัวในหมวดนี้

เทียบกับทุก server ที่ยังใช้งานในหมวดนี้ทั้งทะเบียน ดาวนับเฉพาะเมื่อผู้ลงทะเบียนเป็นเจ้าของ repo

คำถามที่พบบ่อย

X MCP AI ปลอดภัยไหม?

จากการตรวจเบื้องต้นของเรา ผ่าน 1 จาก 1 ข้อที่ตรวจได้ เรายังไม่ได้อ่านโค้ด ก่อนใส่กุญแจหรือ token ให้ดูว่า server ขอสิทธิ์อะไร และเลือกกุญแจที่ทำได้เท่าที่จำเป็น

ต้องใช้กุญแจหรือรหัสอะไรบ้าง?

ต้องใส่ค่าเหล่านี้: X_MCP_CLIENT_SECRET, X_MCP_BEARER_TOKEN

ตัวนี้รันบนเครื่องหรือบนคลาวด์?

รันบนเครื่องของคุณ โปรแกรม AI จะเปิด server ขึ้นมาเองเมื่อใช้ ข้อมูลไม่ต้องผ่านเซิร์ฟเวอร์ของผู้ทำ (ยกเว้นตัวที่ไปเรียกบริการออนไลน์ต่อ)

ยังมีคนดูแลอยู่ไหม?

repo บน GitHub มีการแก้โค้ดล่าสุด – และส่งรุ่นล่าสุด (0.8.0) เข้า registry 2 เดือนที่ผ่านมา

ใช้กับโปรแกรมไหนได้บ้าง?

โปรแกรมที่รองรับ MCP เช่น Claude Desktop, Claude Code, Cursor และ VS Code ตัวนี้ต้องมี Node.js ในเครื่องด้วย

มีตัวไหนใช้แทนได้บ้าง?

ในหมวดเดียวกันมี MCP YouTube Transcript, Google Analytics MCP, BibiGPT YouTube Video Summarizer

ตัวที่ใช้แทนได้

server หมวดเดียวกันจากผู้ทำคนอื่น เรียงตามดาว

อ่านการ์ด:★ ดาว GitHubiสามเสา: รีวิว · ผลตรวจ · การใช้งานiอัปเดต = วันที่ส่งรุ่นล่าสุดเข้า registryi

MCP YouTube Transcript

โดย jkawamoto

An MCP server retrieving transcripts of YouTube videos

รันบนเครื่อง★ 495MITอัปเดต 9 วันที่ผ่านมา
ติดตั้ง

Google Analytics MCP

โดย surendranb

GA4 MCP server for AI agents: schema discovery, server-side aggregation, analysis-ready defaults.

รันบนเครื่อง★ 244MITอัปเดต 9 วันที่ผ่านมา
ติดตั้ง

AI video summarizer: summarize and transcribe YouTube, Bilibili, TikTok and podcast videos.

รันบนคลาวด์★ 137MITอัปเดต 10 วันที่ผ่านมา
ติดตั้ง

README จากผู้ทำ

เปิดอ่าน README

ส่วนนี้คัดจาก repo ของผู้ทำตามต้นฉบับ PopNx MCP ไม่ได้ตรวจหรือรับรองเนื้อหา ตัด HTML รูปภาพ และสคริปต์ออกแล้ว ลิงก์จะพาออกนอกเว็บ

x-mcp-ai — X (Twitter) MCP Server

An MCP server that exposes the X (Twitter) API v2 to MCP clients — Claude Code, Claude Desktop, VS Code, Cursor, or any MCP-compatible agent — as a curated set of typed tools, gated by a two-axis policy model and aware of the 2026 pay-per-use pricing so an agent can never quietly overspend.

**Status: pre-1.0, under active development, published on npm as

x-mcp-ai** (currently 0.8.0, published from

CI with npm provenance). Pin an exact version while the project is on 0.x

(Setup). 41 tools across 12 packages are registered today; the full designed

surface lives in docs/03-tool-catalog.md and has landed

in full. The public API is unstable until 1.0.0.

Contents: Quick demo · Features · Requirements · Setup · Configure credentials · Cost · Run / debug · Develop · Tools · Resources · Prompts · Project structure · Security notes · Data handling · Documentation · Support · Trademark

Quick demo

Once the server is wired into your MCP client, you drive it in natural language and the model picks the tool. Three representative asks:

// 1. Read (default read-only preset — no writes possible)

// "What are people saying about the Model Context Protocol this week?" { "tool": "x_search_recent", "arguments": { "query": "\"model context protocol\" -is:retweet lang:en", "max_results": 25 } }

// 2. Engage (requires the `engage` preset or an explicit write:engagement allow)

// "Like that launch post for me." { "tool": "x_like_set", "arguments": { "post_id": "1899…", "action": "like" } }

// 3. Publish (requires the `publish` preset or write:content)

// "Post: 'Shipping x-mcp-ai today.' — mind the cost." // Every result carries cost_usd + session_total_usd; a URL in the text raises the price 13×. { "tool": "x_post_create", "arguments": { "text": "Shipping x-mcp-ai today." } }

Features

  • 41 tools across 12 packages over the X API v2 — read posts, users and timelines, search (recent and full-archive), engage, publish, manage lists, upload media, walk the social graph, and read/send DMs behind an explicit opt-in.
  • Two-axis policy model (operation:domain) with five presets — read-only (default), engage, publish, manage, full. Writes are opt-in; deny beats allow beats preset, per cell. Direct-message cells are double-locked: read:dm/write:dm are in no preset, not even full.
  • Cost awareness built in. Since 2026-02-06 the X API v2 is pay-per-use. Every result reports its own cost_usd and the running session_total_usd; an operator-set X_MCP_CREDIT_BUDGET with X_MCP_BUDGET_MODE=hard refuses calls that would exceed it, and the model cannot raise the cap.
  • Two auth modes — OAuth 2.0 PKCE user context (primary, rotating refresh tokens, single-flight refresh) and app-only bearer for read-only deployments.
  • Security-first defaults — host-scoped Authorization header, redirects never followed on token-bearing requests, 0600 token file written with O_NOFOLLOW/O_EXCL, untrusted-content marking on returned text, and media upload default-deny outside a realpath-contained X_MCP_MEDIA_DIR.
  • Typed failures. Eleven error classes, each carrying retryable and fix: "agent" | "operator", so the model retries what is retryable and escalates what is not.
  • Structured output. Every tool advertises a JSON-Schema outputSchema and returns structuredContent alongside the text block.
  • Availability class-gating, live per-endpoint rate-limit tracking (including the 24-hour app cap on post creation), cursor pagination, and compact result rendering.

Requirements

  • Node.js >= 22 (see .nvmrc).
  • An X developer account and app with an OAuth 2.0 client (Client ID; Client Secret only for confidential clients). App-only mode needs a bearer token instead.
  • Prepaid X API credits — the API bills per read and per write (see Cost).

Setup

The recommended install is the published package, pinned to an exact version while the project is on 0.x — nothing to clone or build:

npx -y x-mcp-ai@0.8.0 doctor   # sanity check; makes no billable calls

Then point your MCP client at it:

// claude_desktop_config.json (Claude Desktop) / .mcp.json (Claude Code) / .cursor/mcp.json

{ "mcpServers": { "x": { "command": "npx", "args": ["-y", "x-mcp-ai@0.8.0"], "env": { "X_MCP_AUTH_MODE": "oauth2", "X_MCP_CLIENT_ID": "your-oauth2-client-id", "X_MCP_POLICY": "read-only", "X_MCP_CREDIT_BUDGET": "5.00", "X_MCP_BUDGET_MODE": "hard" } } } }

Running from a local checkout instead? Use "command": "node" with "args": ["/abs/path/to/x-mcp/build/src/index.js"] and the same env map.

Claude Code from the CLI:

claude mcp add x --env X_MCP_POLICY=read-only -- npx -y x-mcp-ai@0.8.0

Per-client instructions — Claude Desktop, Claude Code, VS Code (.vscode/mcp.json), Cursor and MCP Inspector — are in docs/10-operator-guide.md §4, together with the authorize flow and ready-made env recipes.

From source (development)

Still fully supported — build the entry point and spawn it with node instead of npx:

git clone https://github.com/IvanBBaev/x-mcp.git

cd x-mcp npm ci npm run build # tsc → build/src/index.js node build/src/index.js doctor # sanity check; makes no billable calls

Configure credentials

The server never prompts interactively; all configuration comes from environment variables (canonical table: docs/02-architecture.md §4; a starting point: .env.example).

Auth modes (X_MCP_AUTH_MODE):

  • oauth2 *(default)* — OAuth 2.0 with PKCE. Run the one-time authorization flow with the authorize subcommand; tokens land in X_MCP_TOKEN_FILE and are refreshed automatically.
  • app-only — application-only bearer token (X_MCP_BEARER_TOKEN); read endpoints only, no user context.
X_MCP_AUTH_MODE=oauth2 X_MCP_CLIENT_ID=… node build/src/index.js authorize
Environment variables
VariableDefaultSecretPurpose
X_MCP_AUTH_MODEoauth2oauth2 \app-only.
X_MCP_CLIENT_IDOAuth 2.0 client ID (required for authorize and refresh).
X_MCP_CLIENT_SECRET✅OAuth 2.0 client secret (confidential clients only).
X_MCP_BEARER_TOKEN✅App-only bearer token; valid only with app-only.
X_MCP_TOKEN_FILEOS-resolvedPath to the rotating OAuth 2.0 token store (~ expanded).
X_MCP_TOKEN_KEYCHAIN01 → store tokens in the OS keychain (macOS security, Linux secret-tool). Mutually exclusive with X_MCP_TOKEN_FILE.
X_MCP_POLICYread-onlyPreset: read-only \engage \publish \manage \full.
X_MCP_POLICY_ALLOWComma-separated operation:domain cells to add.
X_MCP_POLICY_DENYComma-separated cells to remove (wins over allow and preset).
X_MCP_HIDE_DENIED01 → drop denied tools from registration entirely.
X_MCP_CREDIT_BUDGETSession spend cap, USD (e.g. 5.00). Unset = no cap.
X_MCP_BUDGET_MODEwarnwarn \hard.
X_MCP_AVAILABILITYComma-separated availability classes to enable (pilot, premium-user, enterprise).
X_MCP_MEDIA_DIRDirectory uploads must realpath inside (media default-deny).
X_MCP_PROFILES_FILEMulti-account profiles file.
X_MCP_PROFILEActive profile name (required with a profiles file).
X_MCP_BASE_URLhttps://api.x.comAPI base URL; must be https:// and *.x.com.
X_MCP_ALLOW_INSECURE_BASE_URL01 → permit a non-x.com base URL (testing only).
X_MCP_TIMEOUT_MS30000Per-request timeout, milliseconds.
X_MCP_LOG_LEVELinfosilent \error \info \debug.

Any other X_MCP_* variable is ignored with a startup warning — that is the typo detector. Every fatal configuration error names the variable at fault.

Two-axis access policy

Every tool maps to one policy cell — an operation:domain pair. Operations escalate read → write → destructive; domains are content, user, account, engagement, social-graph, moderation, dm. A preset unlocks a set of the 12 valid cells; X_MCP_POLICY_ALLOW adds cells, X_MCP_POLICY_DENY removes them, and deny > allow > preset.

PresetGrantsCallable tools
read-only *(default)*all read:* cells except read:dm21
engageread-only + write:engagement26
publishengage + write:content, write:moderation32
managepublish + destructive:content34
fullevery non-DM cell — adds write:social-graph, destructive:social-graph37

DM cells are never in a preset — not even `full`. read:dm and write:dm must be

granted explicitly via X_MCP_POLICY_ALLOW (all 41 tools callable). Their unlock hint is

deliberately withheld from policy errors, as it is for every other sensitive cell.

Denied tools stay registered but annotated (disabled by policy ) unless

X_MCP_HIDE_DENIED=1.

Note that manage grants destructive content operations only — follow/mute/block need full or an explicit write:social-graph / destructive:social-graph allow.

Cost

Pay-per-use is the only pricing model. X retired the Free/Basic/Pro subscription tiers

for new developers on 2026-02-06; every read and write draws down prepaid credits.

Since 2026-04-16, a post whose text contains a **URL costs $0.20 instead of $0.015 —

13×**. Set X_MCP_CREDIT_BUDGET before pointing an agent at a real account.

Indicative rates (verified 2026-07-22): post reads ~$0.005 each, user lookups and follower/following reads ~$0.010, own-data reads ~$0.001, DM events ~$0.010, post create $0.015 (or $0.20 with a URL), DM send $0.015, list create $0.010, engagement writes currently $0. X also caps post reads at 2,000,000 per month. The authoritative table is docs/01-api-landscape.md §3; the operator's view is docs/10-operator-guide.md §5.

The budget is per process, advisory, resets on restart, and is model-immutable — there is no per-call override and no tool that raises it.

Run / debug

MCP clients spawn the server for you. To run it by hand:

X_MCP_POLICY=read-only node build/src/index.js serve
Command-line interface
CommandWhat it does
serve *(default)*Start the MCP server over stdio. Running with no subcommand also serves.

|

ตัดมาแค่ช่วงต้น อ่านต่อใน repo

ถาม PopNx