Beehiiv MCP Server & CLI

An open source Beehiiv API v2 MCP server and task CLI with 117 tools, private account settings and a Claude Desktop extension.

Navid Moazzezby Navid Moazzez·Updated 2.10.2026·24 min read·
Rate this tool

This free Beehiiv MCP server and CLI gives your AI real access to Beehiiv API v2 publications and account operations. It reads newsletters, subscribers and analytics, drafts posts, manages newsletter lists and inspects automations, private podcast feeds, tiers and webhooks.

It's one install with 2 ways in. Claude, Codex, Cursor or any other MCP app calls its 117 tools for you, and the same tools work as a CLI that agents like Claude Code, Codex and OpenCode run, or that you type yourself.

Here's what the Beehiiv MCP server and CLI is, how to set it up in each app, and every tool it has.

What is the Beehiiv MCP server & CLI?

The Beehiiv MCP server & CLI is a free, open source program that lets AI agents work with newsletters, subscriber lists and account data through Beehiiv’s documented API for you, in 2 ways. The MCP server is what an AI app like Claude, Codex or Cursor connects to, through MCP (Model Context Protocol), the open standard AI apps use to call outside tools.

You ask in plain language. Your AI picks the right tool, and the server makes the call directly to Beehiiv API v2.

The CLI is the same program as commands. beehiiv-cli list-publications runs the same code your AI runs when you ask which publications your credentials can access, whether an agent like Claude Code runs it or you do.

What can you ask it?

Once it's set up, you ask the way you'd ask an assistant. These are real prompts it handles:

Try asking
Show the publications my credentials can access.
Summarize the latest five posts in the publication I choose.
Draft my next newsletter and leave it unscheduled.
Inspect that existing post ID and tell me if it is still processing.
Find this subscriber by exact email.
Show newsletter-list and automation membership before the audience change I requested.
Inspect my webhook endpoints without exposing signing secrets.

Beehiiv already has an official account MCP and a separate developer-docs MCP. A community Go task CLI also exists. This package adds local MCP and CLI access to the pinned API operations, private named accounts, bounded native cursor retrieval and explicit write controls. Official MCP UI coverage and API Send workflows differ; neither is declared universally better.

How to install the Beehiiv MCP server

Choose your client in the existing install box. One npm package contains MCP and CLI binaries, and the GitHub release supplies a desktop archive. Configure account access privately before a network read.

Before you start0/3

Watch out: npm installation does not create a Beehiiv account or grant Send API permissions. Never use your password, browser cookies or another CLI’s OAuth client ID.

Set up your private Beehiiv account

API key for personal automation

  1. Sign in to Beehiiv.
  2. Open Settings > API under Workspace Settings.
  3. Choose Create New API Key. Name the integration and restrict its publications where appropriate.
  4. Save the newly shown key in private local settings. It cannot be viewed again after leaving the page.
  5. Set BEEHIIV_API_KEY in the process/client that launches the package, then run doctor and a read.

Use the current key instructions. Keys use Bearer authentication. Requests to publications outside a restricted key's scope return 404, and workspace-wide data deletion returns 403. A password is not an API key. The package does not load .env files automatically. GUI clients may not inherit a terminal environment.

Your own OAuth integration

Register a client through Beehiiv support. Use your own client ID, exact registered callback, a verified random state and PKCE for public clients. Authorization uses https://app.beehiiv.com/oauth/authorize; exchange/refresh uses https://app.beehiiv.com/oauth/token with application/x-www-form-urlencoded. Confidential clients also supply their private client secret.

Request only the documented scopes needed by the user. The default identify:read scope does not authorize all account reads/writes. The tool catalog records upstream endpoint scope labels. The test-send endpoint is labeled only posts upstream; confirm its required granted action through current Beehiiv permissions rather than treating that label as an OAuth scope to request. identify_oauth_user requires an OAuth session. This package does not provide a hosted callback, borrow another CLI's OAuth app or implement the initial browser consent flow.

Save the authorized token response and your app settings to a private regular JSON file outside the repo:

{"access_token":"YOUR_ACCESS_TOKEN","refresh_token":"YOUR_REFRESH_TOKEN","client_id":"YOUR_OWN_APP_ID","client_secret":"YOUR_CONFIDENTIAL_APP_SECRET"}

Omit client_secret for a public client. Include the real issued created_at/expires_in metadata when available. Set BEEHIIV_TOKENS_FILE to the absolute path. Files must be regular, at most 64 KB; symlinks are refused. Protect POSIX files with mode 0600 and Windows folders with user-only ACLs. Refresh updates files atomically. Without a file, environment-based refreshed state lasts only in that process. OAuth access tokens take precedence over an API key.

Rate limits and disconnecting

Current API limits are Free 30, Lite 180, Pro 500 and Enterprise 800 requests/minute. The wrapper defaults to conservative 2,000 ms pacing per account. Configure a supported interval when your plan and shared credential traffic justify it. Other processes also count; a response header after an idle period alone is not a complete plan eligibility check.

Revoke the API key or authorized app in Beehiiv, remove private client settings and reconnect. Uninstalling the package does not revoke credentials, delete remote subscribers or unschedule posts.

Check that it works

Discovery and schemas work without credentials. The local doctor checks setup; the network doctor reads permitted publications without returning private publication content.

beehiiv-cli --version
beehiiv-cli doctor
beehiiv-cli doctor --network
beehiiv-cli list-publications --limit 1 --agent

