
substack-ops
io.github.06ketan由 GitHub 帳號 06ketan 發布v0.3.5更新於 Oct 24, 2026
Substack CLI + 26-tool MCP server. Your IDE drafts replies via propose_reply. No API keys.
概覽
本機 Substack 命令列工具與 MCP 伺服器,讓助理用你的工作階段 Cookie 讀取文章、筆記和留言,並起草或發布回覆。
- 可以做什麼
- 讀取文章、筆記、留言、動態消息、個人檔案、推薦、作者和分類,通過驗證後可取得付費文章正文,並可用刊物參數讀取多個刊物。透過先提議後確認的流程,為尚未回覆的留言和筆記起草回覆,或批次匯出草稿到檔案離線審閱,只送出已核准的項目。寫入 Substack:發布筆記、新增留言、按讚、轉發,以及刪除自己的留言。執行以規則為準或由宿主大型語言模型起草的回覆模式,以及按讚回讚、自動回覆、自動轉發、回追等預設自動化,可循環常駐執行。查詢本機稽核記錄與去重資料庫,並把伺服器設定安裝到 Cursor、Claude 等宿主。
- 適用情境
- 你經營 Substack 刊物或經常閱讀 Substack,希望助理整理尚未回覆的留言、依你的語氣起草回覆,並在你核准後發布。也適合把文章、留言和動態消息資料帶進對話中分析。
- 執行需求
- 本機 Python 環境,以 uvx 執行(套件名 substack-ops);建議安裝選用的 mcp SDK 擴充以取得完整的 26 個工具。需要 SUBSTACK_SESSION_TOKEN 中的 Substack 工作階段 Cookie,以及 SUBSTACK_PUBLICATION_URL 和 SUBSTACK_USER_ID(或寫在宿主的 mcp.json 中)。可選用 SUBSTACK_OPS_LLM_CMD 和 SUBSTACK_OPS_MCP_PATH。需要連線至 Substack 的網路。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 substack-ops,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
substack-ops
[PyPI version] [PyPI downloads] [Python 3.12+] [License: MIT] [MCP compatible] [MCP Registry] [Anthropic DXT] [Glama MCP server] [MCP Badge] [CI]
Standalone Substack CLI + 26-tool MCP server for Cursor MCP, Claude MCP, OpenCode MCP, and any stdio MCP host. Your IDE drafts the replies. Zero AI API keys.
Site → substack-ops.chavan.in · Source → 06ketan/substack-ops · Glama → mcp/servers/06ketan/substack-ops
[substack-ops MCP server card on Glama]Posts, notes, comments, replies, reactions, restacks, recommendations, search, profiles, feeds, automations, MCP server, Textual TUI. One Python install, one binary, MIT licensed.
TL;DR — MCP-native (no API key, one command)
Your host's LLM (Cursor's, Claude's) does the drafting via the
propose_reply / confirm_reply tools. No ANTHROPIC_API_KEY /
OPENAI_API_KEY needed.
Wrong install?
This project is substack-ops on PyPI — install with uv / uvx, not unrelated npx packages that appear when searching “Substack MCP”. Canonical listing: Glama — 06ketan/substack-ops.
Works with (MCP)
These rows help discovery (search keywords); confirm each host’s current MCP docs before upgrading.
Open source–oriented hosts
Large commercial stacks
OpenCode (copy-paste)
Auto-install:
Manual (~/.config/opencode/opencode.json):
Optional version pin: use ["uvx", "substack-ops==0.3.5", "mcp", "serve"] (replace with current PyPI release).
Setup (dev / from source)
Auth defaults to ~/.cursor/mcp.json's mcpServers.substack-api.env. Override
with env or .env. Or use one of the auth flows in auth login / auth setup.
Command surface
Grouped by intent. Every write defaults to --dry-run; flip with
--no-dry-run (and --yes-i-mean-it for the irreversible ones). All writes
land in .cache/audit.jsonl and are dedup-checked against .cache/actions.db.
Auth (4)
Read — Posts (8)
Read — Notes (5)
Read + Write — Comments (5)
Reply engine (6)
Read — Discovery (8)
Automations (3)
Operations + safety (3)
MCP server (3)
Other (1)
Multi-publication
Every read command accepts --pub <subdomain|domain>. Defaults to your own
publication.
Reply modes
After every live note-reply the engine re-fetches the new comment and asserts
ancestor_path is non-empty. If empty, the audit row's result_status is
flipped to "orphaned" (the M2 bug where parent_comment_id was silently
dropped — now caught).
Automations
Built-in presets (auto presets):
- like-back — when someone reacts to your note, react to their latest note.
- auto-reply — same trigger, but post a templated thank-you.
- auto-restack — when a watchlist handle posts a new note, restack it.
- follow-back — when someone follows you, follow them back.
Custom YAML rules under ~/.config/substack-ops/auto/*.yaml. Loop with
auto daemon <name> --interval 60.
MCP server
Manual config snippet (if you prefer):
If the mcp SDK is not installed, the server falls back to a minimal
stdin/stdout JSON-line dispatcher that's still useful for scripting:
MCP-native draft loop (no API key)
3 tools designed to let your host LLM draft for you:
Differentiator tools (the safety + drafting stack that makes the unattended
mode safe): bulk_draft_replies, send_approved_drafts, audit_search,
dedup_status, get_unanswered_comments, propose_reply, confirm_reply.
LLM strategy
Two layers, both free:
- MCP-native (default). Host LLM drafts via
propose_reply/confirm_reply. No env vars, no API key. Use this for interactive replies. - Subprocess CLI (daemon path). For
reply auto/auto daemonwhen no human is in the loop. Auto-detectsclaude(Claude Code),cursor-agent, orcodexon PATH. Override withSUBSTACK_OPS_LLM_CMD.
There is no paid-API-key path. If you want one, vendor the old _anthropic /
_openai methods from substack-ops v0.2.0 yourself.
Textual TUI
6 tabs: Notes / Posts / Comments / Feed / Auto / Profile. Sub-tabs: 1=mine, 2=following, 3=general. Keys: tab, 1-3, ↑/↓, enter, r, l, s, o, q/esc.
Auth methods
Architecture
Endpoints used
Related MCPs
- slideshot — HTML → slides (PNG / PDF / PPTX); npm
slideshot-mcp. - medium-ops — Medium stories + responses + MCP (PyPI
medium-ops).
Tests
Coverage today: auth, client (read+write+engagement+delete), reply engine,
dedup DB, audit log search, MCP tool registry & dispatcher, automation engine
preset loader, the M2 parent_id regression test, the M2 host-mismatch
regression test.
GSD workflow
.planning/ scaffold for Get Shit Done
under ~/.claude/skills/gsd-*. Roadmap at .planning/ROADMAP.md,
per-phase plans at .planning/phases/M*/PHASE.md.
Known gaps
- Full email stats (opens/clicks/views) — needs dashboard CSRF flow. Fallback: Playwright MCP scrape.
- Reactions endpoint shape on POST/DELETE not yet probed live; current shape is a best-guess from upstream tool catalogs.
- Auto-engine
new_follower/new_note_fromtriggers are stubbed (returnnote: "trigger not yet implemented"). - TUI sub-tabs (1/2/3) and reply/like/restack key bindings are scaffolded but not wired to the client yet.
- Chrome cookie auto-grab tested only for macOS Chrome; Brave path included; Linux/Windows not supported.
License
MIT. See LICENSE.
The vendored httpx-port helpers under src/substack_ops/_substack/ are derived
from the MIT-licensed NHagar/substack_api package — kept here so this repo
ships zero runtime dependencies on third-party Substack libraries. Attribution
preserved in each file's module docstring.
來源:README.md,提交 3631e6e
工具
0版本歷史
1- v0.3.5最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分