Substack MCP Server — Claude Code MCP server for drafts and analytics
Brings Substack into your AI assistant: prepare post drafts, search the archive, read analytics, publish Notes.
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-mcpWhat Substack MCP Server 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.
What it helps with
- 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 for the agent
- 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
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 @conorbronsdon/substack-mcpReplace <…> with your own values
Platform CLI
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-mcpReplace <…> with your own values
Config file
{
"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
Config file
{
"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
Platform CLI
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-mcpReplace <…> 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
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 @conorbronsdon/substack-mcp`, replacing the placeholders with your own values.
What does Substack MCP Server do?
It creates and edits long-form drafts, searches your archive, exports text, reports analytics, and manages opted-in subscribers. Publishing a long-form post stays manual, in Substack's editor.
Can it publish a post straight from the assistant?
Not a long-form post — drafts only. Short Notes go out immediately through create_note and create_note_with_link, with no preview and no way to undo.