Substack MCP server for AI agents
Let Claude, ChatGPT or your own agent read Substack: 3 typed functions through one MCP server. No Substack API key needed.
- Site
- substack.com
- Functions
- 3
- Sign-in
- Not needed
- Works with
- MCP, HTTP, Node, Python
Connect
Just Substack
An MCP server for Substack alone, with one tool per function. Paste it into Claude, ChatGPT, Cursor or any MCP client as a remote server.
https://api.bowmark.ai/mcp/site/substackEvery site
One MCP server for Substack and every other site Bowmark covers. Your agent looks up what it needs and calls it.
https://api.bowmark.ai/mcpSet it up in your clientBoth need a Bowmark API key. The quickstart gets you one and a first result in a few minutes.
Functions
Open a function to see its arguments, what it returns and how to call it.
Read 3
postReads one Substack post by URL (or publication + slug): title, authors, date, likes, comments and the full body as HTML and plain text.Arguments
Name Type Required urlstringA post URL, e.g. "https://lenny.substack.com/p/some-post".No publicationstringNo slugstringNo Returns
SubstackPostinterface SubstackPublication { id: number | null; name: string; /** Pass as posts({ publication }). */ subdomain: string | null; customDomain: string | null; url: string | null; } interface SubstackPostSummary { id: number; title: string; subtitle: string | null; slug: string; url: string; publishedAt: string | null; /** "everyone" is free; "only_paid" / "founding" are paywalled. */ audience: string | null; type: string | null; likes: number | null; comments: number | null; wordCount: number | null; coverImage: string | null; publication: SubstackPublication | null; } interface SubstackPost extends SubstackPostSummary { authors: { name: string; handle: string | null }[]; /** For a paywalled post, only the free preview. */ bodyHtml: string | null; bodyText: string | null; paywalled: boolean; }HTTP endpoint
POST https://api.bowmark.ai/v1/sites/substack/postCall it
import { bowmark } from "@bowmark/web"; const result = await bowmark.providers.substack.post({});import asyncio from bowmark_web import bowmark result = asyncio.run(bowmark.providers.substack.post({}))curl -X POST https://api.bowmark.ai/v1/sites/substack/post \ -H "Authorization: Bearer $BOWMARK_API_KEY" \ -H "Content-Type: application/json" \ -d '{"args":{}}'// The body of a run: the MCP run tool, or POST /v1/run return await bowmark.providers.substack.post({});postsLists a Substack newsletter's posts, newest first, from the publication's own archive.Arguments
Name Type Required publicationstring"lenny", "lenny.substack.com", "www.lennysnewsletter.com" or any URL on the newsletter.Yes limitnumber1-50, default 12.No cursorstringThe nextCursor a previous posts() call returned, for the next, older page.No Returns
SubstackPostsResultinterface SubstackPublication { id: number | null; name: string; /** Pass as posts({ publication }). */ subdomain: string | null; customDomain: string | null; url: string | null; } interface SubstackPostSummary { id: number; title: string; subtitle: string | null; slug: string; url: string; publishedAt: string | null; /** "everyone" is free; "only_paid" / "founding" are paywalled. */ audience: string | null; type: string | null; likes: number | null; comments: number | null; wordCount: number | null; coverImage: string | null; publication: SubstackPublication | null; } interface SubstackPostsResult { publication: string; posts: SubstackPostSummary[]; /** Pass back as cursor for the next, older page. Null at the end. */ nextCursor: string | null; }HTTP endpoint
POST https://api.bowmark.ai/v1/sites/substack/postsCall it
import { bowmark } from "@bowmark/web"; const result = await bowmark.providers.substack.posts({ publication: "lenny", limit: 3 });import asyncio from bowmark_web import bowmark result = asyncio.run(bowmark.providers.substack.posts({"publication": "lenny", "limit": 3}))curl -X POST https://api.bowmark.ai/v1/sites/substack/posts \ -H "Authorization: Bearer $BOWMARK_API_KEY" \ -H "Content-Type: application/json" \ -d '{"args":{"publication":"lenny","limit":3}}'// The body of a run: the MCP run tool, or POST /v1/run return await bowmark.providers.substack.posts({ publication: "lenny", limit: 3 });searchSearches Substack for newsletters, writers and posts by keyword or name ('product management', 'Lenny') through substack.com's own search box API…Arguments
Name Type Required querystringA topic, newsletter or writer name, e.g. "product management".Yes Returns
SubstackSearchResultinterface SubstackPublication { id: number | null; name: string; /** Pass as posts({ publication }). */ subdomain: string | null; customDomain: string | null; url: string | null; } interface SubstackPostSummary { id: number; title: string; subtitle: string | null; slug: string; url: string; publishedAt: string | null; /** "everyone" is free; "only_paid" / "founding" are paywalled. */ audience: string | null; type: string | null; likes: number | null; comments: number | null; wordCount: number | null; coverImage: string | null; publication: SubstackPublication | null; } interface SubstackWriter { id: number; name: string; handle: string; bio: string | null; photo: string | null; /** e.g. "1.2M+ subscribers". */ subscribers: string | null; profileUrl: string; publication: SubstackPublication | null; } interface SubstackSearchResult { writers: SubstackWriter[]; posts: SubstackPostSummary[]; }HTTP endpoint
POST https://api.bowmark.ai/v1/sites/substack/searchCall it
import { bowmark } from "@bowmark/web"; const result = await bowmark.providers.substack.search({ query: "lenny" });import asyncio from bowmark_web import bowmark result = asyncio.run(bowmark.providers.substack.search({"query": "lenny"}))curl -X POST https://api.bowmark.ai/v1/sites/substack/search \ -H "Authorization: Bearer $BOWMARK_API_KEY" \ -H "Content-Type: application/json" \ -d '{"args":{"query":"lenny"}}'// The body of a run: the MCP run tool, or POST /v1/run return await bowmark.providers.substack.search({ query: "lenny" });
Use it from code
- Node
npm i @bowmark/web - Python
pip install bowmark-web - HTTP
POST /v1/sites/substack/<function> - OpenAPI
/v1/sites/substack/openapi.json