A successful read establishes that credential’s access to the requested endpoint. It does not establish Send API, all OAuth scopes or every plan feature. Start with read-only and inspect discovery before authorizing changes.

Use the Beehiiv CLI

The CLI is the same 117 tools as commands. AI agents that run commands, like Claude Code, Codex and OpenCode, use it on their own, and you can type the same commands in a terminal or a script.

Every tool name becomes a command with dashes, so list_publications runs as beehiiv-cli list-publications.

npm install -g @thenavidm/beehiiv-mcp-cli@latest
beehiiv-cli
beehiiv-cli list-publications --help
beehiiv-cli schema create-post
beehiiv-cli list-posts --publication-id pub_00000000-0000-0000-0000-000000000000 --limit 5 --agent

The bare beehiiv-cli lists every command, and beehiiv-cli <command> --help shows what a command takes. Every mutation requires --confirm for the action the user requested. --agent, --yes and prior unrelated confirmation never authorize changes. The zero publication ID is illustrative; replace it with an ID from your account.

These flags work on every command:

FlagWhat it does
--jsonStructured JSON
--compactOne-line JSON
--agentCompact JSON, no prompts/color
--select a,b.cKeep selected fields
--confirmAuthorize the user-requested guarded operation
--account NAMESelect a configured private account
--payload JSONComplete body, including null/nested fields
--payload-file PATHValidated regular local JSON body, max 5 MB

A script can branch on the exit code:

Exit codeWhat it means
0Success
2Invalid arguments or refused write
3Resource not found
4Authentication or permission failure
5API or transport failure
7Rate limited
10Missing or invalid private configuration

MCP server or CLI: which one?

Both surfaces call the same server tools. MCP connects them directly to an AI chat; the CLI gives an agent with a terminal the same operations as commands.

The token comparison is pending. We measure four real Claude Code usage differences: every tool loaded, default tool search, the skill read once, and its recurring description line. Commands, help, selected schemas, results and reasoning also contribute to complete task cost.

There is no measured efficiency percentage for this version yet. Standing context and the total cost of a successful task will be reported separately.

Drafts, sending and subscriber workflows

Create a draft, then inspect the same post

The Send API requires eligible Pro/Enterprise access. Creation accepts a title and exactly one of blocks or body_content. Draft is the default; scheduling a draft is refused. These zero IDs are illustrative, not real account resources: replace them with IDs from Beehiiv before executing.

beehiiv-cli list-posts --publication-id pub_00000000-0000-0000-0000-000000000000 --limit 5 --agent
beehiiv-cli create-post --publication-id pub_00000000-0000-0000-0000-000000000000 --title "Creator notes" --body-content '<p>Your actual newsletter content.</p>' --confirm --agent
beehiiv-cli get-post --publication-id pub_00000000-0000-0000-0000-000000000000 --post-id post_00000000-0000-0000-0000-000000000000 --agent

Creation returns an accepted post ID before background processing is complete. The wrapper marks creation_pending. A subsequent HTTP 202 read returns pending state plus Retry-After when present; it does not poll forever or resubmit. Preserve the ID, wait as instructed and read it again. A POST_CREATION_FAILED 404 is a failure. Inspect account state before repeating an unknown write outcome.

Structured blocks, HTML and scheduling

Use beehiiv-cli schema create-post or schema update-post, then a private payload file for nested content. HTML uses inline CSS; style/link tags are stripped by Beehiiv. Template content and content_merge_strategy affect whether the template header/content is preserved. Inspect the rendered draft in Beehiiv before a confirmed scheduling/delivery update. Do not replace a branded template with one paragraph by accident.

An update needs a nonempty body, refuses both blocks and body_content, and validates the current documented fields. A schedule uses the appropriate confirmed status and scheduled_at fields. No local guard or HTTP acceptance establishes successful email delivery.

Subscribers and automations

Discover an existing subscriber and read the intended publication before applying an audience change. Create subscription can reactivate an existing record, send a welcome email, enroll automations or modify paid-tier associations when those fields are supplied. Every write requires confirmation; reading a list is not permission to send or reactivate.

Private podcast feeds, exported account data, billing/advertising-related offers and workspace privacy deletions need particular care. A tool's existence does not imply your key, plan or OAuth scopes permit it. Only perform the user-requested action.

Pagination, exports and webhooks

Native cursors and deprecated offset pages

Only 13 reviewed operations expose cursor. They accept all_pages and a max_items cap (default 1,000, maximum 10,000), stop after 100 pages and refuse repeated cursors. The last request size shrinks to the remaining cap so its next cursor does not skip unseen records. Aggregated output reports collected/pages/truncated plus the last pagination object.

Do not mix cursor with page, or all_pages with page. max_items without all_pages is refused. Offset-only tools, including the reviewed list_posts/list_publications schemas, retain deprecated page input capped at 100; they do not receive invented cursor support. The current pagination guide recommends cursor where available, with limit at most 100 and default 10.

beehiiv-cli list-subscriptions --publication-id pub_00000000-0000-0000-0000-000000000000 --limit 25 --agent
beehiiv-cli list-subscriptions --publication-id pub_00000000-0000-0000-0000-000000000000 --all-pages --max-items 500 --agent

Exports and asynchronous operations

A successful create/export response can mean work was accepted, not that every record is exported. Keep returned job/resource identifiers and inspect the appropriate existing resource. A bounded list is not a complete backup guarantee. Protect response data and download links as private account content.

