MCP Ecommerce
PostHog logo

Installation guide

How to install PostHog MCP

In Claude, ChatGPT, Gemini, Microsoft Copilot, Perplexity, Cursor and Claude Code, with what to check before you start and the first prompts to run.

PostHog MCP is a hosted remote server at `https://mcp.posthog.com/mcp`. You add it by URL, or through the PostHog Wizard, and then sign in with your PostHog account. The PostHog authentication server routes you to the US or EU region based on the account you log in with. Connecting and calling tools is free, but some tools call LLMs internally and may be billed as PostHog AI spend.

Have someone who owns the store's analytics do this, such as an analytics lead or an agency developer with access to the PostHog organization. Sign in with the account that holds the store's data. The server can read and write, so start with read-only questions and review every tool call before approving changes. The docs warn about prompt injection.

PostHog MCP setup guide: PostHog's MCP documentation page on posthog.com, shown in a browser frame (analytics MCP server for e-commerce)
PostHog MCP setup guide preview: PostHog’s documentation on posthog.com, captured Nov 9, 2026. The page may have changed since; the link opens the live version.

Before you start

  • A PostHog account with access to the organization and project that holds your store's data
  • An MCP-compatible client. The docs list PostHog Desktop, Claude Code, Claude Desktop, Cursor, Codex, VS Code, Windsurf and Zed, plus Lovable, Replit and v0
  • Node.js with npx, only if you use the PostHog Wizard
  • Permission from an organization admin if you want AI-powered tools, because they need AI data processing enabled in organization settings
  • A decision on who reviews tool calls before any write action (flags, experiments, CDP destinations)
How it runs
Remote, added by URL
Access
Read and write
Server address
https://mcp.posthog.com/mcp

PostHog MCP in Claude

  1. Open Claude.ai or the Claude Desktop app and go to Settings > Connectors.
  2. Choose the option to add a custom connector by URL.
  3. Enter https://mcp.posthog.com/mcp as the server URL. The docs also have a dedicated Claude Desktop page, so check it for the exact steps.
  4. Save, then click connect and sign in to PostHog with the account that holds your store's data.
  5. Confirm the PostHog tools are listed, then run a read-only prompt.
Connector URL
https://mcp.posthog.com/mcp

PostHog MCP in ChatGPT

  1. The PostHog docs do not cover ChatGPT, so use ChatGPT's standard route for custom MCP servers.
  2. Enable Developer mode in ChatGPT's connector settings, if your plan and workspace allow it.
  3. Add a new custom connector and enter https://mcp.posthog.com/mcp as the server URL.
  4. Sign in to PostHog when prompted, using the account that holds your store's data.
  5. Start a chat with the connector enabled and run a read-only prompt first.
Connector URL
https://mcp.posthog.com/mcp

PostHog MCP in Gemini

  1. The PostHog MCP page does not list the Gemini app or Gemini CLI as a client. It does mention a PostHog AI plugin for Gemini CLI, so check the PostHog docs for that route.
  2. For a manual setup in Gemini CLI, open its settings file and add an entry under mcpServers with the URL https://mcp.posthog.com/mcp. Take the exact URL key name (url or httpUrl) from the Gemini CLI documentation.
  3. Restart Gemini CLI so it reloads the configuration.
  4. Complete the PostHog sign-in if the client prompts for authentication.
  5. Run a read-only prompt to confirm the tools respond.

PostHog MCP in Microsoft Copilot

  1. The docs cover VS Code. They do not cover Microsoft Copilot Studio, which would need its own custom MCP tool setup.
  2. For GitHub Copilot in VS Code, open the workspace and create or edit .vscode/mcp.json.
  3. Add a server entry under servers with the URL https://mcp.posthog.com/mcp. The docs have a VS Code page, so check it for the exact format.
  4. Start the server from the editor and sign in to PostHog when prompted.
  5. Open Copilot chat in agent mode and run a read-only prompt.
.vscode/mcp.json
{
  "servers": {
    "posthog": {
      "url": "https://mcp.posthog.com/mcp"
    }
  }
}

PostHog MCP in Perplexity

  1. The PostHog docs do not cover Perplexity, so use the standard connector flow in the Perplexity desktop app.
  2. Open the app's connectors settings and choose to add a custom or remote MCP connector. Availability depends on your plan.
  3. Enter https://mcp.posthog.com/mcp as the server URL.
  4. Sign in to PostHog with the account that holds your store's data.
  5. Run a read-only prompt to confirm the connection.
Connector URL
https://mcp.posthog.com/mcp

PostHog MCP in Cursor

  1. Fastest route: run the PostHog Wizard from a terminal. The docs list Cursor among its targets.
  2. Alternatively, open Cursor's MCP settings and add a remote server, or edit the MCP config file. The docs have a Cursor page for the exact steps.
  3. Use the URL https://mcp.posthog.com/mcp.
  4. Reload Cursor if the server does not appear, then sign in to PostHog when prompted.
  5. Check that the PostHog tools are listed and run a read-only prompt.
PostHog Wizard (Terminal)
npx @posthog/wizard mcp add

PostHog MCP in Claude Code

  1. Fastest route: run the PostHog Wizard in your terminal. The docs list Claude Code among its targets.
  2. For a manual setup, add the remote server by URL with claude mcp add. The docs have a Claude Code page that gives the exact command.
  3. Use https://mcp.posthog.com/mcp as the URL.
  4. Start claude and run /mcp to start the PostHog sign-in flow.
  5. Run a read-only prompt to confirm the tools work.
Terminal
claude mcp add --transport http posthog https://mcp.posthog.com/mcp

Check that it works

Start with questions that only read data. If these answer from your real account, the connection is good.

  • What are the top 5 errors in my project this week?
  • Show me the full stack trace for the most recent crash. Do not change anything.
  • List the feature flags in this project and their current status.

Troubleshooting

+

The sign-in succeeds but I see the wrong data or an empty project. What happened?

The PostHog authentication server routes you to the US or EU region based on the account you log in with. Sign out and log in again with the account that holds your store's data. Then check that the right organization and project are the ones in use.

+

AI-powered tools are missing or fail. Why?

The docs say tools that use LLMs internally are only available when AI data processing is enabled in your organization settings. Ask an organization admin to check that setting. Decide first whether you accept the AI spend these tools can generate.

+

The client does not list the PostHog server after I add it. What should I check?

Confirm the URL is exactly `https://mcp.posthog.com/mcp` and restart the client. If you used the Wizard, rerun `npx @posthog/wizard mcp add` and pick the right client. Otherwise follow that client's page in the PostHog docs and check for config syntax errors.

Written Nov 9, 2026 from the vendor documentation. Exact menus, addresses and commands change; the official documentation is the source of truth.

Questions and answers

Questions readers and searchers ask about installing PostHog MCP, answered by the site editor from the vendor documentation, plus reader experience. Every comment is reviewed before it appears.

Ask a question or share what worked

Reviewed before publishing. One link max, no HTML.