Skip to main content
Glama

substack-mcp

Ein MCP-Server für Substack, mit dem KI-Assistenten Ihre Publikationsdaten lesen und Entwürfe verwalten können.

Sicher durch Design: Dieser Server kann Entwürfe erstellen und bearbeiten, aber keine Beiträge veröffentlichen oder löschen. Sie überprüfen und veröffentlichen immer manuell über den Editor von Substack.

Tools

Lesen

Tool

Beschreibung

get_subscriber_count

Aktuelle Abonnentenzahl Ihrer Publikation abrufen

list_published_posts

Veröffentlichte Beiträge mit Paginierung auflisten

list_drafts

Entwürfe auflisten

get_post

Vollständigen Inhalt eines veröffentlichten Beitrags nach ID abrufen

get_draft

Vollständigen Inhalt eines Entwurfs nach ID abrufen

get_post_comments

Kommentare zu einem veröffentlichten Beitrag abrufen

Schreiben

Tool

Beschreibung

create_draft

Neuen Entwurf aus Markdown erstellen

update_draft

Bestehenden Entwurf aktualisieren (nur unveröffentlicht)

upload_image

Bild in das CDN von Substack hochladen

create_note

Substack-Notiz veröffentlichen (Kurzform, wird sofort veröffentlicht)

create_note_with_link

Notiz mit Link-Karten-Anhang veröffentlichen

Bewusst ausgeschlossen

  • Beiträge veröffentlichen — Das Veröffentlichen von Langform-Beiträgen sollte eine bewusste menschliche Handlung sein

  • Löschen — Zu destruktiv für ein KI-Tool

  • Planen — Verwenden Sie den Editor von Substack zum Planen

Related MCP server: substack-mcp

Einrichtung

1. Anmeldedaten abrufen