Webhook receivers

Webhook management requires eligible Lite+ access and appropriate scopes. Create/update the requested endpoint through the API, then retrieve its signing secret privately from the endpoint UI and configure your own receiver. Verify Svix-style signature headers according to Beehiiv's current webhook documentation. This package does not deploy a receiver, prove public reachability or return a signing-secret file. Never paste a signing secret into model context.

Every Beehiiv tool

Actual discovery supplies all 117 tools below: 70 reads and 47 writes. Every write asks for confirmation. The complete argument tables and beehiiv-cli schema expose required IDs, nested bodies, scopes and native cursor controls. Tool counts do not imply complete UI feature parity.

Ad network offers

list_ad_network_offers
What it does
Get ad offers.
Kind
Reads
create_ad_network_offer
What it does
Accept ad offer.
Kind
Asks first
ad_network_offers_advertisements
What it does
Get ad offer advertisements.
Kind
Reads

Ad network reports

list_ad_network_reports
What it does
Get ad network reports.
Kind
Reads
ad_network_reports_summary
What it does
Get ad network report summary.
Kind
Reads
ad_network_reports_account_summary
What it does
Get account ad network report summary.
Kind
Reads
list_advertisement_opportunities
What it does
Get advertisement opportunities.
Kind
Reads

Authors

list_authors
What it does
List authors.
Kind
Reads
get_author
What it does
Get author.
Kind
Reads

Automation journeys

add_subscriber_to_automation
What it does
Add subscription to an automation.
Kind
Asks first
list_automation_journeys
What it does
List automation journeys.
Kind
Reads
get_automation_journey
What it does
Get automation journey.
Kind
Reads

Automations

list_automations
What it does
List automations.
Kind
Reads
get_automation
What it does
Get automation.
Kind
Reads
automations_list_emails
What it does
List automation emails.
Kind
Reads

Bulk subscriptions

create_bulk_subscription
What it does
Bulk create subscription.
Kind
Asks first

Bulk subscription updates

list_bulk_subscription_updates
What it does
List subscription updates.
Kind
Reads
get_bulk_subscription_update
What it does
Get subscription update.
Kind
Reads
replace_bulk_subscription_update
What it does
Update subscriptions.
Kind
Asks first
update_bulk_subscription_update
What it does
Update subscriptions.
Kind
Asks first
bulk_subscription_updates_put_status
What it does
Update subscriptions' status.
Kind
Asks first
bulk_subscription_updates_patch_status
What it does
Update subscriptions' status.
Kind
Asks first

Subscriptions

create_subscription
What it does
Create subscription.
Kind
Asks first
list_subscriptions
What it does
List subscriptions.
Kind
Reads
get_subscription_by_email
What it does
Get subscription by email.
Kind
Reads
update_subscription_by_email
What it does
Update subscription by email.
Kind
Asks first
get_subscription
What it does
Get subscription by ID.
Kind
Reads
update_subscription
What it does
Update subscription by ID.
Kind
Asks first
patch_subscription
What it does
Update subscription by ID.
Kind
Asks first
delete_subscription
What it does
Delete subscription.
Kind
Asks first

Complimentary access

list_complimentary_access
What it does
List complimentary access.
Kind
Reads
get_complimentary_access
What it does
Get complimentary access.
Kind
Reads

Condition sets

list_condition_sets
What it does
List condition sets.
Kind
Reads
get_condition_set
What it does
Get condition set.
Kind
Reads

Custom fields

create_custom_field
What it does
Create custom field.
Kind
Asks first
list_custom_fields
What it does
List custom fields.
Kind
Reads
get_custom_field
What it does
Get custom field.
Kind
Reads
update_custom_field
What it does
Update custom field.
Kind
Asks first
patch_custom_field
What it does
Update custom field.
Kind
Asks first
delete_custom_field
What it does
Delete custom field.
Kind
Asks first

Data deletion

create_data_deletion
What it does
Create data deletion request.
Kind
Asks first
list_data_deletion
What it does
List data deletion requests.
Kind
Reads
get_data_deletion
What it does
Get data deletion request.
Kind
Reads

Engagements

list_engagements
What it does
Get publication engagements.
Kind
Reads

Exports

list_exports
What it does
List subscription exports.
Kind
Reads
create_export
What it does
Create subscription export.
Kind
Asks first
get_export
What it does
Get subscription export.
Kind
Reads

Newsletter lists

list_newsletter_lists
What it does
List newsletter lists.
Kind
Reads
create_newsletter_list
What it does
Create newsletter list.
Kind
Asks first
get_newsletter_list
What it does
Get newsletter list.
Kind
Reads
update_newsletter_list
What it does
Update newsletter list.
Kind
Asks first
delete_newsletter_list
What it does
Delete newsletter list.
Kind
Asks first

Newsletter list subscriptions

create_newsletter_list_subscription
What it does
Create newsletter list subscription.
Kind
Asks first
list_newsletter_list_subscriptions
What it does
List newsletter list subscriptions.
Kind
Reads
get_newsletter_list_subscription
What it does
Get newsletter list subscription.
Kind
Reads
update_newsletter_list_subscription
What it does
Update newsletter list subscription.
Kind
Asks first
newsletter_list_subscriptions_update_by_subscription_id
What it does
Update newsletter list subscription by subscription ID.
Kind
Asks first
newsletter_list_subscriptions_create_import
What it does
Create newsletter list subscriber import.
Kind
Asks first
newsletter_list_subscriptions_get_import
What it does
Get newsletter list subscriber import.
Kind
Reads

