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.
npx agentmods add instructions/conorbronsdon/substack-mcp/claude-mdgit clone --depth 1 https://github.com/conorbronsdon/substack-mcpWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00545 | $0.00545 |
| Opus 5 | $0.00272 | $0.00272 |
| Sonnet 5 | $0.00109 | $0.00109 |
| Haiku 4.5 | $0.00055 | $0.00055 |
Grade A, and why
substack-mcp CLAUDE.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 3d ago.
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.
How it starts
The opening of the file, as written. The whole thing — 41 lines — stays where its author put it; the contents beside it link to each section on GitHub.
substack-mcp
MCP server for Substack — read posts, manage drafts, create notes. Cannot publish or delete posts by design; notes (short-form) publish immediately since Substack has no note-draft state.
Architecture
src/index.ts— MCP server bootstrap and entry pointsrc/server.ts— Tool registration, request handlers, Zod schema generationsrc/annotations.ts— Tool side-effect classification (read / draft-write / public-upload / publish) → MCP annotations (hints set explicitly; MCP defaults omitted hints to the unsafe direction)src/api/client.ts— HTTP client for Substack API (session cookie auth)src/api/types.ts— TypeScript interfaces for API responsessrc/utils/errors.ts— Error handling utilitiessrc/utils/markdown-to-prosemirror.ts— Markdown to ProseMirror AST converter (Substack editor format)src/__tests__/— Vitest tests for client, errors, and markdown conversion
Key constraints
- Posts are read/draft only — no publish or delete capabilities by design
- Notes publish immediately via
create_note/create_note_with_link— Substack has no note-draft state, so there is no preview step - Auth sends both
connect.sidandsubstack.sidcookies set to the same session token (custom domains useconnect.sid, substack.com usessubstack.sid) - Markdown must be converted to ProseMirror format for Substack's editor
Development
npm ci
npm run lint # tsc --noEmit -p tsconfig.lint.json (type-checks all of src/, tests included)
npm run build # tsc (outputs to dist/; excludes src/__tests__)
npm test # vitest run
Testing
4 test suites:
client.test.ts— API client auth validationerrors.test.ts— Error handling and wrappingmarkdown-to-prosemirror.test.ts— Markdown to ProseMirror AST conversionannotations.test.ts— Annotation mapping + completeness (every registered tool classified)
Agent workflow
- Always work on a branch. Never push directly to main.
- Create PRs targeting main. CI must pass (build + test on Node 20 and 22).
npm run buildrunstscand fails on type errors. - Keep changes focused — one feature or fix per PR.
- Run
npm run lint(fast no-emit type-check) andnpm testlocally before pushing.
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.
- 3d ago First seen · 41 lines · 545 tokens per session scan A cc8291f01ccf
substack-mcp CLAUDE.md is an instructions file published in the GitHub repository conorbronsdon/substack-mcp (22 stars, last pushed 4d ago), licensed MIT. It adds 545 tokens to every session, about $0.0027 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-30.
Other instructions, from other repositories
substack-mcp CLAUDE.md
Instructions for marcomoauro/substack-mcp, covering claude.md, language, commands, distribution and releases and layout.
intervals-icu-mcp CLAUDE.md
Instructions for hhopke/intervals-icu-mcp, covering claude.md, project overview, development commands, architecture (quick reference) and tool categories.
ai-toolkit AGENTS.md
Instructions for pipefy/ai-toolkit, covering repository guidelines, documentation map, project structure, import namespace migration: pipefysdk → pipefy and src/pipefysdk/init.py (transitional shim).
flyto-core CLAUDE.md
Instructions for flytohub/flyto-core, covering claude notes, cross-agent handoff and shared code intelligence.
Plonk AGENTS.md
Instructions for ostapondo/Plonk, covering agent rules, layout, adding a module, build & verify and code style.
rosetta AGENTS.md
Instructions for tikoci/rosetta, covering codex instructions for rosetta, first reads, development defaults and mcp and client config.