# Substack MCP Server

Brings Substack into your AI assistant: prepare post drafts, search the archive, read analytics, publish Notes.

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

## What it does

This server hands your assistant the keys to a Substack publication. From there it can assemble a long-form draft, dig up an older post by keyword, export the text, pull the numbers, and list subscribers who opted in.

Long-form posts never leave draft state here. You open Substack's editor and hit publish yourself. Notes are the loud exception: `create_note` and `create_note_with_link` go live right away, since Substack keeps no draft version of a Note. There is no preview and no undo from the server, so treat those two tools as public actions.

Node.js 22 or newer is required. Browser sign-in also needs Playwright and Chromium: `npm install @conorbronsdon/substack-mcp playwright`, then `npx playwright install chromium` and `npx substack-mcp login https://yourblog.substack.com --user-id 12345`. Without `--profile` the session lands in `~/.substack-mcp/session.json`. Pasting `SUBSTACK_PUBLICATION_URL`, `SUBSTACK_SESSION_TOKEN` and `SUBSTACK_USER_ID` as environment variables skips the browser step. Run `npx substack-mcp doctor --json --check-auth` first if you want to know whether reads work — it does one read per publication and says nothing about write permission.

## 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.
- Works with: Playwright

## 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 @conorbronsdon/substack-mcp
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
codex mcp add conorbronsdon-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 @conorbronsdon/substack-mcp
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "conorbronsdon-substack-mcp-server": {
            "command": "npx",
            "args": [
                "-y",
                "@conorbronsdon/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": {
        "conorbronsdon-substack-mcp-server": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@conorbronsdon/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> conorbronsdon-substack-mcp-server npx -y @conorbronsdon/substack-mcp
```
Replace <…> with your own values

## When to use it
- turn notes and links into a long-form draft
- find an old post in the archive by keyword
- export a draft to a file before editing
- check a post's stats and subscriber count
- publish a short Note with a link

## Example prompts
- How many Substack subscribers do I have?
- Find my posts about MCP in the archive and open one as a draft
- Create a Note linking to my latest post

## 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

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