# Substack MCP Server

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

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 90
- Author: marcomoauro
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/marcomoauro/substack-mcp
- Updated: 2026-09-03
- HTML: https://affpapa.org/en/nevibecode/mcp/substack-mcp-server

## What it 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.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `SUBSTACK_PUBLICATION_URL`, `SUBSTACK_SESSION_TOKEN`, `SUBSTACK_USER_ID` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
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

### Codex

**Platform CLI**
```bash
codex mcp add substack-mcp-server --env SUBSTACK_PUBLICATION_URL=<SUBSTACK_PUBLICATION_URL> --env SUBSTACK_SESSION_TOKEN=<SUBSTACK_SESSION_TOKEN> --env SUBSTACK_USER_ID=<SUBSTACK_USER_ID> -- npx -y substack-mcp
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "substack-mcp-server": {
            "command": "npx",
            "args": [
                "-y",
                "substack-mcp"
            ],
            "env": {
                "SUBSTACK_PUBLICATION_URL": "<SUBSTACK_PUBLICATION_URL>",
                "SUBSTACK_SESSION_TOKEN": "<SUBSTACK_SESSION_TOKEN>",
                "SUBSTACK_USER_ID": "<SUBSTACK_USER_ID>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "substack-mcp-server": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "substack-mcp"
            ],
            "env": {
                "SUBSTACK_PUBLICATION_URL": "<SUBSTACK_PUBLICATION_URL>",
                "SUBSTACK_SESSION_TOKEN": "<SUBSTACK_SESSION_TOKEN>",
                "SUBSTACK_USER_ID": "<SUBSTACK_USER_ID>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e SUBSTACK_PUBLICATION_URL=<SUBSTACK_PUBLICATION_URL> -e SUBSTACK_SESSION_TOKEN=<SUBSTACK_SESSION_TOKEN> -e SUBSTACK_USER_ID=<SUBSTACK_USER_ID> substack-mcp-server npx -y substack-mcp
```
Replace <…> with your own values

## When to use it
- 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
- 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

## Similar
- [labelhead-artist-momentum](https://affpapa.org/en/nevibecode/mcp/labelhead-artist-momentum.md) — MCP server · ★ 107423
- [openshorts](https://affpapa.org/en/nevibecode/mcp/openshorts.md) — MCP server · ★ 7049
- [OpenScreen](https://affpapa.org/en/nevibecode/mcp/openscreen.md) — MCP server · ★ 4863
- [Usertour MCP Server](https://affpapa.org/en/nevibecode/mcp/usertour-mcp-server.md) — MCP server · ★ 2326
- [Appllama](https://affpapa.org/en/nevibecode/mcp/appllama.md) — MCP server · ★ 3046
- [obsei](https://affpapa.org/en/nevibecode/mcp/obsei.md) — MCP server · ★ 1441

## Other versions with the same name
- [Substack MCP Server · conorbronsdon](https://affpapa.org/en/nevibecode/mcp/conorbronsdon-substack-mcp-server.md) — ★ 44

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
