Skip to main content
Glama
threadflow-mcp

threadflow-mcp

threadflow-mcp

Thread publishing discipline for AI agents. Draft an X/Twitter thread, get the per-post evidence check, then enforce that ONLY a validated draft can be scheduled or posted — with an optional pre-spend gate: when a marketing-scope-mcp pre-flight score is supplied, an offer scoring below 45/100 is refused with the sibling's own verbatim kill rule.

The sibling of both — research-scope-mcp (sources → citations) and marketing-scope-mcp (tactics → scored offers) — extended from planning your campaign into publishing your threads.

The discipline

validate_thread  →  draft_thread  →  schedule_thread / post_thread
   (evidence)         (registry)          (enforced gates)
  1. validate_thread(posts[]) — deterministic per-post checks with evidence: 280-char platform limit, 25-post thread limit, empty/one-word posts, hook quality on post 1, and the links-on-final-post convention. Reads only; the registry is untouched.

  2. draft_thread(posts[]) — validate AND register the posts. Blocking issues (too-long, empty-post, too-many-posts) refuse the draft outright.

  3. schedule_thread(posts[], run_at, preflight?) / post_thread(posts[], preflight?) — refuse any posts array that was never drafted, with an error naming the exact text. This is the thread-tool equivalent of the sibling's unscored-offer gate: no pre-flight → no publish.

  4. The kill-rule gate (the white space). Pass the marketing server's score_offer result as preflight.offer and a score < 45 comes back as:

    GATE REFUSED — pre-flight score 38/100 (grade D) is below the kill rule: "Below 45 out of 100 — rework the offer before spending anything on traffic."

    Honesty boundary, stated in the tool docs too: the gate receives the score as a tool argument; it cannot cryptographically prove the sibling scorer produced it. It is only as strong as the agent chain that runs score_offer first — and the exact refusal text is written so the audit trail says precisely why a post was refused.

  5. Platform boundary, stated in the tool docs too: this server holds no X credentials by design. post_thread / schedule_thread clear and audit a draft; the authenticated platform POST happens in the ThreadFlow app's Twitter-authenticated path (SUPABASE_* edge functions), never here.

Related MCP server: ShipPost MCP

Install

Node ≥ 20.

npm install -g threadflow-mcp
# or run from source:
git clone https://github.com/AxelVerneBooks/threadflow-mcp
cd threadflow-mcp && npm install && npm run build

Claude Code

claude mcp add threadflow -- node /path/to/dist/index.js

Cursor (.cursor/mcp.json)

{ "mcpServers": { "threadflow": { "command": "node", "args": ["/path/to/dist/index.js"] } } }

Streamable HTTP

node dist/index.js --http --port 3003        # serves MCP at http://127.0.0.1:3003/mcp

Docker

docker build -t threadflow-mcp -f docker/Dockerfile .
docker run -d --name threadflow -p 3003:3003 threadflow-mcp
# MCP at http://127.0.0.1:3003/mcp

The draft/schedule registries are in-memory (lost on restart — re-draft before finalizing); this is workflow discipline, not a scheduler daemon.

Example session

> validate_thread(posts: [...])
  → per-post char counts, flags, issue list — none saved

> draft_thread(posts: [...])
  → draftId d-1a2b + validation report (blocking issues refuse the draft)

> post_thread(posts: [same exact text],
                preflight: { score_offer(...) })
  → 82/100 (A)  → cleared, audited
  → 38/100 (D)  → GATE REFUSED, verbatim kill rule

> schedule_thread(posts: [...], run_at: "2026-10-28T16:00:00Z")
  → scheduleId s-3c4d, pending (dispatch happens in the ThreadFlow app)

The chained workflow (the product story)

marketing-scope-mcp score_offer  →  threadflow-mcp draft_thread  →  post_thread
        (whether)                        (what)                      (when/gate)

An agent runs score_offer, drafts the thread, and threads the score through preflight — the same enforced-discipline white space the marketing server occupies, extended from planning to publishing.

License

MIT — see LICENSE.

Available Tools

4 tools
draft_threadDraft a threadA

Validate a thread AND register the validated posts in the in-memory draft registry (keyed by the exact joined text; lost on restart — re-draft before finalizing). Returns the draftId and the validation report. post_thread/schedule_thread REJECT any posts array that was never drafted, with an error naming the exact text — the thread equivalent of the sibling's unscored-offer gate.

Inputs: posts (required).

post_threadPost a threadA

Mark a VALIDATED draft as cleared to post NOW. Requires the exact posts to have been drafted with draft_thread first (refuses unvalidated text) and honors the optional pre-flight kill-rule gate (score < 45 -> refusal, verbatim sibling rule). This tool records the audit line; the actual platform POST is executed by the ThreadFlow app's authenticated path — this server holds no X credentials by design.

Inputs: posts (required), preflight.

schedule_threadSchedule a threadA

Schedule a VALIDATED draft to run at an ISO-8601 UTC time. Requires the exact posts to have been drafted with draft_thread first (the registry refuses unvalidated text). Accepts the optional marketing pre-flight score — score < 45 returns the kill-rule refusal and schedules nothing. In-memory only (lost on restart); this is workflow discipline, not a scheduler daemon.

Inputs: posts (required), run_at (required), preflight.

validate_threadValidate a threadA
Read-onlyIdempotent

Run the per-post evidence check on a draft thread WITHOUT saving anything: 280-char platform limit per post, 25-post thread limit, empty-post detection, hook quality on post 1, and the links-on-final-post convention. Returns flags + an issue list WITH per-post evidence. Side effect: none (the registry only accepts drafts made with draft_thread).

Inputs: posts (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.4/5.0

    Scored across 4 tools

    Disambiguation4/5

    The four tools map to distinct workflow stages (validate, draft, schedule, post), and descriptions explicitly contrast validate_thread's no-side-effect dry run with draft_thread's registry write. The main residual overlap is that both validate and draft perform validation, so an agent could momentarily hesitate between them, but the side-effect distinction resolves it.

    Naming Consistency5/5

    All four names follow a strict verb_noun snake_case pattern (validate_thread, draft_thread, schedule_thread, post_thread). The convention is predictable and the noun is consistent across the set.

    Tool Count5/5

    Four tools is well-scoped for a narrow thread draft/validate/schedule/post workflow, and each tool clearly earns its place. Nothing feels padded or redundant.

    Completeness3/5

    The happy-path lifecycle is covered (validate -> draft -> schedule or post), but there is no way to edit a registered draft, list/inspect drafts, cancel a scheduled post, or discard a draft. The in-memory registry makes these gaps more painful, since a scheduled post cannot be unscheduled through the tool surface.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      D
      maintenance
      Enables creating, managing, and publishing X/Twitter posts, threads, and replies directly through Claude chat. Supports draft management with the ability to create, list, publish, and delete tweet drafts.
      10
      1
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Enables AI agents to read, post, search, and engage with Twitter/X content, including AI-powered reply drafting and analytics.
      17
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Enables AI agents to manage a Threads profile through Meta's API, including posting, threads, replies, reply moderation, and insights.
      30
      30 npm
      4
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Enables AI agents to manage social media posts across multiple platforms by scoring virality, generating threads, converting formats, optimizing hooks, scheduling campaigns, and validating platform limits.
      12
      MIT