substack-mcp
Provides tools for reading Substack publications, posts, comments, author profiles, recommendations, and the Notes feed using a subscriber's session.
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 MCP π°
An MCP server for reading Substack β publications, posts, comments, author profiles, recommendations, and your Notes feed β using your own reader session, no official API required.
For use with Claude, Codex, and other MCP-compatible coding agents.
It's read-only π: nothing it does can post, like, comment, or change your account state. The session cookie is only ever sent to Substack hosts you're actually subscribed to, and tool output is wrapped in a delimited block marking it as untrusted third-party content (post bodies and comments are written by other people, not you) β both defenses against prompt injection carried in what you read.
π οΈ Tools
Tool | Description |
| List recent posts from a publication |
| Get a post's full content by domain + slug (works on paywalled posts if you're a paid subscriber) |
| Get a post's full content from any post URL, including generic |
| Search posts within a publication |
| Search across every publication you're subscribed to or follow |
| List your subscriptions (free and paid) |
| New posts across every publication you read, newest first, with read/unread state. Optional |
| Get a post's comments, with nested replies, by domain + slug |
| Same, from any post URL |
| Get an author's public profile (bio, social links, publications they write for) |
| List publications a given publication recommends to its readers |
| List recent items from your Notes home feed |
| Tag a publication by topic (e.g. |
| List every tag you've set and which publications carry each one |
Related MCP server: substack-article-mcp
π·οΈ Tagging
Substack doesn't expose a topic or category field for publications β tag_publication is a
local layer this server keeps for you, stored at ~/.substack-mcp/tags.json (override with
SUBSTACK_MCP_TAGS_FILE). Tag your accounts by whatever grouping you want β e.g. financial-research
for the ones covering markets, something else for the rest β then pass tag to
search_all_subscriptions or get_inbox to scope to just that group. Nothing here reads or
infers a topic from Substack itself; you (or your agent, reading a few recent post titles) decide
what a publication is about.
βοΈ How it works
Substack doesn't expose a public API for these reads. Instead, this server replays the same /api/v1/* requests your browser makes when you're logged in, authenticated with your substack.sid session cookie. That means:
You need an active Substack account and a valid session token.
The token expires periodically β when requests start failing with an auth error, re-extract it (see below).
β οΈ This is an unofficial library and is not affiliated with or endorsed by Substack. It only accesses content you're already entitled to (your own subscriptions, public posts, and your own account data) and doesn't bypass paywalls or rate limits. Be mindful of Substack's Terms of Use when using it.
π Setup
git clone https://github.com/ryanrodrigues25200525-svg/Substack-MCP.git
cd Substack-MCP
npm install
npm run buildπ Get your session token
Log into Substack in your browser.
Open DevTools β Application/Storage β Cookies β
substack.com.Copy the value of the
substack.sidcookie.
π Configure your MCP client
Add to your MCP client's config (e.g. Claude Code's ~/.claude.json, under mcpServers):
{
"mcpServers": {
"substack": {
"command": "node",
"args": ["/absolute/path/to/Substack-MCP/dist/index.js"],
"env": {
"SUBSTACK_SESSION_TOKEN": "your_token_here"
}
}
}
}π« Never commit your token. Keep it in your local MCP client config only, not in this repo or in version control.
π§ͺ Development
npm run build # compile TypeScript
SUBSTACK_SESSION_TOKEN=xxx npm test # integration suite against live Substack endpoints
npm run test:trust # unit tests for the session-cookie trust boundary (stubbed, no token needed)npm test makes real requests against live publications, so it needs a valid SUBSTACK_SESSION_TOKEN and is subject to Substack's rate limits. npm run test:trust stubs fetch and covers which hosts get the session cookie, path escaping, and the untrusted-content envelope β no network, no token.
π License
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
This server cannot be deployed
Maintenance
Related MCP Connectors
Substack MCP server for ChatGPT, Claude and any AI agent: create post, schedule post, publish Note, reply to Notes, send direct message, moderate comments, list subscribers and get post stats in your own Substack account. Cotlet works in the account through your Cloud Browser, a real Chrome where you sign in to Substack yourself; Cotlet does not store your password and you need no Substack API key. About the official Substack API: Substack has only a limited API (checked 11 Oct 2026). Its Developer API looks up public creator profiles after approval, and there is no public API to write posts or Notes, manage subscribers or send email. Setup and FAQ: https://cotlet.dev/integrations/substack-api-mcp-server
Bluesky posts, profiles, feeds, threads & Substack newsletter search and publication feed MCP API.
Bluesky posts, profiles, feeds, threads & Substack newsletter search and publication feed MCP API.
Lemmy MCP β public reads on any Lemmy instance.
Related MCP Servers
- AlicenseAqualityBmaintenanceMCP server for Substack's official Publisher API that enables querying post analytics, subscriber counts, and publication data through natural language from MCP clients.76MIT
- AlicenseNot gradedqualityCmaintenanceMCP server for Substack that enables reading articles, comments, feed, and subscriptions from AI clients like Cursor and Claude, with optional authentication for paid content.64 npm5MIT
- AlicenseNot gradedqualityCmaintenanceRemote MCP server that provides tools to read a Substack user's notes and recent activity when given a public profile name.177 npmMIT
- AlicenseNot gradedqualityDmaintenanceEnables managing Substack publications: publish Notes and posts, manage drafts, pull analytics, and read any publication's public feed via MCP.MIT