Substack API MCP
Provides tools for interacting with Substack, allowing AI agents to create drafts, publish now, schedule posts, manage tags, and perform other post operations on a Substack publication.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Substack API MCP
Substack does not provide a native public API for publishing posts.
But authors who want to draft, publish, and schedule from AI agents (Cursor, Claude, and other MCP hosts) still need a way out. This is the MCP server to publish to Substack via any agent.
Will not start without a valid APISUBSTACK_API_KEY (ask_*). Get API key here: apisubstack.com.
Why this exists
Reality | What we built |
No official Substack write/publish API for authors | A posting MCP so agents can create drafts, publish now, and schedule |
Authors live in the browser editor | Authors publish through their agents instead |
Session-cookie auth is the practical path today |
|
Related MCP server: Substack MCP Server
Examples
Tools
Tool | Description |
| Verify |
| Create draft / publish now / schedule (+ optional tags) |
| Fetch draft by id |
| Pangram AI-text / AI-slop check on a draft |
| Update draft fields |
| Publish existing draft |
| Schedule existing draft |
| Delete draft |
| List publication tags |
| Create tag |
| Ensure + attach tags |
| List tags on a post/draft |
| Create a Substack Note (optional link attachment) |
| Delete a Substack Note by id |
Install
cd /path/to/Substack-API-MCP
python3 -m venv .venv
source .venv/bin/activate
pip install -e .Auth env
Sign in at apisubstack.com, start the free trial, generate an
ask_*API key.Copy your Substack
substack.sidcookie:Open Chrome and sign in to Substack.
Open DevTools → Application → Cookies.
Select
https://substack.com(or your publication host, e.g.https://yourname.substack.com).Find the cookie named
substack.sidand copy its Value.
Export:
export APISUBSTACK_API_KEY="ask_YOUR_KEY"
export SUBSTACK_PUBLICATION_URL="https://yourname.substack.com"
export SUBSTACK_SID="YOUR_SUBSTACK_SID_VALUE"
# optional
# export SUBSTACK_USER_ID="123456"Cookies expire. If you get 401/403, refresh substack.sid and try again.
Run
substack-api-mcp
# or
python -m substack_api_mcpCursor / Claude Desktop config
See mcp.example.json:
{
"mcpServers": {
"substack-api": {
"command": "/ABSOLUTE/PATH/TO/Substack-API-MCP/.venv/bin/substack-api-mcp",
"args": [],
"env": {
"APISUBSTACK_API_KEY": "ask_YOUR_KEY",
"SUBSTACK_PUBLICATION_URL": "https://yourname.substack.com",
"SUBSTACK_SID": "YOUR_SUBSTACK_SID_VALUE"
}
}
}
}Use absolute paths. Restart the host after config changes.
License
Attribution-or-Royalty (source available). See LICENSE and COMMERCIAL_LICENSE.md.
Non-commercial use: allowed (keep copyright + license notice).
Commercial use: either visible attribution everywhere the software is used, or a paid royalty / commercial license via apisubstack.com.
Use at your own risk. Not affiliated with Substack. Built so authors can publish through their agents when Substack itself does not offer a native publishing API.
This server cannot be deployed
Maintenance
Related MCP Connectors
Draft & schedule Substack Notes, manage articles, and read stats via WriteStack.
Draft, schedule, and analyze content for Substack, Medium, LinkedIn, X, Bluesky, and Threads.
Draft, schedule and publish social media posts from any AI agent.
Publish to self-hosted WordPress from AI agents: markdown, images, SEO, and Notion sync.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables AI tools to programmatically manage Substack content, including creating drafts, publishing posts, and posting to Substack Notes. It supports image uploads, live blogging, and document formatting compatible with Substack's ProseMirror editor.119MIT
- AlicenseAqualityBmaintenanceEnables LLM clients to interact with Substack's API for automations like creating posts and managing drafts.27214 npm91MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI assistants to search and read Substack newsletter feeds, stage and publish drafts, interact with community comments, and track subscriber and post analytics through local tools and a web dashboard.1MIT
- AlicenseAqualityBmaintenanceEnables AI agents to write and publish Substack posts, manage subscribers and analytics, schedule Notes, and research other writers through 65 tools.6554 npm1MIT