Oauth users

identify_oauth_user
What it does
Identify user.
Kind
Reads

Podcasts

podcasts_list_podcasts
What it does
List podcasts.
Kind
Reads
podcasts_get_podcast
What it does
Get podcast.
Kind
Reads
podcasts_get_private_feed
What it does
Get private feed.
Kind
Reads
podcasts_get_private_feed_by_email
What it does
Get private feed by email.
Kind
Reads
podcasts_send_private_feed_email
What it does
Send private feed email.
Kind
Asks first
podcasts_send_private_feed_email_by_email
What it does
Send private feed email by email.
Kind
Asks first
podcasts_list_episodes
What it does
List podcast episodes.
Kind
Reads
podcasts_get_episode
What it does
Get podcast episode.
Kind
Reads

Polls

list_polls
What it does
List polls.
Kind
Reads
get_poll
What it does
Get poll.
Kind
Reads
polls_list_responses
What it does
List poll responses.
Kind
Reads

Posts

create_post
What it does
Create post.
Kind
Asks first
list_posts
What it does
List posts.
Kind
Reads
update_post
What it does
Update post.
Kind
Asks first
get_post
What it does
Get post.
Kind
Reads
delete_post
What it does
Delete post.
Kind
Asks first
get_post_aggregate_stats
What it does
Get aggregate stats.
Kind
Reads
send_post_test
What it does
Send test email.
Kind
Asks first
preview_post
What it does
Generate post preview URL.
Kind
Reads

Post templates

list_post_templates
What it does
Get post templates.
Kind
Reads
create_post_template
What it does
Create post template.
Kind
Asks first
post_templates_workspace_index
What it does
List workspace post templates.
Kind
Reads
post_templates_workspace_create
What it does
Create workspace post template.
Kind
Asks first
post_templates_workspace_show
What it does
Get workspace post template.
Kind
Reads
get_post_template
What it does
Get post template.
Kind
Reads

Publication fields

list_publication_fields
What it does
List publication fields.
Kind
Reads
create_publication_field
What it does
Create publication field.
Kind
Asks first
get_publication_field
What it does
Get publication field.
Kind
Reads
update_publication_field
What it does
Update publication field.
Kind
Asks first
publication_fields_values_index
What it does
List publication field values.
Kind
Reads
publication_fields_values_update
What it does
Assign publication field values.
Kind
Asks first

Publications

list_publications
What it does
List publications.
Kind
Reads
get_publication
What it does
Get publication.
Kind
Reads

Referral program

get_referral_program
What it does
Get referral program.
Kind
Reads

Segments

create_segment
What it does
Create segment.
Kind
Asks first
list_segments
What it does
List segments.
Kind
Reads
get_segment
What it does
Get segment.
Kind
Reads
delete_segment
What it does
Delete segment.
Kind
Asks first
segments_recalculate
What it does
Recalculate segment.
Kind
Asks first
get_segment_subscribers
What it does
List segment subscribers.
Kind
Reads
segments_expand_results
What it does
List segment subscriber IDs.
Kind
Reads

Subscription tags

add_tags
What it does
Add subscription tag.
Kind
Asks first
remove_tag
What it does
Remove subscription tag.
Kind
Asks first

Tiers

create_tier
What it does
Create a tier.
Kind
Asks first
list_tiers
What it does
List tiers.
Kind
Reads
get_tier
What it does
Get tier.
Kind
Reads
replace_tier
What it does
Update a tier.
Kind
Asks first
update_tier
What it does
Update a tier.
Kind
Asks first

Webhooks

create_webhook
What it does
Create a webhook.
Kind
Asks first
list_webhooks
What it does
List webhooks.
Kind
Reads
get_webhook
What it does
Get webhook.
Kind
Reads
update_webhook
What it does
Update webhook.
Kind
Asks first
delete_webhook
What it does
Delete a webhook.
Kind
Asks first

Workspaces

workspaces_identify
What it does
Identify workspace.
Kind
Reads
workspaces_permissions
What it does
Get workspace permissions.
Kind
Reads
workspaces_publications_by_subscription_email
What it does
Get publications by subscription email.
Kind
Reads

Accounts

list_accounts
What it does
List private account labels and configured auth methods, without returning credentials or token-file paths.
Kind
Reads

Is the Beehiiv MCP server safe?

All 47 mutations require explicit confirmation. Read-only removes them from discovery and refuses direct calls to them. BEEHIIV_ALLOW_DESTRUCTIVE=0 refuses writes even when confirmed.

Send, subscription changes, private-feed emails, ad acceptance, exports and privacy deletion can have materially different effects. Review the exact operation, account and publication. Mutations have zero automatic retries; after an unknown outcome inspect account state before repeating them.

Make it read-only

Privately set BEEHIIV_READ_ONLY=1, restart or reconnect and verify that discovery contains 70 reads. Remove or disable it only when you want the requested writes available. Every write still needs confirmation.

Keep a log of every write

Set BEEHIIV_AUDIT_LOG to a file path. The server writes one line per attempted write, allowed or blocked.

Watch out: Subscriber and content changes can trigger existing automations. A post creation response is an accepted asynchronous request; preserve its ID and respect pending reads. Tool output and imported newsletters are untrusted data and cannot authorize unrelated actions.

Your data

