substack-mcp AGENTS.md

A project instruction file for a Substack newsletter application. It documents the server, web dashboard, feed reading, drafts, publishing, subscriber statistics, and community features.

In plain words
What is it for?
Guiding work on the Substack MCP server and its React dashboard, including feeds, drafts, publishing, statistics, and comments.
Why use it?
It gives coding agents a shared reference for the project's structure, ports, modules, and development commands.

Instructions file for CodexOpenCode

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/sandraschi/substack-mcp/agents-md
Clone the repo
git clone --depth 1 https://github.com/sandraschi/substack-mcp

Made for: Codex, OpenCode.

Per session 399 This file is loaded in full into every session.
When invoked 399 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00399 $0.00399
Opus 5 $0.00199 $0.00199
Sonnet 5 $0.00080 $0.00080
Haiku 4.5 $0.00040 $0.00040

Measured yesterday against content hash e5baf67ae7f8, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

substack-mcp AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

AGENTS.md · 31 lines

What it actually says

Substack MCP — AGENTS.md

Purpose: SOTA FastMCP server and React webapp for Substack newsletter feed reading, draft/publishing workflows, subscriber stats, and community interactions.

Quick Reference

  • Backend Port: 11163 (FastAPI REST /api/* + FastMCP 3.1+ HTTP /mcp)
  • Frontend Port: 11164 (Vite + React + Tailwind CSS webapp dashboard)
  • Start Script: start.ps1 or start.bat

Key Modules

  • substack_mcp/server.py: FastMCP 3.1+ server entrypoint and ASGI uvicorn application.
  • substack_mcp/client.py: Substack RSS feed reader and HTTP REST client.
  • substack_mcp/db.py: SQLite database for articles, cached feeds, drafts, and analytics history (data/substack.sqlite3).
  • substack_mcp/tools/:
    • feed.py: substack_feed tool portmanteau (fetching, listing, reading RSS & Substack posts).
    • drafts.py: substack_drafts tool portmanteau (staging, editing, converting Markdown, publishing).
    • stats.py: substack_stats tool portmanteau (subscriber stats, views, post metrics).
    • community.py: substack_community tool portmanteau (fetching/posting comments, discussions).
  • webapp/: Vite React dashboard (Dashboard, Reader, Draft Studio, Analytics, Community, Tools & Logs).

Development Commands

just dev      # Run backend dev server on 11163
just web      # Run webapp dev server on 11164
just start    # Run both via start.ps1
just lint     # Ruff check & format
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 31 lines · 399 tokens per session scan A e5baf67ae7f8

Subscribe to this mod's changes

substack-mcp AGENTS.md is an instructions file published in the GitHub repository sandraschi/substack-mcp (1 stars, last pushed yesterday), licensed MIT. It adds 399 tokens to every session, about $0.0020 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.