Posthog Universal MCP Server
Provides tools to interact with PostHog's analytics platform, enabling management of events, users, feature flags, and other PostHog resources.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Posthog Universal MCP Servershow me the top 10 pages by pageview count in the last 7 days"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Posthog Universal MCP Server
This repository contains an implementation of an Posthog Universal MCP (Model Context Protocol) server. It provides a standardized interface for interacting with Posthog's tools and services through a unified API.
The server is built using the Universal MCP framework.
This implementation follows the MCP specification, ensuring compatibility with other MCP-compliant services and tools.
Usage
You can start using Posthog directly from agentr.dev. Visit agentr.dev/apps and enable Posthog.
If you have not used universal mcp before follow the setup instructions at agentr.dev/quickstart
Related MCP server: PostHog MCP
Available Tools
The full list of available tools is at ./src/universal_mcp_posthog/README.md
Local Development
š Prerequisites
Ensure you have the following before you begin:
Python 3.11+ (recommended)
uv (install globally with
pip install uv)
š ļø Setup Instructions
Follow the steps below to set up your development environment:
Sync Project Dependencies
uv syncThis installs all dependencies from
pyproject.tomlinto a local virtual environment (.venv).Activate the Virtual Environment
For Linux/macOS:
source .venv/bin/activateFor Windows (PowerShell):
.venv\Scripts\ActivateStart the MCP Inspector
mcp dev src/universal_mcp_posthog/server.pyThis will start the MCP inspector. Make note of the address and port shown in the console output.
Install the Application
mcp install src/universal_mcp_posthog/server.py
š Project Structure
.
āāā src/
ā āāā universal_mcp_posthog/
ā āāā __init__.py # Package initializer
ā āāā server.py # Server entry point
ā āāā app.py # Application tools
ā āāā README.md # List of application tools
āāā tests/ # Test suite
āāā .env # Environment variables for local development
āāā pyproject.toml # Project configuration
āāā README.md # This fileš License
This project is licensed under the MIT License.
Generated with MCP CLI ā Happy coding! š
Related MCP Connectors
PostHog MCP ā wraps PostHog Analytics API (app.posthog.com/api)
AI call analysis and voice agents for sales teams. Signup, usage, agents and call data over MCP.
Native MCP access to CRM contacts, organizations, deals and tasks with user permissions.
Create, schedule, and publish social posts, manage accounts, and read analytics as MCP tools.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables interaction with PostHog analytics platform, allowing users to list projects, create annotations, and search insights through natural language in Claude Desktop.5MIT
- AlicenseNot gradedqualityCmaintenanceEnables interaction with PostHog's product analytics platform through natural language, allowing users to manage feature flags, view errors, and access other platform features.498 npm1MIT
- AlicenseNot gradedqualityDmaintenanceEnables interaction with PostHog product analytics API, supporting project listing, event queries, insight analysis, feature flag management, and annotation creation.MIT
- AlicenseAqualityFmaintenanceConnects AI assistants to PostHog to query events, persons, insights, dashboards, feature flags, cohorts, and experiments through the Model Context Protocol.1356 npmMIT