substack-saved-mcp
This server provides a local, stdio-based MCP interface for managing saved Substack posts, with offline search and authenticated remote actions.
Search and List: Full-text search across titles, excerpts, authors, publications, and cached content, with filters by publication, audience tier, and date ranges. List posts with pagination and sorting.
Retrieve Posts: Get cached metadata for a specific post by URL or ID. Fetch and cache the full cleaned content, optimized for LLM consumption.
Save and Unsave: Bookmark or unbookmark posts remotely (requires authentication), updating both your Substack account and local cache.
Sync: Trigger incremental or full resync of saved posts from Substack into the local SQLite cache.
Cache Management: View statistics like total posts, publications, audience tiers, and last sync status. List all publications and audience tiers with post counts.
Authentication: Required for remote operations such as saving, unsaving, content fetching, and syncing.
Manages saved/bookmarked Substack posts, including syncing, searching, retrieving full content, and toggling save/unsave status.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@substack-saved-mcpshow me my saved posts about AI"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Substack Saved Posts & Notes MCP & CLI
A local, stdio-based Model Context Protocol (MCP) server and sync engine for your saved/bookmarked Substack posts and notes.
Features
Read & Search: Full-text search (SQLite FTS5) across saved post titles, excerpts, authors, and publications. Filter by publication, audience tier (e.g.
everyone,only_paid), and date ranges (published_atvssaved_at). Search also covers a post's full body text, but only for posts whose content has already been fetched once viaget-content/ theget_post_contenttool — a normalsyncstores metadata and excerpts, not full bodies, so posts you haven't opened yet are matched on their title/excerpt/metadata only, not their full text.Saved Notes, too: Substack's short-form notes are synced, searched, and cached separately from posts (they carry an author and body rather than a title or publication tier). Full-text search covers note bodies, authors, and restacked-post titles. Notes never require a browser at all — every notes operation (sync, save, unsave, full-content fetch) is a plain authenticated API call.
Full Content for LLMs: Fetch a saved post's or note's full content and get it back cleaned and formatted (headings, lists, links) for feeding directly to an LLM, with the result cached locally for next time.
Save & Unsave: Bookmark new Substack posts and notes, or unbookmark existing ones. Posts go through an authenticated browser session; notes are API-only.
Offline First: Fast, offline queries directly from local SQLite cache.
Privacy & Security: Keeps session credentials local, redacting tokens from logs.
FastMCP Protocol: Stdio MCP interface with rich tool suite and resources for both posts and notes.
Related MCP server: substack-article-mcp
Installation with uv
uv is the recommended fast Python package manager for installing and running substack-saved-mcp.
Option A: Install from PyPI as a System-wide Tool (uv tool install)
Install the published package from PyPI:
# Install system-wide into an isolated uv environment
uv tool install substack-saved-mcpTo install directly from a local repository folder instead:
# Navigate to the repository
cd /path/to/substack-saved-mcp
# Install system-wide into an isolated uv environment
uv tool install .
# Or install directly from a remote Git repository:
# uv tool install git+https://github.com/your-username/substack-saved-mcp.gitAfter installation, substack-saved-mcp is immediately available in your PATH:
# Verify installation
substack-saved-mcp --helpTo update or uninstall:
# Upgrade installed tool
uv tool upgrade substack-saved-mcp
# Uninstall tool
uv tool uninstall substack-saved-mcpOption B: Local Development / Development Environment (uv sync)
If you are developing or modifying the codebase:
# Clone and enter directory
cd substack-saved-mcp
# Install dependencies and dev tools (pytest)
uv sync --extra dev
# Run CLI commands using uv run
uv run substack-saved-mcp --help
# Run tests
uv run pytestQuick Start
# 1. Initialize local database
substack-saved-mcp init
# 2. Authenticate with Substack (opens interactive browser window once)
substack-saved-mcp login
# 3. Sync saved posts AND notes into local cache (both entities by default)
substack-saved-mcp sync
# 3b. Or sync just one entity
substack-saved-mcp sync --only posts
substack-saved-mcp sync --only notes
# 4. Search saved posts via CLI
substack-saved-mcp search "artificial intelligence"
# 4b. Filter by publication or audience tier (see which tiers are cached with `audiences`)
substack-saved-mcp audiences
substack-saved-mcp list --audience only_paid
substack-saved-mcp search "artificial intelligence" --audience everyone
# 5. Save or unsave a post
substack-saved-mcp save "https://example.substack.com/p/post-slug"
substack-saved-mcp unsave "https://example.substack.com/p/post-slug"
# 6. Get a saved post's full content, cleaned up and ready for an LLM
substack-saved-mcp get-content "https://example.substack.com/p/post-slug"
# 7. Work with saved notes the same way
substack-saved-mcp list-notes --limit 10
substack-saved-mcp search-notes "kubernetes" --author alice
substack-saved-mcp note-authors
substack-saved-mcp save-note "https://substack.com/@handle/note/c-123456"
substack-saved-mcp unsave-note "https://substack.com/@handle/note/c-123456"
substack-saved-mcp get-note "https://substack.com/@handle/note/c-123456"
# 8. Check combined status (posts and notes counts, last sync per entity)
substack-saved-mcp status
# 9. Launch stdio MCP server
substack-saved-mcp serveConfiguring MCP Clients (Claude Desktop, Goose, Cursor, etc.)
Add substack-saved-mcp to your MCP client's configuration file (e.g. claude_desktop_config.json).
Using System-Wide Installed Tool (uv tool or global binary)
{
"mcpServers": {
"substack-saved": {
"command": "substack-saved-mcp",
"args": ["serve"]
}
}
}Using uv directly from the Repository Path
If you prefer running directly from your repository path without installing system-wide:
{
"mcpServers": {
"substack-saved": {
"command": "uv",
"args": [
"--directory",
"/path/to/substack-saved-mcp",
"run",
"substack-saved-mcp",
"serve"
]
}
}
}Frequently Asked Questions (FAQ)
Where is the database saved?
By default, the SQLite database is saved in your OS application data directory:
Linux / macOS:
~/.local/share/substack-saved-mcp/saved_posts.sqlite
(or$XDG_DATA_HOME/substack-saved-mcp/saved_posts.sqliteifXDG_DATA_HOMEis set)
You can specify a custom database path or directory using environment variables:
export SUBSTACK_SAVED_DB_PATH="/path/to/my/custom_database.sqlite"
# or
export SUBSTACK_SAVED_DATA_DIR="/path/to/my/data_dir"Which Substack API does syncing saved posts use?
Saved posts are fetched from Substack's newer unified reader API by default, with automatic fallback to an older, posts-only API and finally to headless browser scraping if needed — you shouldn't normally need to think about this. If you ever want to force a specific source (e.g. while troubleshooting), set:
export SUBSTACK_SAVED_POSTS_SOURCE="unified" # or "legacy" or "dom"Leave it unset (or "auto") for the default, self-healing behavior.
What does a "partial" sync status mean?
If Substack rate-limits (HTTP 429) a sync so heavily that a page of results
can't be fetched even after retrying, the sync keeps whatever it already
fetched rather than failing outright, and reports status: partial (instead
of success) in substack-saved-mcp status or the sync tool's response.
When this happens on a sync --force, reconciliation (soft-deleting posts/notes
no longer in the remote list) is automatically skipped for that run, so a post
or note that merely couldn't be fetched is never mistaken for one you actually
unsaved on Substack. Just run sync again later — a subsequent successful run
picks up anything that was missed.
Will a browser window pop up when running as an MCP server?
No, a visible browser window will not open during normal MCP operations.
Read & Search Tools (
search_saved_posts,list_saved_posts,get_saved_post,search_saved_notes,list_saved_notes,get_saved_note,list_publications,list_audiences,saved_posts_status):
Operate 100% offline using the local SQLite database. Zero browser activity.Post Sync & Write Tools (
sync_saved_posts,save_post,unsave_post,get_post_content):
Run in headless background mode using the pre-authenticated session stored instorage_state.json.Note Sync & Write Tools (
sync_saved_notes,save_note,unsave_note,get_note_content):
Never open a browser page at all, headless or otherwise — Substack's notes endpoints are plain authenticated HTTP calls, so these tools only ever make direct API requests usingstorage_state.json.Interactive Login:
A visible browser window opens only when you manually runsubstack-saved-mcp loginfrom your terminal. If your session expires while using an MCP client, the tool will return a clear error message instructing you to re-authenticate viasubstack-saved-mcp logininstead of popping open a browser window unexpectedly.
What if I get a Playwright "Executable doesn't exist" error?
If you encounter an error like BrowserType.launch: Executable doesn't exist when running commands (especially login), it means Playwright hasn't installed its required browsers in the isolated environment.
To fix this, you need to run the playwright install command inside the environment where the tool is installed.
For a system-wide tool installation (via uv tool install), run:
~/.local/share/uv/tools/substack-saved-mcp/bin/playwright installIf you are using a local development environment (via uv sync), run:
uv run playwright installI edited the source code, but the installed substack-saved-mcp command still behaves like the old version. Why?
uv tool install copies the package into its own isolated environment at install time — it does not track your working tree. If you edited files under src/ (or pulled new commits) after installing the tool system-wide, the globally installed copy is stale and keeps running the old code, even though uv run substack-saved-mcp ... from the repo would use the latest source.
Reinstall from your current working tree to pick up the changes:
uv tool install . --no-cache --force--forcereplaces the existing installed version instead of skipping the install because a version is already present.--no-cacheensures a fresh build rather than reusing a cached wheel/build artifact from before your edits.
Do this any time after modifying the codebase and before relying on the globally installed substack-saved-mcp binary (as opposed to uv run substack-saved-mcp, which always reflects the working tree).
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityDmaintenanceStandalone Substack CLI + 26-tool MCP server. Your IDE drafts the replies. Zero AI API keys.261MIT
- 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.222MIT
- AlicenseBqualityCmaintenanceAn MCP server that gives Copilot access to Substack posts from your authenticated reader account, including paid subscriptions, enabling daily summary generation by syncing, caching, and summarizing posts.13MIT
- AlicenseNot gradedqualityBmaintenancePrivate MCP server for validating, previewing, creating, and updating Substack newsletter drafts through an MCP-compatible client.7231Apache 2.0
Related MCP Connectors
Agent-native MCP server over the public saagarpatel.dev corpus. Read-only, stateless.
Search Hacker News, Bluesky, and Substack from a single MCP interface
MCP Server for Slima - AI Writing IDE for Novel Authors with AI Beta Reader.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/toniher/substack-saved-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server