Skip to main content
Glama

画像

Beehiiv MCP サーバー

Beehiiv API v2と連携するためのツールを提供するモデルコンテキストプロトコル(MCP)サーバー。このサーバーにより、大規模言語モデル(LLM)は標準化されたツールを通じてBeehiivの出版物や投稿と連携できるようになります。

前提条件

  • Python 3.10以上

  • uvパッケージマネージャー

  • APIアクセス可能なBeehiivアカウント

  • Claude Desktop(または他のMCP互換クライアント)

Related MCP server: MCP Python Server — API Wrapper

インストール

  1. まだインストールしていない場合は、 uvをインストールします。

curl -LsSf https://astral.sh/uv/install.sh | sh
  1. 最初から再構築する場合は、プロジェクトを作成して設定します。

# 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
  1. プロジェクト ルートに.envファイルを作成します。

BEEHIIV_API_KEY=your_api_key_here
BEEHIIV_PUBLICATION_ID=your_publication_id_here

クロードデスクトップ構成

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)

get_post_content

投稿の完全なHTMLコンテンツを取得します

新しい投稿を作成

beehiiv プラットフォームに新しい投稿を作成します (エンタープライズのみ)

仕組み

Claude Desktop を通じてこのサーバーとやり取りする場合:

  1. クライアントがあなたの質問をクロードに送ります

  2. クロードは利用可能なBeehiivツールを分析し、どのツールを使用するかを決定します。

  3. クライアントは、このMCPサーバーを介して選択されたツールを実行します。

  4. 結果はクロードに送り返される

  5. クロードは自然言語で応答する

  6. 応答が表示されます

(ビデオは近日公開予定)

トラブルシューティング

クロードにサーバーが表示されない

  1. claude_desktop_config.jsonファイルの構文を確認してください

  2. すべてのパスが相対パスではなく絶対パスであることを確認する

  3. Claudeデスクトップを再起動します

ログの表示

MCP 関連の問題については、Claude のログを確認してください。

tail -n 20 -f ~/Library/Logs/Claude/mcp*.log

ログは次の場所に保存されます:

  • 一般的な MCP 接続については~/Library/Logs/Claude/mcp.log

  • サーバー固有のログについては、 ~/Library/Logs/Claude/mcp-server-beehiiv-mcp-server.log

安全

  • .envファイルをバージョン管理にコミットしないでください

  • Beehiiv APIキーを安全に保管してください

  • API呼び出しのレート制限の実装を検討する

貢献

hmu on X ( https://x.com/reymerekar7 )

Available Tools

5 tools
create_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

    B3.3/5.0

    Scored across 5 tools

    Disambiguation3/5

    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.

    Naming Consistency5/5

    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.

    Tool Count4/5

    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.

    Completeness3/5

    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

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers