home / mcp / substack mcp server
Provides programmatic access to Substack actions via MCP, enabling drafts, image uploads, live updates, and notes.
Configuration
View docs{
"mcpServers": {
"arthurcolle-substack-mcp": {
"command": "bash",
"args": [
"-c",
"source ~/.substackrc && python3 $(pwd)/substack_mcp/server.py"
],
"env": {
"SUBSTACK_SID": "your-cookie-value-here",
"SUBSTACK_PUBLICATION": "your-publication.substack.com"
}
}
}
}You can control Substack posts programmatically using this MCP server. It lets you create, update, and publish drafts, upload images, run live blogs with real-time updates, post notes, and work with Substack’s editor structure through a robust MCP interface.
You interact with the Substack MCP server through an MCP client to manage drafts, publish posts, upload media, and run live blogging sessions. Start by configuring the MCP client to point at this server, then use the available tools to perform common tasks such as creating a draft, adding content, uploading images, starting a live blog, and publishing when you’re ready.
Prerequisites: you need Python and Git installed on your system. Ensure you have network access to install dependencies.
# Clone the repo
git clone https://github.com/acolle/substack-mcp.git
cd substack-mcp
# Install dependencies
pip install -r requirements.txtYou must provide your Substack publication identifier and session cookie value. Create a credentials file that your MCP server will source when starting.
# Create ~/.substackrc
cat > ~/.substackrc << 'EOF'
export SUBSTACK_PUBLICATION="your-publication.substack.com"
export SUBSTACK_SID="your-cookie-value-here"
EOFAdd the MCP server to your client configuration to run the server locally. The following command shows how to start the server within a shell process that your client can spawn.
# Add the MCP server to Claude Code
claude mcp add substack \
--command "bash" \
--args "-c" "source ~/.substackrc && python3 $(pwd)/substack_mcp/server.py"If you prefer a local JSON configuration, you can place the following in your Claude JSON configuration.
{
"mcpServers": {
"substack": {
"command": "bash",
"args": ["-c", "source ~/.substackrc && python3 /path/to/substack-mcp/substack_mcp/server.py"]
}
}
}Keep your Substack session cookie secure. Do not share your ~/.substackrc file or the session value in SUBSTACK_SID. Rotate credentials if you suspect any compromise.
Create a new draft post for a Substack publication.
Update the content of an existing draft.
Append content to a draft, useful for live blogging.
Insert a code block into a Substack draft.
Upload and attach an image to a draft post.
Publish a draft post to Substack.
Post a short Note to Substack Notes.
Retrieve a list of current drafts.
Retrieve a list of published posts.
Initiate a live blogging session for real-time updates.
End the active live blogging session.