Skip to main content
Glama
ousepachn

Beehiiv Analytics MCP Server

by ousepachn

get_posts

Retrieve newsletter posts from a Beehiiv publication to analyze content performance and track publication activity.

Instructions

Get posts for a publication

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
publication_idYesThe ID of the publication
limitNoNumber of posts to return (default: 10)

Implementation Reference

  • server.js:90-92 (handler)
    Core implementation of get_posts tool: makes HTTP GET request to Beehiiv API to retrieve posts for a publication.
    async getPosts(publicationId, limit = 10) { return await makeRequest('GET', `${this.baseUrl}/publications/${publicationId}/posts?limit=${limit}`, this.headers); }
  • Handler dispatch in tools/call: executes get_posts by calling client.getPosts with parameters.
    case 'get_posts': result = await client.getPosts(args.publication_id, args.limit || 10); break;
  • Input schema for get_posts tool defining publication_id (required) and optional limit.
    inputSchema: { type: "object", properties: { publication_id: { type: "string", description: "The ID of the publication" }, limit: { type: "number", description: "Number of posts to return (default: 10)", default: 10 } }, required: ["publication_id"] }
  • server.js:215-233 (registration)
    Registration of get_posts tool in tools/list response with name, description, and input schema.
    { name: "get_posts", description: "Get posts for a publication", inputSchema: { type: "object", properties: { publication_id: { type: "string", description: "The ID of the publication" }, limit: { type: "number", description: "Number of posts to return (default: 10)", default: 10 } }, required: ["publication_id"] } },

Latest Blog Posts

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