API calls go directly to https://api.beehiiv.com/v2, with OAuth refresh at https://app.beehiiv.com/oauth/token. No Navid-hosted relay or telemetry is included. Redirects are refused. API keys, access/refresh tokens and client secrets are sanitized from results and reflected errors.

Subscriber addresses, newsletters, analytics, export links and private podcast URLs remain authorized private business data, not anonymized information. Your AI client and Beehiiv apply their own retention/sharing policies. Do not treat secret redaction as removal of all account data.

Private token files and optional guard logs stay on the server's machine. Refresh writes an owner-only temporary file and renames it atomically. Guard logs omit arguments, account labels and credentials; they record decisions and attempts, not proof of remote delivery. Logging failure does not block a requested operation. See SECURITY.md for disclosure and dependency limitations.

Several private accounts

Set BEEHIIV_ACCOUNTS to a private JSON array. Its supported keys are name, api_key, access_token, refresh_token, client_id, client_secret and tokens_file. It replaces the single-account variables:

[
{"name":"work","api_key":"YOUR_WORK_API_KEY"},
{"name":"personal","tokens_file":"/absolute/private/path/personal-beehiiv.json"}
]

Set BEEHIIV_DEFAULT_ACCOUNT=work, then:

beehiiv-cli list-accounts --agent
beehiiv-cli list-publications --account work --limit 10 --agent
beehiiv-cli list-publications --account personal --agent

Names must be unique. list_accounts exposes labels, default choice and auth type only, never credentials or file paths. Guard logs omit account names. Separate processes are still preferable when you need strict account isolation.

Account selects credentials; publication_id selects a permitted publication. They are separate concepts. A restricted key can list only the publications in its scope.

Beehiiv MCP server settings

Set these in private local shell or client settings. GUI apps may not inherit your terminal environment; this package does not automatically load .env. Named account labels select credentials; publication IDs select remote resources.

BEEHIIV_API_KEY
Default
Empty
What it does
Private personal API key
BEEHIIV_ACCESS_TOKEN
Default
Empty
What it does
Authorized OAuth access token
BEEHIIV_REFRESH_TOKEN
Default
Empty
What it does
OAuth refresh token
BEEHIIV_CLIENT_ID
Default
Empty
What it does
Your registered OAuth client ID
BEEHIIV_CLIENT_SECRET
Default
Empty
What it does
Confidential-client secret; omit for public clients
BEEHIIV_TOKENS_FILE
Default
Empty
What it does
Absolute regular private OAuth JSON, max 64 KB
BEEHIIV_ACCOUNTS
Default
Empty
What it does
Private JSON named accounts; replaces single-account variables
BEEHIIV_DEFAULT_ACCOUNT
Default
First configured account
What it does
Default private account label
BEEHIIV_READ_ONLY
Default
0
What it does
Hide/refuse all writes when 1 or true
BEEHIIV_ALLOW_DESTRUCTIVE
Default
1
What it does
Block all writes when 0 or false
BEEHIIV_AUDIT_LOG
Default
None
What it does
Private write-guard decision log
BEEHIIV_REQUEST_TIMEOUT_MS
Default
30000
What it does
Integer per-request deadline, 100–300000 ms
BEEHIIV_MAX_RETRIES
Default
2
What it does
GET 429 retry count, 0–5
BEEHIIV_MIN_REQUEST_INTERVAL_MS
Default
0 = 2000 ms
What it does
0 selects conservative pacing; otherwise 1–10000 ms

Troubleshooting

Run the doctor first. It names the step that failed and the fix.

What you seeWhat to do
No server toolsCheck Node, private client settings and the actual launching command, then reconnect.
Missing configuration / exit 10Configure BEEHIIV_API_KEY or an authorized private token file.
401 or 403Check the intended credential, permissions, OAuth scopes and plan feature.
404 publicationIt may be missing or outside the key’s publication restrictions.
202 / pending postKeep the existing post ID and read it later using Retry-After guidance. Do not recreate it.
POST_CREATION_FAILEDStop and inspect the failure; do not automatically repeat the create request.
429Wait for the documented limit; writes never automatically retry.
Unsupported cursor inputUse only native schema-supported cursor tools. Deprecated offset input is capped at page 100.
Guard refusalCheck read-only settings and confirm only the requested mutation.
Desktop archive refusedCheck compatible host/runtime and organization custom-extension policy.

If the server doesn't show up in your app at all, run the command your app runs, in a terminal, and read the error.

Complete client, OS and desktop setup

The following configurations use placeholders. Put actual values only into private user settings, outside repositories. INSTALL.md is included in the npm package and covers updating and removal. A browser-only remote client needs the official hosted MCP, because this package exposes local stdio.

Claude Code

For a user-scoped connection, after privately configuring credentials:

claude mcp add --scope user beehiiv -- npx -y @thenavidm/beehiiv-mcp-cli@latest
claude mcp list

Use the client's private local environment settings for the account variable if they are not inherited. Claude's -e NAME=value registration option writes values into its config; only use it locally through your secret manager, with no shared command transcript. Never place credentials in a project .mcp.json. Reconnect and ask Claude to verify credentials.

Alternatively install the CLI, make SKILL.md available to Claude, and use shell commands. Registering both surfaces is optional.

Codex

codex mcp add beehiiv -- npx -y @thenavidm/beehiiv-mcp-cli@latest
codex mcp list

Account credentials must reach the server through private environment settings. codex mcp add --env NAME=value stores values in your local config, so never commit that config or put secrets in a shared command. In TOML, the equivalent server is:

