substack-mcp
Read-only MCP server for accessing Substack content including publications, posts, comments, author profiles, recommendations, and Notes feed using your own session token.
README
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.
๐ ๏ธ Tools
| Tool | Description |
|---|---|
list_published_posts |
List recent posts from a publication |
get_post |
Get a post's full content by domain + slug (works on paywalled posts if you're a paid subscriber) |
get_post_by_url |
Get a post's full content from any post URL, including generic substack.com/@handle/p-<id> links |
search_posts |
Search posts within a publication |
search_all_subscriptions |
Search across every publication you're subscribed to |
list_subscriptions |
List your subscriptions (free and paid) |
get_post_comments |
Get a post's comments, with nested replies, by domain + slug |
get_post_comments_by_url |
Same, from any post URL |
get_author_profile |
Get an author's public profile (bio, social links, publications they write for) |
get_recommendations |
List publications a given publication recommends to its readers |
get_notes_feed |
List recent items from your Notes home feed |
โ๏ธ 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 # run the integration test suite against live Substack endpoints
The test suite makes real requests against live publications, so it needs a valid SUBSTACK_SESSION_TOKEN and is subject to Substack's rate limits.
๐ License
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
Neon Database
MCP server for interacting with Neon Management API and databases
E2B
Using MCP to run code via e2b.
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.