Skip to main content
Glama

imagen

Servidor MCP Beehiiv

Un servidor de Protocolo de Contexto de Modelo (MCP) que proporciona herramientas para interactuar con la API Beehiiv v2. Este servidor permite que los Modelos de Lenguaje Grandes (LLM) interactúen con las publicaciones y entradas de Beehiiv mediante herramientas estandarizadas.

Prerrequisitos

  • Python 3.10 o superior

  • administrador de paquetes uv

  • Una cuenta Beehiiv con acceso API

  • Claude Desktop (u otro cliente compatible con MCP)

Related MCP server: MCP Python Server — API Wrapper

Instalación

  1. Instale uv si aún no lo ha hecho:

curl -LsSf https://astral.sh/uv/install.sh | sh
  1. Si va a reconstruir desde cero, cree y configure su proyecto:

# 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. Cree un archivo .env en la raíz del proyecto:

BEEHIIV_API_KEY=your_api_key_here
BEEHIIV_PUBLICATION_ID=your_publication_id_here

Configuración del escritorio de Claude

Agregue lo siguiente a su archivo de configuración de 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>"
      ]
    }
  }
}

Reemplazar:

  • <ABSOLUTE_UV_PATH> con la ruta a su ejecutable uv

  • <ABSOLUTE_SERVER_PATH> con la ruta absoluta a su archivo beehiiv_server.py

Herramientas disponibles

Este servidor MCP actualmente expone las siguientes herramientas (se agregarán más):

lista_publicaciones

Enumera todas las publicaciones accesibles con su clave API.

lista_de_publicaciones

Enumera las 5 publicaciones confirmadas más recientes para una publicación determinada.

list_posts(publication_id: str)

obtener_publicación

Recupera información detallada sobre una publicación específica.

get_post(publication_id: str, post_id: str)

obtener_contenido_de_la_publicación

Recupera el contenido HTML completo de una publicación.

crear_nueva_publicación

Crea una nueva publicación en la plataforma beehiiv (solo para empresas)

Cómo funciona

Cuando interactúas con este servidor a través de Claude Desktop:

  1. El cliente envía su pregunta a Claude

  2. Claude analiza las herramientas Beehiiv disponibles y decide cuál(es) utilizar

  3. El cliente ejecuta las herramientas elegidas a través de este servidor MCP

  4. Los resultados se envían a Claude.

  5. Claude formula una respuesta en lenguaje natural

  6. La respuesta se te muestra

(próximamente vídeo)

Solución de problemas

El servidor no aparece en Claude

  1. Comprueba la sintaxis de tu archivo claude_desktop_config.json

  2. Asegúrese de que todas las rutas sean absolutas, no relativas

  3. Reiniciar Claude Desktop

Visualización de registros

Consulte los registros de Claude para detectar problemas relacionados con MCP:

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

Los registros se almacenan en:

  • ~/Library/Logs/Claude/mcp.log para conexiones generales de MCP

  • ~/Library/Logs/Claude/mcp-server-beehiiv-mcp-server.log para registros específicos del servidor

Seguridad

  • Nunca envíe su archivo .env al control de versiones

  • Mantenga segura su clave API de Beehiiv

  • Considere implementar una limitación de velocidad para las llamadas API

Contribuyendo

hmu en 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