
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 分