Skip to content

Connect PostHog to Cursor

  • How does this page perform?

Ship tracking and landing page changes in Cursor with live PostHog numbers next to the code. Lemonado connects them in about 2 minutes, no API keys needed.

MCPhttps://mcp.lemonado.io/mcp

Why connect PostHog to Cursor?

Cursor's agent sees the landing pages and tracking you're editing, but not how they perform. Add Lemonado and it reads PostHog sessions, events and funnels for those exact pages, so you know what a change did and catch broken tracking before it reaches the weekly report.

  • All your PostHog data

    Events, pageviews and their properties, ready to ask about.

  • Always today's numbers

    Persons with UTM and referrer properties, synced from PostHog automatically, so answers use today's numbers.

  • Connect all your tools

    Questions like "What does an activated user cost?" use PostHog and Mixpanel, GA4 at once.

How to connect PostHog to Cursor

Before you start

  • A PostHog account you can sign in to
  • Cursor installed
  • A Lemonado account (the free trial works)
  1. 1

    Connect PostHog in Lemonado

    In Lemonado, open Connectors, find PostHog and sign in. Sign in to PostHog and pick the project. Choose the EU region if your PostHog lives there.

  2. 2

    Turn on external access

    In the company's settings, open External tools, turn the connection on, choose which sources it can reach and copy the server URL.

    text
    https://mcp.lemonado.io/mcp
  3. 3

    Open your MCP config

    Open ~/.cursor/mcp.json for every project, or .cursor/mcp.json for this project only. Create the file if it doesn't exist.

  4. 4

    Add Lemonado

    Merge this into the file and save.

    json
    {
      "mcpServers": {
        "lemonado": {
          "url": "https://mcp.lemonado.io/mcp"
        }
      }
    }
  5. 5

    Sign in

    Cursor asks you to sign in to Lemonado. Approve access, then ask the agent about your data.

  6. 6

    Ask Cursor about PostHog

    Try "For the landing page I have open, show its PostHog sessions, signup rate and top sources for the last 30 days." Or ask: "Is the new event firing?" or "Which pages need the new form?"

Good to know

  • Editing the file directly avoids relying on menu labels that change between Cursor versions.

What can Cursor do with PostHog?

Cursor's agent reads your PostHog data while it edits: it fills components with real data, checks tracking code and writes the analysis next to your code.

Cursor logoCursor

For the landing page I have open, show its PostHog sessions, signup rate and top sources for the last 30 days.

4,820 sessions, 2.4% signup rate, 61% from Google Ads. The rate is half the site average; most visitors leave before the form, which sits below the fold on mobile.

Source: PostHog + your code

Reading this as an AI agent?

Everything an agent needs to set this up, in plain text. Paste this page's link into Cursor and ask it to connect you, or copy the block.

For agents · markdown
# Connect PostHog to Cursor (Lemonado MCP)

- Server URL: https://mcp.lemonado.io/mcp
- Transport: Streamable HTTP
- Auth: OAuth; the user signs in to Lemonado in the browser. No API keys.
- In Lemonado: connect the PostHog project. Sign in to PostHog and pick the project. Choose the EU region if your PostHog lives there.
- In Cursor: ~/.cursor/mcp.json

```json
{
  "mcpServers": {
    "lemonado": {
      "url": "https://mcp.lemonado.io/mcp"
    }
  }
}
```

First question to try: "For the landing page I have open, show its PostHog sessions, signup rate and top sources for the last 30 days."

More: https://lemonado.io/integrations/posthog · https://lemonado.io/llms.txt
FAQ

Frequently Asked Questions

Not with Lemonado. You connect PostHog once in Lemonado, and Cursor signs in to Lemonado. No PostHog key goes into your mcp.json or your repo.

Yes. PostHog's official MCP server is hosted, so Cursor can use it too. It covers PostHog only. Lemonado covers PostHog plus your ad platforms, GA4 and the rest of your stack in one connection, so Cursor can answer questions across them.

Open Cursor's settings and find lemonado in the MCP list. A red dot or a sign-in prompt means the login expired. Restart Cursor after editing mcp.json. In Lemonado, check that PostHog is connected and External tools is on for the company. If sources are missing, check that your site keeps UTM parameters through redirects. PostHog can only record the source it sees on the first page.

Yes, if both are connected in Lemonado. One connection reaches every source you allow, so you can ask things like "Compare Google Ads clicks by campaign last week with PostHog sessions carrying the same utm_campaign."

MCP is included in Lemonado's paid plans and in the free trial, so you can try it before you pay.

See plans and pricing

Still have a question?

Shoot us an email at hello@lemonado.io.

Try for free

Stop fighting with data. Start feeding your AI.

Connect your data to AI and free your team from reporting and busywork.

Try Lemonado free