substack-mcp
by sandraschi
README.md
<div align="center">
# ๐ฐ Substack MCP (`substack-mcp`)
[](https://github.com/sandraschi/substack-mcp/actions)
[](https://www.python.org/)
[](https://github.com/jlowin/fastmcp)
[](https://fastapi.tiangolo.com/)
[](https://react.dev/)
[](https://vitejs.dev/)
[](https://tailwindcss.com/)
[](https://github.com/casey/just)
[](https://docs.astral.sh/ruff/)
[](https://biomejs.dev/)
[](https://microsoft.github.io/pyright/)
[](https://tauri.app/)
[](LICENSE)
**FastMCP 3.1+ Model Context Protocol (MCP) server & SOTA React webapp dashboard for Substack newsletters.**
[Quick Start](#-quick-start) โข [What is Substack?](#-what-is-substack) โข [Dual Capabilities](#-dual-capabilities-searchread--draftpublish) โข [Onboarding](#-built-in-onboarding--help) โข [Just Commands](#-just-task-runner-commands) โข [Documentation](docs/README.md)
---
</div>
## ๐ง What is Substack?
**[Substack](https://substack.com)** is an independent publishing platform and creator network founded in 2017. It allows writers, journalists, researchers, podcasters, and thinkers to publish long-form newsletters directly to their readers' email inboxes and the web.
```
+-----------------------------------------------------------------------------------+
| Substack Publication |
+----------------------------------------+------------------------------------------+
|
+-------------------+---------------+---------------+--------------------+
| | | |
v v v v
+---------+ +------------------+ +-------------------+ +-------------------+
| Posts | | Substack Notes | | Substack Chat | | Subscriber Tiers |
| (Email | | (Short-form | | (Community | | (Free, Monthly, |
| + Web) | | Social Feed) | | Messaging) | | Annual, Founder) |
+---------+ +------------------+ +-------------------+ +-------------------+
```
> ๐ **Want a deep dive?** Read our complete [Substack Primer Guide](docs/SUBSTACK_PRIMER.md) covering Substack's history, platform architecture, RSS endpoints, and monetization strategies.
---
## โก Dual Capabilities: Search/Read & Draft/Publish
`substack-mcp` is designed for **both** readers/researchers and creators/publishers:
| Workflow Mode | Auth Required? | Capabilities & Features |
|---|---|---|
| ๐ **Search & Read** *(Public Mode)* | **No Login Needed** | โข Ingest RSS feeds from any Substack newsletter domain<br>โข Full-text offline article search in local SQLite<br>โข Reader pane & audio/podcast details<br>โข Star & bookmark favorite articles |
| โ๏ธ **Draft & Publish** *(Author Mode)* | **Requires `substack.sid` Cookie** | โข Stage, edit, and update Substack post drafts<br>โข Convert Markdown to Substack HTML with paywalls (`<!-- paywall -->`)<br>โข Local AI Writing Assistant (Ollama, LM Studio)<br>โข Subscriber growth metrics, view counts, & open rates<br>โข Post comment browsing & reply staging |
---
## ๐ Built-in Onboarding & Help
To get you up and running in minutes, `substack-mcp` includes interactive onboarding directly inside the webapp and in the documentation:
- ๐ฑ **Interactive Webapp Dashboard (`http://127.0.0.1:11164`)**:
- **Onboarding Tab**: Step-by-step setup wizard.
- **Help & System Diagnostics Tab**: Live health check cards for API Backend (`:11163`), SQLite DB, Substack Cookie Auth, and Local LLMs.
- **Cookie Extractor Tutorial**: Visual guide to copy your `substack.sid` session cookie from Browser DevTools (`F12`) into Settings.
- **MCP Client Integration Snippets**: One-click endpoints for Google Antigravity, Claude Desktop, and Cursor.
- ๐ **Repo Guides**: See [`INSTALL.md`](INSTALL.md) and [`docs/ONBOARDING.md`](docs/ONBOARDING.md).
---
## โ๏ธ `just` Task Runner Commands
All common tasks are defined in the repository [`justfile`](justfile):
```bash
# Run full quality check (lint + typecheck + pytest)
just check
# Run Python Pytest test suite
just test
# Lint backend (ruff) and webapp (biome)
just lint
# Format code (ruff format & biome format)
just format
# Static typecheck (pyright & tsc)
just typecheck
# Start unified dev servers (clears zombie ports, starts backend & webapp, opens browser)
just start
# Pack .mcpb desktop package
just mcpb-pack
# Build Tauri NSIS Windows installer
just tauri-build
# Run headless CUA smoke test
just cua-smoke
```
---
## โก Quick Start
### 1. Launch Server & Webapp Dashboard
```powershell
# Clone the repository
git clone https://github.com/sandraschi/substack-mcp.git
cd substack-mcp
# Launch backend (11163) and dashboard (11164) via just or PowerShell script
just start
# or: .\start.ps1
```
The webapp dashboard will automatically open in your default browser at `http://127.0.0.1:11164`.
### 2. Connect AI Assistants (Google Antigravity / Claude Desktop)
Point your MCP client configuration to the FastMCP Streamable HTTP endpoint:
```
http://127.0.0.1:11163/mcp
```
---
## ๐ ๏ธ Portmanteau MCP Tools
| Tool | Operations | Description |
|---|---|---|
| [`substack_feed`](docs/TOOLS.md#1-substack_feed) | `fetch`, `list_publications`, `query`, `get_article` | Ingest RSS feeds, list tracked newsletters, search articles |
| [`substack_drafts`](docs/TOOLS.md#2-substack_drafts) | `create`, `list`, `get`, `update`, `delete`, `convert_markdown` | Stage drafts, edit content, render Markdown HTML |
| [`substack_stats`](docs/TOOLS.md#3-substack_stats) | `record`, `get`, `summary` | Track subscriber metrics, post views, open rates |
| [`substack_community`](docs/TOOLS.md#4-substack_community) | `get_comments`, `post_comment` | Read article comments and stage discussion responses |
---
## ๐ Sub-Package Documentation
- ๐ **[Substack Primer Guide (`docs/SUBSTACK_PRIMER.md`)](docs/SUBSTACK_PRIMER.md)** โ What Substack is, platform structure, history, and ecosystem.
- ๐จ **[Webapp Dashboard (`webapp/`)](webapp/README.md)** โ Vite, React, Tailwind CSS, and Biome setup.
- โ๏ธ **[Backend Package (`substack_mcp/`)](substack_mcp/README.md)** โ FastAPI, FastMCP 3.1+, Local LLM engine, and SQLite database.
- ๐งช **[Test Suite (`tests/`)](tests/README.md)** โ Pytest unit test specifications and coverage.
- ๐ **[Scripts (`scripts/`)](scripts/README.md)** โ Fleet launchers and prompt generation utilities.
- ๐ **[Documentation Hub (`docs/`)](docs/README.md)** โ Complete configuration, onboarding, tools, and troubleshooting guides.
---
## ๐ License
Distributed under the [MIT License](LICENSE).
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo issues