[mcp_servers.beehiiv]
command = "npx"
args = ["-y", "@thenavidm/beehiiv-mcp-cli@latest"]
env_vars = ["BEEHIIV_API_KEY", "BEEHIIV_TOKENS_FILE"]

env_vars forwards those names from the environment available to Codex. If that environment does not contain them, configure private env settings locally. Codex can also call the CLI directly with SKILL.md and --agent output.

Claude Desktop

Install the .mcpb extension

  1. Download beehiiv-2.0.0.mcpb from GitHub Releases.
  2. In a supported Claude Desktop build, open Settings > Extensions > Advanced settings > Install Extension… and select it.
  3. Enter a private API key in the sensitive setting, or an absolute private OAuth token-file path. Leave the unused method empty.
  4. Enable read-only if you want only the 70 reads. Reconnect and ask for account verification.

The bundle includes production dependencies and no credentials. Use the token-file route for your own authorized OAuth integration. The manifest requires Node 22 or newer from a compatible host. Organization policy may restrict custom extensions. Manual bundle updates require installing the new version; no automatic directory updates are promised. GUI installation remains unverified separately from archive/protocol checks.

Manual config

Open Settings > Developer > Edit Config, or use your platform's config file:

OSTypical config path
macOS~/Library/Application Support/Claude/claude_desktop_config.json
Windows%APPDATA%\Claude\claude_desktop_config.json
Linux~/.config/Claude/claude_desktop_config.json; confirm the location through Edit Config in your installed build
{
"mcpServers": {
"beehiiv": {
"command": "npx",
"args": ["-y", "@thenavidm/beehiiv-mcp-cli@latest"],
"env": {
"BEEHIIV_API_KEY": "YOUR_API_KEY",
"BEEHIIV_TOKENS_FILE": ""
}
}
}
}

Replace the placeholders only in your private file. Merge the server entry into an existing mcpServers object instead of replacing other integrations. Fully quit and reopen Claude Desktop. Do not enable an extension and a manual entry with the same name; choose one route.

If a Windows launcher cannot execute npx directly, use "command": "cmd" with "args": ["/c", "npx", "-y", "@thenavidm/beehiiv-mcp-cli@latest"]. An absolute node executable and installed dist/index.js path also avoids launcher/PATH problems.

Cursor

Use private user settings at ~/.cursor/mcp.json, or Settings > Tools & MCP. Cursor documents environment interpolation and envFile support.

{
"mcpServers": {
"beehiiv": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@thenavidm/beehiiv-mcp-cli@latest"],
"env": {
"BEEHIIV_API_KEY": "${env:BEEHIIV_API_KEY}",
"BEEHIIV_TOKENS_FILE": "${env:BEEHIIV_TOKENS_FILE}"
}
}
}
}

The environment values must exist for the Cursor process. If you use envFile, keep that file private and outside version control. A project's .cursor/mcp.json must not contain actual credentials. Reconnect the server after saving.

VS Code and Copilot

Use MCP: Open User Configuration. VS Code uses servers and secure inputs, rather than a mcpServers root:

{
"inputs": [
{"type": "promptString", "id": "beehiiv-api-key", "description": "Beehiiv API key (leave empty for OAuth)", "password": true},
{"type": "promptString", "id": "beehiiv-token-file", "description": "Optional private OAuth token-file path (leave empty for API key)"}
],
"servers": {
"beehiiv": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@thenavidm/beehiiv-mcp-cli@latest"],
"env": {
"BEEHIIV_API_KEY": "${input:beehiiv-api-key}",
"BEEHIIV_TOKENS_FILE": "${input:beehiiv-token-file}"
}
}
}
}

Start Beehiiv through the MCP controls, approve trust if prompted, and enter credentials in the private input prompts. Workspace .vscode/mcp.json may contain this placeholder-only structure, but never resolved secret values. Remote development runs the server in the selected remote environment, so local file paths refer to that environment.

Windsurf

Open Cascade's MCP settings or edit the private user file ~/.codeium/windsurf/mcp_config.json. Use the Claude Desktop manual mcpServers block above with your locally configured env values. See Windsurf's current MCP documentation. Restart or reconnect Beehiiv in Cascade; project files must not contain secrets.

Zed

Open Settings > AI > MCP Servers > Add Server > Add Local Server, or your user settings file. Zed uses context_servers:

{
"context_servers": {
"beehiiv": {
"command": "npx",
"args": ["-y", "@thenavidm/beehiiv-mcp-cli@latest"],
"env": {
"BEEHIIV_API_KEY": "YOUR_API_KEY",
"BEEHIIV_TOKENS_FILE": ""
}
}
}
}

Enter actual values only in private user settings. Check the active-server indicator before prompting. Do not wrap command and args inside a nested command object from older Zed examples.

Gemini CLI

Merge the Claude Desktop manual mcpServers block into your private ~/.gemini/settings.json. Configure the two env values locally, then restart Gemini CLI and inspect /mcp. See Gemini CLI's MCP configuration. Its project settings must not contain real credentials. You can instead use the CLI from an agent shell.

Other local stdio clients use the same command and arguments, adapted to their config format. A client that only accepts a remote MCP URL cannot connect directly: this package does not ship a public HTTP listener. ChatGPT's remote connector setup is not a substitute for local stdio installation.

Docker

Build locally from the reviewed source; no prebuilt registry image is claimed:

