substack-ops is an independent command-line tool (CLI) and MCP server for Substack, offering 26 tools and usable with Cursor MCP, Claude MCP, OpenCode MCP, and any stdio MCP host. Its core feature is: replies are drafted by the large model built into your IDE, with no need for any AI API keys (such as ANTHROPIC_API_KEY or OPENAI_API_KEY). The project is installed with Python, ships as a single binary, and is MIT licensed.
In terms of purpose, substack-ops is used to manage posts, notes, comments, replies, reactions, restacks, recommendations, search, profiles, feeds, and automation on Substack. It natively lets the host LLM draft replies through the propose_reply / confirm_reply tools via MCP, implementing a "propose-confirm" reply workflow. All write operations use --dry-run by default, which requires --no-dry-run to disable, and irreversible operations also require --yes-i-mean-it. All write operations are recorded in .cache/audit.jsonl and are checked for deduplication against .cache/actions.db.
The main capabilities include: reading posts (8 tools), reading notes (5), reading and writing comments (5), the reply engine (6), discovery reads (8), automation (3), and operations and safety (3). Each read command supports the --pub <subdomain|domain> parameter, defaulting to your own publication. The reply engine refetches new comments after each live note reply and asserts that ancestor_path is non-empty; if it is empty, the audit row's result_status becomes "orphaned". Built-in presets include like-back, auto-reply, auto-restack, and follow-back, and custom YAML rules are also supported under ~/.config/substack-ops/auto/*.yaml and can be executed in a loop via auto daemon <name> --interval 60.
In terms of usage, installation is done via uv / uvx, for example uvx substack-ops==0.3.5 mcp serve. Authentication reads mcpServers.substack-api.env in ~/.cursor/mcp.json by default, and can also be overridden via environment variables or .env, or by using the auth login / auth setup flow. The MCP-native drafting loop requires no API key and is completed by the host LLM through propose_reply / confirm_reply. For unattended automation paths, the subprocess CLI can be used, automatically detecting claude (Claude Code), cursor-agent, or codex in PATH, and can also be overridden via SUBSTACK_OPS_LLM_CMD. The project also provides a Textual TUI with 6 tabs: Notes / Posts / Comments / Feed / Auto / Profile, sub-tabs 1=mine, 2=following, 3=general, and shortcuts including tab, 1-3, ↑/↓, enter, r, l, s, o, q/esc.
Applicable scenarios include: interactively drafting and confirming Substack replies in the IDE; implementing like-back, auto-reply, auto-restack, follow-back, and other operations through automation presets; and integrating into MCP hosts that support stdio through the MCP server. In terms of limitations: full email statistics (opens/clicks/views) require the dashboard CSRF flow, with the alternative being Playwright MCP scraping; the shapes of the POST/DELETE reaction endpoints have not yet been probed live, and the current shapes are based on best guesses from the upstream tool catalog; the auto engine's new_follower / new_note_from triggers are stubs, returning "trigger not yet implemented"; the TUI sub-tabs and reply/like/restack key bindings are scaffolded but not yet wired to the client; automatic Chrome cookie scraping has only been tested on macOS Chrome and includes the Brave path, with no support for Linux/Windows. The project is MIT licensed, see LICENSE for details.