Labsco
dkships logo

Substack Publisher API

โ˜… 4

from dkships

Query posts, analytics, and subscriber data from Substack's official Publisher API

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedPaid serviceNeeds API keys

substack-publisher-mcp

MCP server for Substack's official Publisher API

License: MIT Node.js MCP

Note: This is an unofficial, community-developed tool and is not affiliated with, endorsed by, or supported by Substack, Inc.

The first MCP server for Substack's official Publisher API. Query post analytics, subscriber counts, and publication data directly from Claude, Cursor, or any MCP client.

Demo of substack-publisher-mcp in Claude Code

Why this server?

substack-publisher-mcpOther Substack MCP servers
APIOfficial Publisher APIUnofficial internal API
AuthAPI key (stable)Browser cookies (fragile)
StabilityOfficial, documented APIBreaks when Substack changes internals
Multi-publicationBuilt-in supportNot available

Tools

ToolDescriptionKey Parameters
list_publicationsList configured publicationsNone
list_postsList published postsstartDate, endDate, sortBy, type, maxResults, next
get_postGet a specific post by URL slugurlSlug (required)
get_post_statsGet engagement stats for a posturlSlug (required)
get_subscriber_countsGet daily subscriber counts by typestartDate, endDate
get_subscriberLook up a subscriber by emailemail (required)

All tools except list_publications accept an optional publication parameter when multiple publications are configured.

Example responses

<details> <summary><code>get_subscriber_counts</code></summary>
[
  {
    "date": "2025-01-15",
    "total_email_subscribers": 25000,
    "paid_subscribers": 500,
    "free_trial_subscribers": 10,
    "comp_subscribers": 50,
    "gift_subscribers": 15,
    "lifetime_subscribers": 0,
    "founding_subscribers": 25
  }
]
</details> <details> <summary><code>get_post_stats</code></summary>
{
  "clicks": 320,
  "opens": 5400,
  "post_id": 12345678,
  "recipients": 10000,
  "views": 6100,
  "new_free_subscriptions": 80,
  "new_paid_subscriptions": 5,
  "estimated_revenue_increase": 400
}
</details> <details> <summary><code>list_posts</code></summary>
{
  "posts": [
    {
      "title": "My Latest Post",
      "audience": "only_paid",
      "subtitle": "A deep dive into the topic",
      "postDate": "2025-01-15T12:00:00.000Z",
      "urlSlug": "my-latest-post",
      "coverImage": "https://substackcdn.com/image/..."
    }
  ],
  "next": "abc123cursor"
}
</details>

Multiple publications

If you manage multiple Substack publications, configure a separate API key for each using the SUBSTACK_API_KEY_<NAME> pattern:

{
  "mcpServers": {
    "substack": {
      "command": "node",
      "args": ["/path/to/substack-publisher-mcp/dist/index.js"],
      "env": {
        "SUBSTACK_API_KEY_MAIN": "your-main-blog-key",
        "SUBSTACK_API_KEY_TECH": "your-tech-newsletter-key",
        "SUBSTACK_API_KEY_COMPANY": "your-company-updates-key"
      }
    }
  }
}

Then specify which publication to query:

"Show me subscriber counts for main" "List recent posts from the tech publication"

Use list_publications to see all configured publication names.

API Reference

This server wraps the Substack Publisher API. See Substack's documentation for details on available data and rate limits.

Contributing

See CONTRIBUTING.md for guidelines.

License

MIT License. See LICENSE for details.


Substack is a trademark of Substack, Inc. This project is not affiliated with Substack, Inc. Use of the Substack name is for descriptive purposes only.