git clone https://github.com/thenavidm/beehiiv-mcp-cli.git
cd beehiiv-mcp-cli
docker build -t beehiiv-mcp-cli .
docker run --rm -i -e BEEHIIV_API_KEY beehiiv-mcp-cli

-e BEEHIIV_API_KEY forwards the shell's already configured private value. MCP needs -i and stdio. For OAuth, mount the private token file into the container with only the access needed for refresh, then set the in-container absolute BEEHIIV_TOKENS_FILE path. Host paths do not automatically exist inside a container. Restrict mounts and persist refreshed tokens if you need restart continuity.

Cline and other local MCP clients

Use the client's Add MCP server flow with command npx, arguments -y and @thenavidm/beehiiv-mcp-cli@latest, stdio transport, and private local BEEHIIV_API_KEY or BEEHIIV_TOKENS_FILE settings. UI names depend on the installed client. Reconnect and discover tools before an account call. Browser-only clients need a remote HTTPS connector; use Beehiiv's official server rather than this local stdio command.

Command inputs, JSON and output

Tool names become dashed commands: get_post becomes beehiiv-cli get-post. Both exact underscore tool names and dashed forms are accepted. Argument names have dashed aliases: post_id is --post-id. Use help and schema to discover each operation's current input.

beehiiv-cli tools
beehiiv-cli get-post --help
beehiiv-cli schema get-post
beehiiv-cli get-post --publication-id pub_00000000-0000-0000-0000-000000000000 --post-id post_00000000-0000-0000-0000-000000000000 --agent
FlagBehavior
--helpCurrent schema-derived arguments and defaults
--jsonStructured JSON output
--compactCompact JSON on one line
--agentJSON, compact, no prompts or color
--select a,b.cKeep selected fields; dotted paths descend through objects and arrays
--no-colorNo terminal colors
--no-inputNo interactive prompts
--yesHouse noninteractive flag; never substitutes for --confirm
--confirmExplicit confirmation for the requested guarded operation
--account NAMESelect a configured local account on API tools
--payload JSONComplete request body as one JSON object
--payload-file PATHComplete request body from a local regular JSON file, at most 5 MB

Body flags and payload/payload_file are mutually exclusive. Path and query flags remain separate. Objects take JSON; array flags repeat once per array item. Do not pass an array to a flag that expects a single item:

beehiiv-cli list-subscriptions --publication-id pub_00000000-0000-0000-0000-000000000000 --limit 10 --agent
beehiiv-cli create-post --publication-id pub_00000000-0000-0000-0000-000000000000 --payload-file /absolute/private/path/newsletter.json --confirm --agent

Null and complete bodies

Use an actual JSON null in payload for nullable values. A shell --field null is a string. For example, a headers object can use null values to suppress inherited headers, per reviewed upstream prose. Discover the complete schema before editing nested fields.

CodeMeaning
0Success
2Invalid arguments or refused write
3Resource not found
4Authentication or permission failure
5Other API/transport failure
7Rate limited
10Missing or invalid private configuration

Results go to stdout; errors are JSON on stderr. --select controls local result rendering, not the original API response. Arrays of objects use repeated JSON-item flags; payload/payload_file is easier for a complex post block tree.

Official MCP and community comparisons

Surface
Hosted MCP at https://mcp.beehiiv.com/mcp
Reviewed scope
Account reads on all plans; writes on paid plans, with existing role permissions
Tradeoff
Hosted setup and UI operations beyond the API; excludes publishing/scheduling/sending posts and activating automations
Surface
https://developers.beehiiv.com/_mcp/server
Reviewed scope
Read developer documentation
Tradeoff
Does not operate an account
This implementation
Surface
Local stdio MCP, shared task CLI and released desktop bundle
Reviewed scope
Documented v2 operations, private named accounts, bounded native cursor retrieval, write guards and no automatic mutation retries
Tradeoff
Local configuration/maintenance; endpoint scopes and plans apply; live account outcomes pending
Surface
Community Go task CLI
Reviewed scope
OAuth, operating-system credential storage and task commands; distribution includes Homebrew and Windows routes
Tradeoff
Already a useful CLI alternative; compare requested commands and output rather than declaring CLI absence
Surface
@beehiiv/sdk, public beta
Reviewed scope
API client for application code
Tradeoff
Different interface from a task CLI; review the SDK's version and request retry policy for writes

COMPARISON.md records dated primary sources, API/MCP differences and pending evidence. No competitor token, latency or success-rate advantage is asserted.

Versions and migration

ComponentVersion / source
Package and desktop manifest2.0.0
RuntimeNode 22 or newer
Beehiiv APIv2; 116 pinned operations, reviewed 2026-10-02
MCP SDK^1.31.0
Source provenanceapi-source.json with exact source hash and reviewed corrections

CHANGELOG.md records dated versions. Version 2 replaces the private MCP-only 1.0.0 source with current API coverage, a shared CLI and desktop packaging. Existing documented tool names remain where the current endpoints exist. Unsupported email-blast helpers are removed; use current post creation/update and the intended newsletter-list fields on eligible plans.

Use publication_id from list_publications, current prefixed resource IDs and native schemas. Review consent/reactivation/welcome-email fields, scheduling status and irreversible privacy operations. Private account instructions and old Git history remain private. Preserve the existing AGPL license.

Updates and removal

