Skip to main content
Glama

Beehiiv Analytics MCP Server

by ousepachn

Beehiiv MCP Server

A Model Context Protocol (MCP) server for Beehiiv analytics, providing read-only access to publications, posts, and segments data.

Features

Publications

  • List all publications

  • Get detailed publication information

Posts

  • List posts with filtering options (status, audience, platform, etc.)

  • Get detailed post information with optional content expansion

  • Get aggregate statistics for all posts in a publication

Segments

  • List all segments for a publication

  • Get detailed segment information

Setup

  1. Install dependencies:

pip install -r requirements.txt
  1. Set your API key as an environment variable:

export BEEHIIV_API_KEY="your_api_key_here"
  1. Update the MCP configuration file (mcp_config.json) with your API key and correct path to the server script.

Usage

As MCP Server

The server can be used with any MCP-compatible client. Update your MCP client configuration to include:

{ "mcpServers": { "beehiiv-analytics": { "command": "/path/to/venv/bin/python3", "args": ["/path/to/beehiiv_mcp_server.py"], "env": { "BEEHIIV_API_KEY": "your_api_key_here" } } } }

Testing

Run the test script to verify API connectivity:

python test_beehiiv_api.py

Available Tools

  • list_publications - List all accessible publications

  • get_publication_details - Get detailed publication information

  • list_posts - List posts with various filters

  • get_post_details - Get detailed post information

  • get_posts_summary_stats - Get aggregate post statistics

  • list_segments - List publication segments

  • get_segment_details - Get detailed segment information

API Key

Get your API key from the beehiiv developer portal.

API Documentation

Deploy Server
A
security – no known vulnerabilities
F
license - not found
A
quality - confirmed to work

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ousepachn/beehiivanalyticsMCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server