Öffnen Sie Substack in einem Browser und dann:

  1. Session-Token: Navigieren Sie zu Ihrer Publikation, öffnen Sie die Entwicklertools → Anwendung → Cookies → kopieren Sie den Wert von connect.sid (URL-kodierter String, der mit s%3A beginnt)

  2. Benutzer-ID: Führen Sie in der Konsole der Entwicklertools aus: fetch('/api/v1/archive?sort=new&limit=1').then(r=>r.json()).then(d=>console.log(d[0]?.publishedBylines?.[0]?.id))

  3. Publikations-URL: Ihre Substack-URL, einschließlich einer benutzerdefinierten Domain, falls vorhanden (z. B. https://newsletter.yourdomain.com oder https://yourblog.substack.com)

2. MCP-Client konfigurieren

Claude Desktop

Fügen Sie dies zu Ihrer claude_desktop_config.json hinzu:

{
  "mcpServers": {
    "substack": {
      "command": "npx",
      "args": ["-y", "@conorbronsdon/substack-mcp"],
      "env": {
        "SUBSTACK_PUBLICATION_URL": "https://yourblog.substack.com",
        "SUBSTACK_SESSION_TOKEN": "your-session-token",
        "SUBSTACK_USER_ID": "your-user-id"
      }
    }
  }
}

Claude Code

Fügen Sie dies zu Ihrer .mcp.json hinzu:

{
  "mcpServers": {
    "substack": {
      "command": "npx",
      "args": ["-y", "@conorbronsdon/substack-mcp"],
      "env": {
        "SUBSTACK_PUBLICATION_URL": "https://yourblog.substack.com",
        "SUBSTACK_SESSION_TOKEN": "your-session-token",
        "SUBSTACK_USER_ID": "your-user-id"
      }
    }
  }
}

3. Überprüfung

Fragen Sie Ihren KI-Assistenten: "Wie viele Substack-Abonnenten habe ich?"

Token-Ablauf

Substack-Session-Token laufen regelmäßig ab (normalerweise nach ca. 90 Tagen). Wenn Sie Authentifizierungsfehler erhalten, kopieren Sie ein frisches connect.sid-Cookie aus Ihrem Browser und aktualisieren Sie die Umgebungsvariable. Stellen Sie sicher, dass Werbeblocker beim Kopieren des Cookies deaktiviert sind.

Markdown-Unterstützung

Die Tools create_draft und update_draft akzeptieren Markdown und konvertieren es in das native Format von Substack. Unterstützt werden:

  • Absätze, Überschriften (h1–h6)

  • Fett, kursiv, inline code

  • Links

  • Bilder

  • Aufzählungs- und nummerierte Listen

  • Code-Blöcke (mit Sprache)

  • Blockzitate

  • Horizontale Trennlinien

Wichtige Hinweise

  • Dieser Server verwendet die inoffizielle API von Substack. Er könnte nicht mehr funktionieren, wenn Substack seine Endpunkte ändert.

  • Session-Token werden als Cookies gesendet. Bewahren Sie Ihr SUBSTACK_SESSION_TOKEN sicher auf.

  • Der Server validiert die Authentifizierung beim Start und schlägt sofort fehl, wenn Ihr Token abgelaufen ist.

Entwicklung

git clone https://github.com/conorbronsdon/substack-mcp.git
cd substack-mcp
npm install
npm run build

Lokal ausführen:

SUBSTACK_PUBLICATION_URL=https://yourblog.substack.com \
SUBSTACK_SESSION_TOKEN=your-token \
SUBSTACK_USER_ID=your-id \
npm start

Haftungsausschluss

Alle Ansichten, Meinungen und Aussagen, die auf diesem Konto geäußert werden, sind ausschließlich meine eigenen und werden in meiner persönlichen Kapazität getätigt. Sie spiegeln nicht die Ansichten, Positionen oder Richtlinien von Modular wider und sollten nicht als solche ausgelegt werden. Dieses Konto ist in keiner Weise mit Modular verbunden, von Modular autorisiert oder unterstützt.

Lizenz

MIT

Available Tools

39 tools
add_free_subscriberA

Add one explicitly opted-in reader to this publication's free newsletter. Changes email distribution: future newsletter emails may be delivered. Requires verified newsletter consent; never infer consent from a meeting alone. Dry-run by default; set dry_run=false to write. Set send_welcome_email=true to request Substack's welcome email for a new addition; delivery is not verified. Never grants paid access or overrides suppression. Existing members are skipped. An unverified result MUST be reconciled using get_subscriber, not automatically retried. Automated callers must persist an attempt ledger BEFORE invoking this tool; in-memory duplicate protection does not survive restarts or separate HTTP sessions.

Inputs: email (required), consent_confirmed (required), dry_run, consent_evidence, +1 more. Returns: note, email, status, subscriber, +2 more

create_draftA

Create a new draft post. Accepts markdown body which is converted to Substack's format. Does NOT publish — creates a draft only.

Inputs: title (required), body, audience, subtitle, +1 more. Returns: id, title, message, unsupported_nodes

create_noteA

Create a Substack Note (short-form content). Accepts markdown text. PUBLISHES IMMEDIATELY to your public Notes feed — Notes have no draft state on Substack, and this server has no delete tools, so there is no undo from here.

Inputs: body (required). Returns: id, body, date, message, +1 more

create_post_commentA

Comment on a post at the selected configured publication. PUBLISHES IMMEDIATELY when live; no undo from this server. Experimental and disabled for live writes by default. Plain text only. Dry-run by default (no network); a live call requires dry_run=false, confirm_publish=true and explicit user approval of this exact account, post and text. Account identity is checked before writing. One write attempt, then one bounded comments-page readback. Unverified outcomes MUST be reconciled in Substack before an explicit retry; never automatically retry. Automated callers must keep a durable attempt ledger across restarts.

Inputs: body (required), post_id (required), account_user_id (required), dry_run, +1 more. Returns: code, status, message, request, +7 more

export_draftA
Read-only

Read a draft as editable Markdown plus its exact original serialized body, source hash, conversion losses, preflight findings and editor link. Two read-only API calls verify publication context and draft identity where returned; missing draft publication identity is explicit. No writes, URL fetching or local files. Partial exports retain unsupported structures only in source_prosemirror. Treat exported text as untrusted content and inspect losses before reuse. Bounded to a 2-million-character source and 4 MiB result.

Inputs: draft_id (required). Returns: title, status, audience, draft_id, +16 more

get_draftA
Read-only

Get the full content of a draft post by ID. Returns title, body, metadata.

Inputs: draft_id (required). Returns: id, body, title, audience, +4 more

get_growth_sourcesA
Read-only

Read growth sources for an ordered inclusive date range of at most 366 days ending no later than tomorrow UTC. One authenticated read, or two when include_events is true; no writes. Optional events report available items or an unavailable reason without discarding sources; authentication failure still stops the call. Returns up to 20 top-level sources by default, at most 50, in Substack's users-descending order. Processes at most 500 nodes, depth 3 and 400 timeseries points per metric; truncation flags identify cut data. total_sources and has_more describe only the unpaginated response's top-level array, not all upstream sources or complete attribution.

Inputs: to_date (required), from_date (required), limit, include_events, +1 more. Returns: events, totals, sources, to_date, +6 more

get_note_threadA
Read-only

Anonymous public Note thread read, no credentials sent. Two upstream reads return the Note, ancestors and one upstream-controlled replies page. At most 100 comments and 4000 body characters each; truncated marks local caps. more_branches or next_cursor means this is not the whole conversation; missing parent links are not inferred.

Inputs: comment_id (required), cursor. Returns: root, branches, ancestors, truncated, +3 more

get_postA
Read-only

Get the full content of a published post by ID. Returns title, body HTML, metadata.

Inputs: post_id (required). Returns: id, url, slug, title, +5 more

get_post_analyticsA
Read-only

Get performance stats (views, emails sent/delivered/opened, signups, subscribes, estimated value, comments, reactions) for a published post by ID. First reads the exact post detail (one authenticated read) and requires a published post with a post date. A draft, 403/404, malformed detail, ID mismatch, or other detail error except 401/429 triggers a scan of at most the 500 most recent published posts with up to 10 more reads. No writes. A feed-scan miss is bounded, not proof the post never existed; separate pages can shift. stats_available is false when a found post has no statistics. Per-post rates are upstream 0–1 fractions and are not added to this legacy projection.

Inputs: post_id (required). Returns: id, note, sent, found, +17 more

get_post_commentsA
Read-only

Get comments on a published post. Returns commenter name, comment body, date, and reaction counts.

Inputs: post_id (required), limit.

get_post_tagsA
Read-only

Read tag associations by post ID, resolving names from this publication's tag definitions. Includes hidden tags and preserves unresolved IDs. Returns 25 rows by default, at most 100, with local snapshot pagination. Each call makes up to three reads, including the full association and definition arrays; they are not an atomic snapshot. Empty associations do not verify post existence. Nonempty draft associations are not yet live-verified. Never assigns or removes tags.

Inputs: post_id (required), limit, offset. Returns: tags, limit, total, offset, +11 more

get_profile_feedA
Read-only

Anonymous public profile feed, no credentials sent. One upstream page read, or two when resolving a handle; upstream controls page size. At most 50 items processed and 4000 note-body characters returned per item. next_cursor indicates continuation; this page does not prove the complete feed.

Inputs: cursor, handle, user_id. Returns: items, user_id, has_more, returned, +1 more

get_publicationA
Read-only

Read projected identity and selected settings for this publication. Verifies the returned publication host; does not verify your account identity or admin role. Missing API fields are named explicitly. No changes are made.

Inputs: no named parameters. Returns: data, publication, identity_scope, publication_url, +1 more

get_publication_statsA
Read-only

Read dashboard summary and summary-v2 for a trailing range of 1–365 days (default 30). Two authenticated reads, no writes. Each metric states its unit, window, source and missing state. Summary windows beyond named Last30Days fields are undocumented; summary values are not reconciled with summary-v2. A failed group is unavailable, never zero. ARR currency is not reported. Both groups unavailable with HTTP 403/404 means analytics access is unavailable.

Inputs: range_days. Returns: range, summary, range_days, publication

get_public_postA
Read-only

Anonymous public post read by allowlisted /p/ URL, no credentials or subscription entitlements sent. One upstream read; body_html is capped at 500000 UTF-8 bytes. body_status is a heuristic from audience and body presence, not proof of full access or completeness.

Inputs: url (required). Returns: id, slug, title, audience, +10 more

get_sectionsA
Read-only

List your publication's sections (categories). Returns each section's id and name. Use a section id as section_id when creating or updating a draft to file it under that section.

Inputs: no named parameters.

get_subscriberA
Read-only

Look up a subscriber by exact email address. A listed free subscriber is a member even without paid access. Absence does not prove the address is eligible: Substack may suppress previous unsubscribes, and dashboard data can lag. Read-only; use to reconcile uncertain adds.

Inputs: email (required). Returns: note, email, last_sync, subscriber

get_subscriber_countA
Read-only

Get the current subscriber count for your Substack publication. Returns precision: 'exact' when the API reports a true count, 'approximate' when only Substack's rounded value is available (the real number is that or higher — render it hedged, e.g. '1,000+'), or 'unavailable' with count -1. Never treat an approximate value as exact.

Inputs: no named parameters. Returns: note, count, precision

get_user_profileA
Read-only

Anonymous public profile read by handle; one upstream read, no credentials sent. Returns minimal public fields and the primary publication when marked. Public profile data does not prove account ownership or access.

Inputs: handle (required). Returns: id, bio, name, handle, +2 more

list_draftsB
Read-only

List draft posts. Returns title, creation date, and audience for each draft.

Inputs: limit, offset.

list_incoming_recommendationsA
Read-only

List publications that recommend THIS publication (incoming), from the owner's Recommendations dashboard. Each row gives the recommender, when the recommendation started, whether it is active, whether it is mutual, and the free and paid subscribers Substack attributes to it (all-time, as the dashboard reports). null means Substack did not report the value; it never means zero or inactive. Authenticated: requires dashboard access for the selected publication. Returns one page in Substack's dashboard order (requested by attributed subscribers, descending; inactive rows may follow active ones); limit defaults to and is capped at 20 (Substack's page limit). Use next_offset to continue until has_more is false. Two reads (publication identity, then one page); no writes. For whom this publication recommends, use list_outgoing_recommendations; that list cannot show incoming recommendations.

Inputs: limit, offset. Returns: limit, total, offset, source, +7 more

list_outgoing_recommendationsA
Read-only

List who THIS publication recommends, NOT who recommends it (outgoing). A publication missing from this list may still recommend this one; use list_incoming_recommendations for incoming recommendations and attributed subscribers. Each row gives the recommended publication and when the recommendation was created. This endpoint can return fewer rows than its own total; ended_before_total is then true, and list_outgoing_recommendation_stats is the fuller outgoing list. Returns one page; limit defaults to and is capped at 50. Use next_offset to continue until has_more is false. Two reads (publication identity, then one page); no writes.

Inputs: limit, offset. Returns: limit, total, offset, source, +7 more

list_outgoing_recommendation_statsA
Read-only

List the subscribers THIS publication has sent to publications it recommends (outgoing impact), from the owner's Recommendations dashboard. This is NOT who recommends this publication; use list_incoming_recommendations for that. Each row gives the recommended publication, start date, active and mutual state, and free and paid subscribers sent. null means Substack did not report the value, never zero. Returns one page in Substack's dashboard order (requested by subscribers sent, descending); limit defaults to and is capped at 20. Two reads (publication identity, then one page); no writes.

Inputs: limit, offset. Returns: limit, total, offset, source, +7 more

list_publication_tagsA
Read-only

Read this publication's tag definitions. Includes hidden tags by default. Returns 25 rows by default, at most 100. Each call makes two reads (publication context and the full tag array), then paginates locally; results can change between calls. Validates publication identity and rejects malformed or oversized responses. Never creates or assigns tags.

Inputs: limit, offset, include_hidden. Returns: tags, limit, total, offset, +8 more

list_public_postsA
Read-only

Anonymous public archive read, no credentials sent. One upstream read of 1–50 posts (default 12); sort and search are upstream controlled. A full page gives next_offset, but has_more is unknown because Substack returns no total. Public metadata does not prove access to post bodies.

Inputs: sort, limit, query, offset, +1 more. Returns: sort, limit, posts, query, +5 more

list_published_postsB
Read-only

List published posts with pagination. Returns title, date, slug, and URL for each post.

Inputs: limit, offset. Returns: posts, total

list_scheduled_postsA
Read-only

List posts scheduled for future publication, soonest first. Read-only visibility into what's queued — scheduling itself is done in Substack's editor (this server does not schedule, publish, or delete long-form posts). Returns id, title, audience, and scheduled time (trigger_at).

Inputs: limit, offset.

list_subscribersA
Read-only

Read a page of private subscriber email addresses and subscription IDs. Dashboard data may lag recent changes. Use get_subscriber for exact membership checks.

Inputs: limit, offset. Returns: count, lastSync, subscribers

plan_draft_updateA
Read-only

Read an unpublished draft and review proposed Markdown/metadata changes, bounded previews, conversion losses and preflight. Returns a receipt binding the observed state and exact payload for update_draft. No writes. Hashes check consistency, not human approval; stale detection is best-effort, not atomic.

Inputs: draft_id (required), body, title, audience, +2 more. Returns: changes, receipt, preflight, editor_url, +8 more

preflight_draftA
Read-only

Read a draft and check title, audience, body structure, images and paywalls. Static review aid only: never modifies or publishes; does not guarantee rendering, link availability or publish readiness. Review the findings in Substack. Set substack_check=true to also read Substack's own prepublish errors and suggestions (one extra read), reported separately as substack_check.

Inputs: draft_id (required), substack_check. Returns: counts, draft_id, findings, editor_url, +4 more

rank_postsA
Read-only

Rank posts by one metric from Substack's dashboard email statistics: views, opened, sent, open_rate, click_through_rate, signups, subscribes, estimated_value or post_date, descending or ascending. Returns 10 rows by default, at most 20 (Substack's page limit), with total and next_offset for continuation. One read; nothing is changed. Values are passed through as Substack reports them: this server does not recompute, fill in or estimate metrics, and Substack does not document rate denominators. Each row marks the ranked value as reported, null or absent; null and absent are not zero, and null rates can appear among numeric rows. For one post's stats by ID, use get_post_analytics.

Inputs: limit, metric, offset, direction. Returns: rows, limit, total, metric, +10 more

restackA

Restack one post or Note without added commentary. PUBLISHES IMMEDIATELY to the configured reader account's public feed when live; no undo from this server. Experimental and disabled for live writes by default. Requires a separate substack.com reader session, never a publication session. account_user_id explicitly selects that reader identity; publication selection does not apply. Dry-run by default (no network); a live call requires dry_run=false, confirm_publish=true and explicit user approval of this exact account and target. One write attempt, then one bounded profile-feed readback; verified confirms presence, not new creation. Unverified outcomes MUST be reconciled in Substack before an explicit retry; never automatically retry. Automated callers must keep a durable attempt ledger across restarts.

Inputs: target_id (required), target_type (required), account_user_id (required), dry_run, +1 more. Returns: code, status, message, request, +7 more

search_postsA
Read-only

Search this publication's published, draft, or scheduled archive using Substack's server-side query. One page per call, at most 50 results; use next_offset to continue. Matching/indexing is controlled by Substack, not a guaranteed full-text scan. Returns metadata only; get_post/get_draft fetch full content.

Inputs: query (required), limit, offset, status. Returns: limit, posts, query, total, +7 more

search_subscribersA
Read-only

Read one page of private subscriber data with Substack-side filters and sorting. One authenticated read, no writes; 1–50 rows (default 10). Returns email, subscription ID and interval by default; include selects extra fields. total_matching is Substack's count at read time; dashboard data may lag writes and pagination is not a snapshot. Search matching is controlled by Substack, and a result does not prove all current subscribers were captured.

Inputs: sort, limit, offset, search, +6 more. Returns: note, sort, limit, offset, +6 more

update_draftA
Destructive

Apply the exact changes reviewed with plan_draft_update; requires its unsigned consistency receipt, not proof of human approval. Rechecks publication, unpublished state and fingerprint before one PUT, then reads back. Rejects known stale or changed payloads. A read/write race remains. Inspect unverified/conflict outcomes in Substack; never automatically retry. Accepts Markdown; does not publish or schedule.

Inputs: receipt (required), draft_id (required), body, title, +3 more. Returns: code, status, message, draft_id, +10 more

update_draft_tagsA
Destructive

Assign or remove up to 20 distinct tag IDs per direction on a draft; refuses published or scheduled drafts before writing; not atomic — see draft_state_after. Dry-run defaults to true. Reads publication context, definitions, draft and associations (four reads); a live change rechecks the draft before writing, then reads draft state and associations after writing (up to seven reads total). Sends at most 40 sequential writes, each once, with no automatic retry. Only a confirmed request observed in readback while the draft remains unpublished is verified. Hidden tags are allowed and reported. Draft tags may become public when you later publish the draft in Substack.

Inputs: draft_id (required), add, remove, dry_run. Returns: note, dry_run, results, draft_id, +3 more

upload_imageA

Upload an image to Substack's CDN. Provide exactly one of image_base64 (a base64 data URI), image_path (a local file path) or image_url (a public HTTPS image to download first). Returns a hosted image URL that is publicly fetchable by anyone with the link (an unlisted asset — not attributed to you or added to your feed).

Inputs: image_url, image_path, image_base64. Returns: image_url

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 39 tools

    Disambiguation3/5

    Many tools are clearly distinct, but several overlapping clusters create selection risk: get_public_post vs get_post, list_public_posts vs list_published_posts, get_draft vs export_draft vs preflight_draft vs plan_draft_update, and the recommendation tools. The verbose descriptions help, but an agent still has to carefully parse anonymous/public vs authenticated/published semantics.

    Naming Consistency4/5

    Almost all tools use snake_case with a verb_noun pattern such as get_post, create_draft, list_subscribers, and update_draft_tags. Minor deviations like restack and varying noun order are readable and do not rise to a mixed-convention problem.

    Tool Count2/5

    With 39 tools, the surface is much larger than the typical 3–15 well-scoped set and well beyond the 25+ threshold for being too many. The domain is broad, but the many highly granular read and analytics variants impose significant selection overhead.

    Completeness3/5

    The server covers many core workflows: public reads, drafts, subscribers, notes, comments, analytics, recommendations, tags, and images. However, major lifecycle operations are absent, including publishing long-form posts, scheduling, deleting posts/notes/comments, and creating or assigning tags outside draft tag updates.

    Maintenance

    ActivityActive
    ResponsivenessLimited data

    Related MCP Connectors

    Related MCP Servers