npm install -g @thenavidm/beehiiv-mcp-cli@latest
beehiiv-cli --version
claude mcp remove --scope user beehiiv
codex mcp remove beehiiv
npm uninstall -g @thenavidm/beehiiv-mcp-cli

Reinstall a newer desktop archive separately and restart affected clients. Remove manual client entries using its own settings. Uninstalling the package does not revoke Beehiiv credentials, remove private token/secret files or unschedule email. Revoke/delete keys or authorized apps in Beehiiv when appropriate. Inspect and remove private files yourself after preserving any private data you still need.

Pin a reviewed version instead of @latest if your automation requires reproducibility. Check CHANGELOG.md and GitHub Releases before a major update. Do not roll back by blindly publishing an older version over an existing npm version.

Validation and remaining evidence

Build, typecheck and 29 fixture/shared-CLI checks pass. Actual source and desktop discovery report 117 tools, with 70 in read-only mode. The production dependency audit has zero findings. Source and exact npm/desktop artifacts pass secret scans. Linux/Windows CI on Node 22 and 24 passed. Clean installation from public npm and discovery from the downloaded desktop release each verify 117 tools, or 70 in read-only mode. Both public artifacts pass secret scans.

Provider account writes, a desktop GUI installation and fresh model usage/task comparisons remain pending. No measured savings or broader coverage claim is invented. See SECURITY.md for the dev-only packaging advisory and RELEASE-CHECKLIST.md for the maintenance standard.

More tools for your creator business

Use these alongside your requested newsletter work.

Beehiiv MCP Server & CLI FAQs

Official and community alternatives, private setup, desktop, drafts, sending, pagination and safety.

It exposes account operations to an AI client through structured tools.

This package runs locally over stdio; it does not host a public remote connector.

`beehiiv-cli` exposes the same tools as shell commands through the shared MCP implementation.

Use it with scripts or an agent that can run terminal commands.

Yes.

The official account MCP supports reads on all plans and writes on paid plans.

Its UI capabilities differ from API coverage.

A separate documentation MCP only reads developer docs.

It provides a local task CLI, named private accounts, bounded native cursor retrieval and explicit write guards.

Eligible Send API workflows are another API-specific difference.

No broader coverage or measured efficiency claim is made.

Yes.

The community `deldrid1/beehiiv-cli` already offers a Go task CLI with OAuth and OS credential storage.

Compare actual requested commands, install preferences and outputs.

The wrapper preserves AGPL-3.0-or-later licensing.

Beehiiv account plans, API eligibility and service charges remain separate; installing npm does not upgrade an account.

Open Workspace Settings > API in Beehiiv and choose Create New API Key.

Save it privately when shown.

Optional publication restrictions limit what it can access.

No.

Configure it in private local shell or client settings as BEEHIIV_API_KEY.

Never paste keys, tokens or signing secrets into chat, issues, repositories or public transcripts.

No.

It prints setup instructions.

OAuth integrations use your own registered client and callback.

Beehiiv support handles client registration; public clients need PKCE.

The desktop archive bundles production dependencies and uses a sensitive API-key setting or private OAuth token-file path.

Custom-extension policy and a compatible host/runtime apply.

Archive/protocol checks are distinct from a GUI installation.

This package requires local stdio support.

A web client accepting only remote MCP URLs needs Beehiiv’s official hosted server, subject to the client’s connector support.

Creation defaults to draft and requires confirmation.

Send API access requires eligible Pro/Enterprise permissions.

Setting confirmed status and delivery options changes the operation; inspect the requested audience and schedule explicitly.

The existing post is still processing.

Preserve its post ID and Retry-After guidance and read that same post later.

Pending is not a completed send or permission to create another post.

No.

Create requires exactly one of structured blocks or body_content.

Updates refuse both and require a nonempty body.

Use the current schema for nested block shapes and HTML/template constraints.

No.

Mutating POST, PUT, PATCH and DELETE requests have zero automatic retries, including timeouts and rate limits.

Inspect account state before repeating an action with an unknown outcome.

Use all_pages only on a tool that exposes native cursor input. max_items bounds retrieval and reduces the last page size so the returned cursor does not skip unseen records.

Offset-only page inputs remain deprecated and capped at 100.

Named private accounts select credentials with --account.

Each publication-specific tool takes publication_id separately.

Use list_publications to discover the publications allowed by that credential.

It may not exist, or it may be outside the API key’s publication restrictions.

A scoped key also cannot perform workspace-wide data deletion.

Check the intended credential and permissions.

Get them privately through the Beehiiv webhook endpoint UI on an eligible plan, then configure signature verification in your own receiver.

The wrapper does not deploy a receiver or supply a signing-secret rotation service.

Fresh usage/task results are pending.

Compare full loading, deferred tool search, skill loading and matched successful tasks with actual model usage.

Neither tool counts nor character estimates establish savings.

Navid Moazzez

AI business strategist & AI OS builder

Navid Moazzez helps creators and founders master AI and build their own AI Operating System (AI OS) to automate their business and life.

Navid.me is reader-supported. When you buy through links on this site, I may earn an affiliate commission. Learn more.

More MCP servers & CLIs

Related free tools

Free AI newsletter

The most actionable AI newsletter for founders

Every week, get proven AI strategies, curated tools, and step-by-step systems to grow your audience, create better content, and build a profitable creator business.

No fluff, no filler, no BS. Just five minutes each week that might level up your online business and life.

P.S. Sign up now to get free access to my ultimate AI tools guide for creators.

Loved by 10,000+ readers