Beehiiv MCP Server
Beehiiv MCP 服务器
一个模型上下文协议 (MCP) 服务器,提供与 Beehiiv API v2 交互的工具。该服务器支持大型语言模型 (LLM) 通过标准化工具与 Beehiiv 出版物和帖子进行交互。
先决条件
Python 3.10 或更高版本
uv包管理器具有 API 访问权限的 Beehiiv 帐户
Claude Desktop(或其他兼容 MCP 的客户端)
Related MCP server: MCP Python Server — API Wrapper
安装
如果尚未安装
uv,请安装:
curl -LsSf https://astral.sh/uv/install.sh | sh如果从头开始重建,请创建并设置您的项目:
# Create a new directory and navigate into it
mkdir beehiiv-mcp-server
cd beehiiv-mcp-server
# Create virtual environment and activate it
uv venv
source .venv/bin/activate
# Install dependencies
uv add "mcp[cli]" httpx python-dotenv在项目根目录中创建一个
.env文件:
BEEHIIV_API_KEY=your_api_key_here
BEEHIIV_PUBLICATION_ID=your_publication_id_hereClaude桌面配置
将以下内容添加到您的 Claude Desktop 配置文件( ~/Library/Application Support/Claude/claude_desktop_config.json ):
{
"mcpServers": {
"beehiiv-mcp-server": {
"command": "<ABSOLUTE_UV_PATH>",
"args": [
"run",
"--with",
"mcp[cli]",
"mcp",
"run",
"<ABSOLUTE_SERVER_PATH>"
]
}
}
}代替:
<ABSOLUTE_UV_PATH>为你的uv可执行文件的路径<ABSOLUTE_SERVER_PATH>为beehiiv_server.py文件的绝对路径
可用工具
该 MCP 服务器目前公开以下工具(将会添加更多工具):
列表出版物
列出可使用您的 API 密钥访问的所有出版物。
列表帖子
列出特定出版物最近确认的 5 篇帖子。
list_posts(publication_id: str)获取帖子
检索有关特定帖子的详细信息。
get_post(publication_id: str, post_id: str)获取帖子内容
检索帖子的完整 HTML 内容
创建新帖子
在 beehiiv 平台上创建新帖子(仅限企业)
工作原理
当您通过 Claude Desktop 与此服务器交互时:
客户将您的问题发送给 Claude
Claude 分析可用的 Beehiiv 工具并决定使用哪一个
客户端通过此 MCP 服务器执行所选工具
结果被发回给克劳德
克劳德制定了自然语言回应
响应将显示给您
(视频即将发布)
故障排除
Claude 中未显示服务器
检查你的
claude_desktop_config.json文件语法确保所有路径都是绝对路径,而不是相对路径
重启Claude桌面
查看日志
检查 Claude 的日志中是否存在与 MCP 相关的问题:
tail -n 20 -f ~/Library/Logs/Claude/mcp*.log日志存储在:
~/Library/Logs/Claude/mcp.log用于常规 MCP 连接~/Library/Logs/Claude/mcp-server-beehiiv-mcp-server.log用于服务器特定的日志
安全
永远不要将
.env文件提交到版本控制确保您的 Beehiiv API 密钥安全
考虑对 API 调用实施速率限制
贡献
X 上的 hmu ( https://x.com/reymerekar7 )
Available Tools
5 toolscreate_new_postC
Create a new post using provided HTML content.
Args:
publication_id: ID of the publication
title: Title of the new post
subtitle: Subtitle of the new post
html_content: HTML content for the post
Inputs: html_content (required), publication_id (required), subtitle (required), title (required).
get_postC
Retrieve a single post by ID.
Args:
publication_id: ID of the publication
post_id: ID of the post
Inputs: post_id (required), publication_id (required).
get_post_contentA
Retrieve a post's content as JSON to use as a template.
Args:
publication_id: ID of the publication
post_id: ID of the post
Returns:
dict: JSON object containing post title, subtitle, and HTML content template
Inputs: post_id (required), publication_id (required).
list_postsB
List all posts for a given publication.
Args:
publication_id: e.g. 'pub_00000000-0000-0000-0000-000000000000'
Inputs: publication_id (required).
list_publicationsB
List all publications accessible with this API key.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Most tools have distinct purposes, but get_post and get_post_content have overlapping functionality that could cause confusion. Both retrieve posts by ID, with get_post_content specifically extracting content as a template, but the distinction may not be clear to an agent without careful reading of descriptions.
All tool names follow a consistent verb_noun pattern (create_new_post, get_post, get_post_content, list_posts, list_publications). The naming is predictable and readable throughout the set, with no deviations in style.
With 5 tools, the count is reasonable for a Beehiiv MCP server focused on post and publication management. It covers core operations but feels slightly thin, as it lacks update or delete functionality for posts, which are common in such domains.
The toolset covers creation, retrieval, and listing for posts and publications, but has notable gaps. There are no tools for updating or deleting posts, which are essential for a full CRUD lifecycle, and no publication-specific management beyond listing, which could lead to agent workarounds.
Maintenance
Related MCP Connectors
Model Context Protocol server for the Apideck Unified API. Connect any MCP-compatible agent framework to 100+ accounting systems, HRIS platforms, file storage providers, and more through one integration. More information https://www.apideck.com/mcp-server
A Model Context Protocol server for Wix AI tools
HTTP-first Apify MCP server for Substack RAG Markdown, sponsor domains, and /about emails.
Managed cloud RSS, Atom & JSON feed reader with a remote Model Context Protocol (MCP) endpoint. Zero server setup required — enables AI agents like Claude to instantly subscribe to feeds, search full-text articles, extract readable content, and access curated AI editions ("Your Newspaper") over secure streamable HTTP.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceThis server implements the Model Context Protocol to facilitate meaningful interaction and understanding development between humans and AI through structured tools and progressive interaction patterns.57-
- FlicenseNot gradedqualityDmaintenanceA Python server implementing the Model Context Protocol that exposes tools for querying external APIs, compatible with Claude Desktop and ChatGPT Desktop.-
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables AI assistants to programmatically interact with the Hashnode API for creating, updating, searching, and retrieving blog content.7MIT
- AlicenseAqualityDmaintenanceA Model Context Protocol server providing tools for DB queries, API calls, file I/O, and text transformations, enabling AI agents like Claude to perform real-world actions.10MIT