PostHog MCP Server
for AI Agents
Connect your AI agent to StackOne's PostHog MCP server and give it 63 MCP tools out of the box. Auth, tool execution, and security all managed.
Coverage
63 Agent Actions
Create, read, update, and delete across PostHog — and extend your agent's capabilities with custom actions.
Authentication
Agent Tool Authentication
Per-user OAuth in one call. Your PostHog MCP server gets session-scoped tokens with zero credentials stored on your infra.
Agent Auth →Security
Agent Protection
Every PostHog tool response scanned for prompt injection in milliseconds — 88.7% accuracy, all running on CPU.
Prompt Injection Defense →Performance
Max Agent Context. Min Cost.
Free up to 96% of your agent's context window to enhance reasoning and reduce cost, on every PostHog call.
Tools Discovery →What is the PostHog MCP Server?
A PostHog MCP server lets AI agents read and write PostHog data through the Model Context Protocol — Anthropic's open standard for connecting LLMs to external tools. StackOne's PostHog MCP server ships with 63 pre-built actions, fully extensible via the Connector Builder — plus managed authentication, prompt injection defense, observability, and agent execution runtime. Connect it from MCP clients like Claude Desktop, Claude Code, Cursor, Goose, and VS Code, or from agent frameworks like OpenAI Agents SDK, LangChain, and Vercel AI SDK.
All PostHog MCP Tools
Every action from PostHog's API, ready for your agent. Create, read, update, and delete — scoped to exactly what you need.
An Actions
- Retrieve An Action
Retrieve details of a specific action
- Update An Action
Update an action's configuration
- Delete An Action
Delete an action (soft delete)
A Dashboards
- Retrieve A Dashboard
Retrieve details of a specific dashboard
- Update A Dashboard
Update a dashboard's configuration
A Feature Flags
- Retrieve A Feature Flag
Retrieve details of a specific feature flag
- Update A Feature Flag
Update a feature flag's configuration
Groups Types Metrics
- Create Groups Types Metrics
Create a new metric for a group type
- Retrieve Groups Types Metrics
Retrieve details of a specific group type metric
- Update Groups Types Metrics
Update a group type metric's configuration
- Delete Groups Types Metrics
Delete a group type metric
An Insights
- Retrieve An Insight
Retrieve details of a specific insight
- Update An Insight
Update an insight's configuration
- Delete An Insight
Delete an insight (soft delete)
Members
- Update Members
Update a member's details
- Delete Members
Remove a member from the organization
Organizations
- Create Organizations
Create a new organization
- Retrieve Organizations
Retrieve a list of organizations
- Delete Organizations
Delete an organization
Projects
- Create Projects
Create a new project within an organization
- List Projects
Retrieve a list of all projects in the organization
- Delete Projects
Delete a project
Roles
- Create Role
Create a new role
- Retrieve Role
Retrieve details of a specific role
- Update Role
Update a role's details
- Delete Role
Delete a role
Role Memberships
- Create Role Membership
Assign a user to a role
- Retrieve Role Membership
Retrieve details of a specific role membership
- Delete Role Membership
Remove a user from a role
A Session Recordings
- Update A Session Recording
Update a session recording's metadata
- Delete A Session Recording
Delete a session recording
Users
- Retrieve Users
Retrieve details of a specific user
- Update Users
Update a user's details
- Delete Users
Delete a user
Other (29)
- Create Actions
Create a new action
- Create Dashboards
Create a new dashboard
- Create Feature Flags
Create a new feature flag
- Create Insights
Create a new insight
- List All Actions
Retrieve a list of all actions
- List All Activity Log
Retrieve activity log entries for a project
- List All Alerts
Retrieve a list of all alerts
- List All Dashboards
Retrieve a list of all dashboards
- List All Feature Flags
Retrieve a list of all feature flags
- List All Groups Types
Retrieve a list of all group types
- List All Groups Types Metrics
Retrieve metrics for a specific group type
- List All Insights
Retrieve a list of all insights
- List All Members
Retrieve a list of organization members
- Retrieve An Organization
Retrieve details of a specific organization
- List All Integrations
List all organization-level integrations
- Retrieve List
List all projects in an organization
- Retrieve An Organization Project
Retrieve details of a specific project
- List All Roles
Retrieve a list of all roles
- List All Role Memberships
List all memberships for a specific role
- List All Session Recordings
Retrieve a list of all session recordings
- List All Users
Retrieve a list of all users
- Update Groups Types Update Metadata
Update group types metadata
- Update Partial Organization
Update an organization's settings
- Update Partial Organization Project
Update a project's configuration
- Update Complete Product Onboarding
Mark product onboarding as complete
- Delete Groups Types
Delete a group type
- Capture Event
Send a single event to PostHog
- Capture Batch Events
Send multiple events to PostHog in a single request
- Change Organization
Move a project to a different organization
Set Up Your PostHog MCP Server in Minutes
One endpoint. Any framework. Your agent is talking to PostHog in under 10 lines of code.
Agent Frameworks
{
"mcpServers": {
"stackone": {
"command": "npx",
"args": [
"-y",
"mcp-remote@latest",
"https://api.stackone.com/mcp?x-account-id=<account_id>",
"--header",
"Authorization: Basic <YOUR_BASE64_TOKEN>"
]
}
}
}Check More Data & Analytics MCP Servers
203+ actions
122+ actions
104+ actions
102+ actions
101+ actions
80+ actions
73+ actions
PostHog Resources
How I Vibe-Coded a Customer Success Hub Using StackOne's AI Native Integration Platform
How a non-developer vibe-coded a customer success dashboard pulling HubSpot, Pylon, PostHog, Databricks, and Fireflies through StackOne's MCP gateway.
7 min read
MCP Code Mode: Keeping Tool Responses Out of Agent Context
Anthropic's code_execution processes data already in context. Custom MCP code mode keeps raw tool responses in a sandbox. 14K tokens vs 500.
11 min
Comparing BM25, TF-IDF, and Hybrid Search for MCP Tool Discovery
Benchmarking BM25, TF-IDF, and hybrid search for MCP tool discovery across 916 tools. The 80/20 TF-IDF/BM25 hybrid hits 21% Top-1 accuracy in under 1ms.
10 min
Indirect Prompt Injection Defense for MCP Tools: A Technical Guide
MCP tools that read emails, CRM records, and tickets are indirect prompt injection vectors. Here's how we built a two-tier defense that scans tool results in ~11ms.
12 min
MCP vs A2A: Architecture, Security, and When to Use Each
MCP vs A2A: what each protocol standardizes, how they differ, their shared security risks including indirect prompt injection, and when to use one, both, or a hybrid architecture.
12 min
MCP vs API: What 200+ Connector Builds Taught Us
MCP wraps APIs, it doesn't replace them. After building 200+ connectors that serve both, here's when each approach wins.
14 min read
PostHog MCP Server FAQ
Does StackOne have a PostHog MCP server?
PostHog MCP server vs direct API integration — what's the difference?
How does PostHog authentication work for AI agents?
origin_owner_id.Are PostHog MCP tools vulnerable to prompt injection?
What is the context bloat of a PostHog agent and how do I avoid it?
Can I limit which actions my PostHog agent can access?
Can I create custom agent actions for my PostHog MCP server?
When should I NOT use a PostHog MCP server?
What AI frameworks and AI clients does the StackOne PostHog MCP server support?
Put your AI agents to work
All the tools you need to build and scale AI agent integrations, with best-in-class connectivity, execution, and security.