Skip to main content
MCP server CX Codex

Substack MCP Server · marcomoauro — Claude Code MCP server: how to install

Connects AI assistants to your Substack publication to publish drafts, review metrics, and segment subscribers directly from chat.

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add substack-mcp -e SUBSTACK_PUBLICATION_URL=<SUBSTACK_PUBLICATION_URL> -e SUBSTACK_SESSION_TOKEN=<SUBSTACK_SESSION_TOKEN> -e SUBSTACK_USER_ID=<SUBSTACK_USER_ID> -- npx -y substack-mcp
Open on GitHub

What Substack MCP Server does

This server exposes 27 tools to manage a Substack publication from MCP-compatible clients. It lets models write drafts and query subscriber records without opening the author dashboard. Because Substack lacks a public developer API, operations run through an authenticated browser session.

Getting started requires Node.js 22 or Docker alongside three credentials: publication URL, numeric user ID, and a session cookie. The initial draft tool accepts raw text without converting Markdown headings into rich layout, so structured articles require formatted JSON nodes.

What it helps with

  • generate and save draft posts directly from assistant prompts
  • filter audience records across activity and subscription tiers
  • export reader engagement metrics including email opens
  • upload article images via direct tool invocations

Example prompts for the agent

  • List my five most recent drafts on Substack
  • Create a draft post titled 'Weekly Update' with introduction text
  • Filter subscribers who hold an active paid subscription plan

How to install Substack MCP Server

Platform CLI

claude mcp add substack-mcp -e SUBSTACK_PUBLICATION_URL=<SUBSTACK_PUBLICATION_URL> -e SUBSTACK_SESSION_TOKEN=<SUBSTACK_SESSION_TOKEN> -e SUBSTACK_USER_ID=<SUBSTACK_USER_ID> -- npx -y substack-mcp

Replace <…> with your own values

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about Substack MCP Server

What does Substack MCP Server do?

It connects your AI client to Substack using 27 distinct tools. The model can draft articles, inspect subscriber metrics, upload media, and review comments.

How do I install Substack MCP Server in Claude Code?

Run `claude mcp add substack-mcp -e SUBSTACK_PUBLICATION_URL=<SUBSTACK_PUBLICATION_URL> -e SUBSTACK_SESSION_TOKEN=<SUBSTACK_SESSION_TOKEN> -e SUBSTACK_USER_ID=<SUBSTACK_USER_ID> -- npx -y substack-mcp`.

Where do the required credentials come from?

You find your publication URL, user ID, and substack.sid or connect.sid cookie by inspecting dashboard network requests in browser developer tools while signed in.

Similar MCP servers

Everything for Marketing and content →

Substack MCP Server by other authors comes first.

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor