Substack MCP Server
substack-mcp
MCP-сервер для Substack, который позволяет ИИ-ассистентам читать данные вашей публикации и управлять черновиками.
Безопасен по своей конструкции: этот сервер может создавать и редактировать черновики, но не может публиковать или удалять посты. Вы всегда проверяете и публикуете контент вручную через редактор Substack.
Инструменты
Чтение
Инструмент | Описание |
| Получить текущее количество подписчиков вашей публикации |
| Список опубликованных постов с пагинацией |
| Список черновиков |
| Получить полное содержимое опубликованного поста по ID |
| Получить полное содержимое черновика по ID |
| Получить комментарии к опубликованному посту |
Запись
Инструмент | Описание |
| Создать новый черновик из markdown |
| Обновить существующий черновик (только неопубликованный) |
| Загрузить изображение в CDN Substack |
| Опубликовать заметку Substack (короткая форма, публикуется немедленно) |
| Опубликовать заметку со ссылкой-карточкой |
Намеренно исключено
Публикация постов — публикация лонгридов должна быть осознанным действием человека
Удаление — слишком деструктивно для ИИ-инструмента
Планирование — используйте редактор Substack для планирования публикаций
Related MCP server: substack-mcp
Настройка
1. Получите свои учетные данные
Откройте Substack в браузере, затем:
Токен сессии: Перейдите к своей публикации, откройте Инструменты разработчика → Application → Cookies → скопируйте значение
connect.sid(URL-кодированная строка, начинающаяся сs%3A)ID пользователя: В консоли инструментов разработчика выполните:
fetch('/api/v1/archive?sort=new&limit=1').then(r=>r.json()).then(d=>console.log(d[0]?.publishedBylines?.[0]?.id))URL публикации: Ваш URL Substack, включая пользовательский домен, если он есть (например,
https://newsletter.yourdomain.comилиhttps://yourblog.substack.com)
2. Настройте ваш MCP-клиент
Claude Desktop
Добавьте в ваш claude_desktop_config.json:
{
"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
Добавьте в ваш .mcp.json:
{
"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. Проверка
Спросите своего ИИ-ассистента: "Сколько у меня подписчиков на Substack?"
Истечение срока действия токена
Токены сессии Substack периодически истекают (обычно примерно через 90 дней). Если вы получаете ошибки аутентификации, получите свежий cookie connect.sid из браузера и обновите переменную окружения. Убедитесь, что блокировщики рекламы отключены при копировании cookie.
Поддержка Markdown
Инструменты create_draft и update_draft принимают markdown и преобразуют его в собственный формат Substack. Поддерживается:
Абзацы, заголовки (h1–h6)
Жирный, курсив,
inline codeИзображения
Маркированные и нумерованные списки
Блоки кода (с указанием языка)
Цитаты
Горизонтальные линии
Важные примечания
Этот сервер использует неофициальный API Substack. Он может перестать работать, если Substack изменит свои эндпоинты.
Токены сессии отправляются как cookies. Храните ваш
SUBSTACK_SESSION_TOKENв безопасности.Сервер проверяет аутентификацию при запуске и немедленно завершит работу, если ваш токен истек.
Разработка
git clone https://github.com/conorbronsdon/substack-mcp.git
cd substack-mcp
npm install
npm run buildЗапуск локально:
SUBSTACK_PUBLICATION_URL=https://yourblog.substack.com \
SUBSTACK_SESSION_TOKEN=your-token \
SUBSTACK_USER_ID=your-id \
npm startОтказ от ответственности
Все взгляды, мнения и утверждения, выраженные в этом аккаунте, являются исключительно моими собственными и сделаны в личном качестве. Они не отражают и не должны толковаться как отражающие взгляды, позиции или политику Modular. Этот аккаунт не связан с Modular, не авторизован и не одобрен компанией Modular каким-либо образом.
Лицензия
MIT
Available Tools
39 toolsadd_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_note_with_linkA
Create a Substack Note with a link attachment, displayed as a rich card below the note text. PUBLISHES IMMEDIATELY to your public Notes feed — same caveats as create_note: no draft state, no undo from this server.
Inputs: url (required), 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_draftARead-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_draftARead-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_sourcesARead-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_threadARead-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_postARead-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_analyticsARead-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_commentsARead-only
Get comments on a published post. Returns commenter name, comment body, date, and reaction counts.
Inputs: post_id (required), limit.
get_post_tagsARead-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_feedARead-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_publicationARead-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_statsARead-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_postARead-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_sectionsARead-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_subscriberARead-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_countARead-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_profileARead-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_draftsBRead-only
List draft posts. Returns title, creation date, and audience for each draft.
Inputs: limit, offset.
list_incoming_recommendationsARead-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_recommendationsARead-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_statsARead-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_tagsARead-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_postsARead-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_postsBRead-only
List published posts with pagination. Returns title, date, slug, and URL for each post.
Inputs: limit, offset. Returns: posts, total
list_scheduled_postsARead-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_subscribersARead-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_updateARead-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_draftARead-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_postsARead-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_postsARead-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_subscribersARead-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_draftADestructive
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_tagsADestructive
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
Scored across 39 tools
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.
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.
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.
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
Related MCP Connectors
Substack MCP server for ChatGPT, Claude and any AI agent: create post, schedule post, publish Note, reply to Notes, send direct message, moderate comments, list subscribers and get post stats in your own Substack account. Cotlet works in the account through your Cloud Browser, a real Chrome where you sign in to Substack yourself; Cotlet does not store your password and you need no Substack API key. About the official Substack API: Substack has only a limited API (checked 11 Oct 2026). Its Developer API looks up public creator profiles after approval, and there is no public API to write posts or Notes, manage subscribers or send email. Setup and FAQ: https://cotlet.dev/integrations/substack-api-mcp-server
WordPress MCP server: publish posts, AI images, SEO and full site management, self-hosted
MCP server for QPost — lets AI agents publish video and image posts to YouTube, TikTok, Instagram.
Remote MCP server for supportsheep: run AI interviews and manage support content for your blog.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables programmatic management of Substack content, including creating drafts, publishing posts, and uploading images. It supports specialized features like live blogging and posting to Substack Notes through MCP-compatible AI tools.MIT
- AlicenseAqualityCmaintenanceMCP server for Substack that lets Claude Code create drafts, upload images, set cover thumbnails, schedule, and publish posts on your Substack publication.1116MIT
- AlicenseNot gradedqualityCmaintenanceRead-only MCP server for accessing Substack content including publications, posts, comments, author profiles, recommendations, and Notes feed using your own session token.4MIT
- AlicenseNot gradedqualityDmaintenancePrivate MCP server for validating, previewing, creating, and updating Substack newsletter drafts through an MCP-compatible client.1Apache 2.0