Skip to main content
Glama
AxelVerneBooks

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.

NameRequiredDescriptionDefault
postsYesThe thread posts in order. Post 1 is the hook/frame — links belong on the FINAL post, per convention.

TDQS

A4.4/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Adds substantial behavioral context beyond annotations: the draft registry is in-memory (lost on restart), returns a draftId and validation report, and that post/schedule tools will reject undrafted posts with an error naming the exact text. This clarifies statefulness, side effects, and error behavior, consistent with the non-read-only, non-idempotent annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two dense but well-structured sentences: the first front-loads the core action and registry behavior, the second covers the downstream rejection consequence. Every sentence adds necessary information with no filler or redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a stateful draft tool with no output schema, the description adequately covers registry lifetime, return values (draftId and validation report), and downstream error behavior. It does not elaborate on what the validation report contains or the specific validation rules, but that is a minor gap given the sibling validate_thread likely handles validation details.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, and the schema already documents the only parameter 'posts' including ordering and convention about links on the final post. The description adds no parameter-specific details beyond what the schema provides, so the baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Starts with 'Validate a thread AND register the validated posts in the in-memory draft registry', a specific verb and resource that clearly distinguishes this tool from validate_thread (which presumably only validates) and from post_thread/schedule_thread (which reject undrafted posts). The mention of sibling rejection further clarifies its unique role.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly states that post_thread/schedule_thread reject any posts array that was never drafted, implying this tool must be used before those. It also notes the draft is lost on restart and must be re-drafted before finalizing. However, it does not explicitly contrast with validate_thread (e.g., when to prefer one over the other), leaving a minor gap in alternative guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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.

NameRequiredDescriptionDefault
postsYesThe thread posts in order. Post 1 is the hook/frame — links belong on the FINAL post, per convention.
preflightNo

TDQS

A4.6/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Beyond the annotations, it discloses the validation refusal, the pre-flight kill-rule threshold (score < 45), that the call only records an audit line, and that the real platform POST happens outside this server because it holds no X credentials. That is exactly the context an agent needs before invoking a non-idempotent, non-destructive write.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three dense sentences, front-loaded with the core action and the prerequisite before the operational caveats. Slightly heavy with parentheticals ('verbatim sibling rule', 'score < 45 -> refusal'), but every clause carries information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema, the description covers what the call actually returns conceptually (an audit line rather than a posted thread), the prerequisite chain, the refusal gate, and the credential boundary. An agent has everything needed to call it correctly and to interpret the result.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 50% schema coverage and a nested preflight object, the description adds real meaning, clarifying that the posts must be the exact validated text and framing preflight as an optional gate whose score < 45 causes refusal. It does not explain the posts ordering/link convention beyond what the schema comment already says, so it is additive but not exhaustive.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a precise verb and object ('mark a VALIDATED draft as cleared to post NOW') and explicitly distinguishes itself from draft_thread, which produced the text. An agent can tell instantly that this is the publish-approval step, not the drafting or scheduling step.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives a hard prerequisite ('requires the exact posts to have been drafted with draft_thread first') and a refusal condition for unvalidated text. It implies immediate posting vs the schedule_thread sibling ('post NOW') but never names that alternative explicitly, leaving a small routing gap.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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.

NameRequiredDescriptionDefault
postsYesThe thread posts in order. Post 1 is the hook/frame — links belong on the FINAL post, per convention.
run_atYesISO-8601 timestamp when the thread should fire, e.g. 2026-10-28T16:00:00Z
preflightNo

TDQS

A4.7/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Goes well beyond the annotations: discloses the draft-registry validation gate, the score < 45 kill-rule refusal that schedules nothing, and that state is in-memory and lost on restart. The 'workflow discipline, not a scheduler daemon' line usefully corrects a likely agent misconception about durability.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Four tight sentences, front-loaded with the core action, then preconditions, failure mode, and persistence caveat in order of decision relevance. No filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Covers preconditions, failure modes, persistence semantics, and the nested preflight object's effect, which is the hardest part of the schema. With no output schema, the one remaining gap is what a successful response looks like, which is minor.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 67%, and the description adds meaning the schema lacks: the preflight threshold behavior (score < 45 refusal), and that posts must be the exact drafted strings. run_at is restated as ISO-8601 UTC, which is redundant with the schema description but harmless.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (schedule) plus resource (validated draft thread) and a concrete timing semantic (ISO-8601 UTC run time). Clearly distinguishable from draft_thread, validate_thread, and post_thread by the scheduling framing.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly states the precondition that posts must come from draft_thread and that the registry rejects unvalidated text. It does not explicitly say 'use post_thread instead for immediate publishing', so the alternative routing is only implied rather than named.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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).

NameRequiredDescriptionDefault
postsYesThe thread posts in order. Post 1 is the hook/frame — links belong on the FINAL post, per convention.

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnly/idempotent/non-destructive, and the description reinforces that with an explicit 'Side effect: none' plus the registry acceptance rule, which is real added context. It also discloses the return shape (flags plus an issue list with per-post evidence) and the specific rule set applied, though it doesn't say how severe flags are surfaced or whether validation is partial on failure.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loads the most decision-relevant fact (no saving) and packs the rule list into one dense sentence with no filler. Slightly run-on, but every clause carries information an agent would otherwise have to discover by calling it.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Single-parameter, non-destructive tool with no output schema, and the description covers the checks performed, that nothing is persisted, and the rough return contents — enough to call it correctly. It stops short of describing the flag vocabulary or how issues map to posts, which is a minor gap given no output schema exists.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and the posts description already covers ordering and the links-on-final-post convention, so the baseline is 3. The description adds meaning the schema lacks — the 280-char per-post limit and that 'post 1' is evaluated specifically for hook quality — which clarifies what the parameter is judged against.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('run the per-post evidence check on a draft thread') and enumerates exactly what is checked: 280-char limit, 25-post limit, empty posts, hook quality, links-on-final-post. It explicitly separates itself from draft_thread by declaring it saves nothing, so an agent can distinguish it from draft_thread/post_thread without opening a schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

'WITHOUT saving anything' plus 'the registry only accepts drafts made with draft_thread' tells the agent this is a pre-flight check against a draft, not a creation or publishing step. It gives clear context but never explicitly names when to prefer post_thread or schedule_thread over this, or states a required call order beyond the registry caveat.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

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

  1. 4 tool updatesv0.1.0
    • First observeddraft_thread
    • First observedpost_thread
    • First observedschedule_thread
    • First observedvalidate_thread

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 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
    A
    maintenance
    Enables AI agents to manage a Threads profile through Meta's API, including posting, threads, replies, reply moderation, and insights.
    30
    28 npm
    2
    MIT
  • A
    license
    A
    quality
    B
    maintenance
    Agent-native X (Twitter) posting as one MCP server for Claude Code / Cursor / Codex / Windsurf. Your X token never touches the agent; every post clears a server-side guardrail before it ships.
    11
    14 npm
    AGPL 3.0