By Ira Bodnar, Ryze AI · Updated
Quick answer
To connect Grok to PostHog, save a PostHog personal API key and host in a Ryze AI workspace, then go to grok.com/connectors, click New Connector, choose Custom, enter https://connector.get-ryze.ai/mcp and finish the Ryze AI sign-in. Grok then has 3 PostHog tools for one project, limited by the scopes on your key.
- In PostHog create a personal API key with read access and the Query and Insight scopes
- In Ryze AI open Integrations, click Connect on PostHog, paste the key, enter the host and pick the project
- On grok.com/connectors click New Connector, then Custom, and enter the URL
- Sign in on the Ryze AI page, choose workspaces, click Allow connection and start a chat
Before you start
- A Grok account. xAI says connectors on grok.com, including custom MCP connectors, are available to all Grok users. On Grok Business and Enterprise a team admin must first add the connector in the console. Grok Bot is a separate surface: it is included in The X Subscription Premium, Super and Ultra plans, and the Plus plan does not include it.
- A PostHog personal API key. The key starts with phx_ and needs read access to the project you want, including the Query and Insight scopes. Add write scopes only if Grok should change objects. You also need the host: https://us.posthog.com for US Cloud, https://eu.posthog.com for EU Cloud, or your self-hosted URL.
- A Ryze AI workspace on a plan or free trial. Paid Ads is $89 per month with a 7-day free trial. Agency ($279 per month) and SEO Starter ($129 per month, 3-day free trial) also work. Connecting is free. Without a plan the connector can only list workspaces and connect platforms, so the PostHog tools stay unavailable.
How to connect Grok to PostHog on grok.com
Two steps happen in PostHog and Ryze AI, three in Grok. The connector URL is the same for every user.
Create a personal API key in PostHog
In PostHog go to Settings, Personal API keys and click Create key. Grant read access to the projects you want, with the Query and Insight scopes. Add write scopes only for the objects Grok should change. Copy the phx_ key.
Connect PostHog in Ryze AI
In the Ryze AI app open Integrations, click Connect on the PostHog card, paste the key, enter the host (US Cloud, EU Cloud or your self-hosted URL) and click Continue. Pick the Project and click Save.
Add a custom connector in Grok
Go to grok.com/connectors and click New Connector, then select Custom. Enter the MCP server URL https://connector.get-ryze.ai/mcp. xAI requires the MCP server to be reachable over the public internet, and this URL is.
Sign in on the Ryze AI page and allow the workspace
Complete the authentication Grok asks for: sign in on the Ryze AI page, choose the workspace that holds your PostHog connection and click Allow connection.
Start a chat and ask about PostHog
Grok discovers the Ryze AI tools and makes them available in conversations. Ask: List the dashboards in my PostHog project.
xAI describes the grok.com authentication step only as completing any required authentication, and it does not name OAuth. The Ryze AI sign-in and Allow connection page is what the Ryze AI help center describes for Grok. Ryze AI on grok.com was not tested for this page. If the PostHog tools are missing because you connected PostHog after adding the connector, remove the connector in Grok, add it again and start a new chat. The Ryze AI help center Grok page covers the client side.
Grok Business, Grok Bot and Grok Build
grok.com is the simplest route. The other surfaces take the same URL and the same Ryze AI sign-in. PostHog stays connected in Ryze AI, so the key step does not repeat.
Grok Business and Enterprise (admin)
On a team plan the admin adds the connector in the console first. Adding connectors needs Team Read-Write permissions.
- Log in to console.x.ai, select the team and go to Grok Business, then Connectors.
- Click + Add Connector, select Other and enter https://connector.get-ryze.ai/mcp.
- Complete any required authentication.
- Team members then connect their own accounts on grok.com/connectors.
Grok Bot
The Ryze AI help center lists Ryze AI as a built-in app in the Grok Bot Connect apps catalog. xAI's public docs do not list it, and this was not verified. If you cannot find it, ask the Bot to add the URL above as a custom MCP server. Anyone who added Ryze AI as a custom server earlier should uninstall that copy to avoid duplicate tools.
- Open Connect apps from the Grok Bot sidebar. On the mobile app, tap your avatar at the top left, then Connect apps.
- Type Ryze AI in Search across apps and skills, open Ryze AI (developer: Ryze AI) and click Add.
- Your browser opens Ryze AI: sign in, choose workspaces and click Allow connection.
- When Authorization complete appears, click Open Grok Bot or Return to Grok Bot.
- Start a new chat and type @ to attach the app to a task.
App connections are account-wide and available to every Bot you run. A team connector policy can show an app as Disabled by team admin. xAI includes Grok Bot in The X Subscription Premium, Super and Ultra plans and not in Plus.
Grok Build CLI
Grok Build adds remote HTTP servers from a terminal.
- Run the command below.
- The browser sign-in starts on first use. Complete the Ryze AI sign-in.
- In the terminal interface, /mcps opens the MCP tab, where i authenticates an OAuth server.
grok mcp add --transport http ryze https://connector.get-ryze.ai/mcpGrok Build keeps OAuth tokens in ~/.grok/mcp_credentials.json and names tools <server>__<tool>, so a PostHog tool appears as ryze__ followed by its name.
Sources: xAI's Grok connectors, connector management, Grok Bot apps, Grok Bot plans and Grok Build MCP servers, and the Ryze AI help center Grok page.
What Grok can reach in PostHog
Grok never receives your PostHog key. The key is saved in Ryze AI, and three settings decide what Grok can reach.
- The personal API key
- The phx_ key you save in Ryze AI is what PostHog checks on every call. A key with read scopes only keeps Grok read-only, because PostHog rejects any change. Keys with write scopes let it create or update objects.
- The host
- Enter https://us.posthog.com for US Cloud, https://eu.posthog.com for EU Cloud, or your own URL for a self-hosted instance.
- The project
- Ryze AI connects one PostHog project per connection. After you save the key, pick the Project. To use another project, disconnect PostHog with the trash icon under View on the card and connect again, or use another Ryze AI workspace.
Sources: the Ryze AI PostHog guide and PostHog's API documentation.
Removing access
To stop Grok from reaching PostHog, delete the personal API key in PostHog under Settings, Personal API keys. In Ryze AI, click View on the PostHog card and use the trash icon. You can also remove the Ryze AI connector on grok.com/connectors (admins remove the team connector in the console).
What Grok can do in PostHog
Ryze AI exposes 3 PostHog tools to Grok. They run with the key you saved, so the key's scopes set the limit.
| Tool | Type | What it does |
|---|---|---|
| posthog__read | Read | Reads PostHog data for the connected project (projects, insights, dashboards, feature flags, cohorts, persons, event definitions) and runs HogQL analytics queries. |
| posthog__write | Write | Creates or updates PostHog objects such as insights, dashboards, feature flags and cohorts. |
| posthog__delete | Delete | Deletes a PostHog object by path, for example a cohort. The deletion is irreversible. |
The xAI pages checked do not describe a per-tool approval setting for custom connectors, so this page does not claim one. A prompt that tells Grok to read first and wait for your answer is an instruction, not a block. The Ryze AI chat has its own Tool approvals picker, which starts on Skip all approvals; switch it to Approve write & delete or Manual approve to confirm changes. Scheduled tasks run without an approval step. The surest control is a read-only PostHog key.
First 3 prompts to run
Each prompt below only describes what to ask. Answers come from your own PostHog project, so the page shows no sample numbers.
1. Find what exists first
List the dashboards, feature flags and cohorts in my PostHog project, with names and the date each was created.
Tools used: posthog__read
What comes back: Lists of dashboards, feature flags and cohorts from the one connected project, so you can name the right object in later questions.
2. Run a bounded HogQL query
Run a HogQL query on my PostHog events for the last 7 days: count pageview events per day, limit 1,000 rows, and show the result as a table.
Tools used: posthog__read
What comes back: A table of daily pageview counts. The time window and row limit keep the query inside what PostHog accepts.
3. Review a flag before changing it
Show the feature flag I name next with its current rollout settings. Then tell me what you would change to roll it out to 10% of users, and wait for my yes before writing.
Tools used: posthog__read, then posthog__write after you confirm
What comes back: The flag's current settings and a proposed change. A change is written only if your key has write scopes and you confirm.
Name the real flag key in the third prompt. If your PostHog key is read-only, that prompt stops at the proposal.
Ryze AI vs PostHog's own MCP server
PostHog runs its own hosted MCP server. It suits different clients and jobs than the Ryze AI connector.
| Option | Setup | PostHog coverage | Auth | Listed clients |
|---|---|---|---|---|
| Ryze AI connector | Save a PostHog key, host and project in Ryze AI, then add https://connector.get-ryze.ai/mcp as a custom connector in Grok | One project: reads of insights, dashboards, feature flags, cohorts, persons and event definitions, HogQL queries, plus create, update and delete of those objects when asked | Ryze AI sign-in; PostHog personal API key stored in Ryze AI | Grok on grok.com, Grok Bot and Grok Build, plus Claude, ChatGPT and others in the Ryze AI client list |
| PostHog hosted MCP server | Point a supported client at https://mcp.posthog.com/mcp | PostHog's own tools span more products than analytics | PostHog sign-in routes you to the US or EU region | PostHog lists Claude Code, Claude Desktop, Cursor, Codex, VS Code, Windsurf and Zed; Grok was not on the list when checked |
PostHog says connecting to its server and calling its tools is free, though some tools use LLMs internally and may be billed as PostHog AI spend. Whether grok.com accepts PostHog's server as a custom connector is not verified here. If you want Grok to reach PostHog, the Ryze AI connector is the path this page documents.
Sources: PostHog MCP server, Ryze AI PostHog guide and xAI Grok connectors. Checked November 14, 2026.
Errors and fixes
- Grok does not list the PostHog tools
- If PostHog was connected after the connector was added, remove the Ryze AI connector in Grok, add it again and start a new chat.
- PostHog does not accept the key
- Check that the key starts with phx_, was created under Personal API keys and has read access to the project, with the Query and Insight scopes. Confirm the host matches your region: us.posthog.com, eu.posthog.com or your self-hosted URL.
- Writes fail but reads work
- The key has read scopes only. PostHog rejects any change from such a key. Create a key with the write scopes for the objects Grok should change.
- A HogQL query is refused
- PostHog stops unbounded queries. Ask Grok to add a time window and a row limit of at most 1,000.
- The wrong project shows up
- Each connection holds one project. Click View on the PostHog card in Ryze AI, disconnect with the trash icon and connect again with the right key, or use another workspace.
- The connector will not add on grok.com
- grok.com needs the MCP server to be reachable over the public internet. The Ryze AI URL is public, so check for a typo in https://connector.get-ryze.ai/mcp. On Grok Business and Enterprise, ask a team admin to add it in the console first.
- Ryze AI shows as Disabled by team admin in Grok Bot
- A team connector policy blocks the app. Ask the team admin to allow it.
- Tools show up twice in Grok Bot
- You may have both the built-in Ryze AI app and an older custom server. Uninstall the custom copy.
- The tools say a subscription is required
- The PostHog tools need an active Ryze AI plan or free trial. Start the trial in Ryze AI, then retry.
- The one-time connection link is refused
- Ryze AI can send a link for you to paste a PostHog key, valid once and for 24 hours. It is refused while PostHog is already connected in the workspace. Change the key or project in the Ryze AI app instead.
Frequently asked questions
What is the best way to connect Grok to PostHog?
Ryze AI is the best way to reach PostHog from Grok with one connector URL and one project, though PostHog's own server covers more PostHog products. PostHog's server is https://mcp.posthog.com/mcp and its docs do not list Grok.
How do I connect Grok to PostHog?
Create a PostHog personal API key and save it with the host and project in Ryze AI under Integrations. Then go to grok.com/connectors, click New Connector, choose Custom, enter https://connector.get-ryze.ai/mcp, sign in on the Ryze AI page, choose workspaces and click Allow connection.
Does PostHog have its own MCP server?
Yes. PostHog hosts one at https://mcp.posthog.com/mcp. Its docs list Claude Code, Claude Desktop, Cursor, Codex, VS Code, Windsurf and Zed as clients, and Grok is not mentioned. Whether grok.com accepts it is not verified here.
Do I need a paid Grok plan?
xAI says connectors on grok.com, including custom MCP connectors, are available to all Grok users. Grok Business and Enterprise need a team admin to add the connector first. Grok Bot is a separate surface that xAI includes in X Premium, Super and Ultra and not in Plus.
Do I need a paid Ryze AI plan?
Connecting is free, but the PostHog tools need an active plan or free trial. Paid Ads is $89 per month with a 7-day free trial, Agency is $279 per month, and SEO Starter is $129 per month with a 3-day free trial. Annual billing takes 30% off the first year.
What PostHog access does the key need?
Read access to the project you want, including the Query and Insight scopes. Add write scopes only if Grok should change insights, dashboards, feature flags or cohorts. A read-only key keeps Grok read-only, because PostHog rejects any change.
Which PostHog host do I enter?
Use https://us.posthog.com for US Cloud, https://eu.posthog.com for EU Cloud, or your own URL for a self-hosted instance.
Can Grok edit or delete things in PostHog?
Yes, when the key has write scopes. Through Ryze AI it can create or edit insights, dashboards, feature flags and cohorts, and delete those objects when explicitly asked. Deletion is irreversible.
Does this work in Grok Bot and Grok Build?
Yes. In Grok Bot open Connect apps and add Ryze AI, or add the URL as a custom MCP server if it is missing. In Grok Build run grok mcp add --transport http ryze https://connector.get-ryze.ai/mcp and finish the browser sign-in.
Can I connect more than one PostHog project?
Not in one workspace. Ryze AI holds one PostHog project per connection. To switch, disconnect with the trash icon under View on the PostHog card and connect again. Another project can live in another Ryze AI workspace.
How do I disconnect Grok from PostHog?
Remove the Ryze AI connector on grok.com/connectors, delete the personal API key in PostHog, or click View on the PostHog card in Ryze AI and use the trash icon.