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
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
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.
texthttps://mcp.lemonado.io/mcp - 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
Add Lemonado
Merge this into the file and save.
json{ "mcpServers": { "lemonado": { "url": "https://mcp.lemonado.io/mcp" } } } - 5
Sign in
Cursor asks you to sign in to Lemonado. Approve access, then ask the agent about your data.
- 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.
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
I just added a capture call for the pricing toggle. Did PostHog receive it from the preview deploy, with the right properties?
Yes, 23 events from the preview in the last hour, but the "plan" property is empty because the toggle state is read before it updates.
Source: PostHog + your code
Which landing pages in our code still use the old signup form, and how do their signup rates compare in PostHog?
9 pages still use LegacyForm. They convert at 2.1% against 3.6% for pages on the new form.
Source: PostHog + your code
Replace the mock data in our admin growth chart with last month's daily PostHog signups, as a typed fixture.
Added fixtures/posthog.ts with 30 days of signups and activations. The chart renders real data in dev.
Source: PostHog + your code
Which events changed most this week against last, and is it real or a tracking issue?
"signup_completed" is down 22%, but only on Safari since Monday's release. Server-side user_created is flat, so it's tracking, not signups.
Source: PostHog
Compare Google Ads clicks by campaign last week with PostHog sessions carrying the same utm_campaign.
Most campaigns match within 10%. "Brand | Exact" shows 1,240 clicks but 610 sessions; its final URL drops the UTM parameters on redirect.
Source: PostHog
Connect PostHog to another AI app.
Claude
Connect PostHog to Claude
ChatGPT
Connect PostHog to ChatGPT
Claude Code
Connect PostHog to Claude Code
VS Code (GitHub Copilot)
Connect PostHog to VS Code (GitHub Copilot)
Codex
Connect PostHog to Codex
Perplexity
Connect PostHog to Perplexity
Google Antigravity
Connect PostHog to Google Antigravity
Windsurf (Devin Desktop)
Connect PostHog to Windsurf (Devin Desktop)
Zed
Connect PostHog to Zed
n8n
Connect PostHog to n8n
Other integrations for Cursor
All Cursor integrations- Mixpanel in CursorAsk Claude, ChatGPT or Cursor which campaigns bring users who stick, with Mixpanel next to your ad spend.
- Google Analytics in CursorAsk Claude, ChatGPT or Cursor about GA4 traffic, conversions and funnels, next to your ad spend.
- Stripe in CursorPut Stripe revenue next to your ad spend in Claude, ChatGPT or Cursor.
- Google Ads in CursorAsk Claude, ChatGPT or Cursor about your Google Ads campaigns, search terms and spend.
- Amplitude in CursorAsk Claude, ChatGPT or Cursor which campaigns bring Amplitude users who stick around.
- Snowflake in CursorAsk Claude, ChatGPT or Cursor about the numbers in your Snowflake warehouse, with live ad spend next to them.
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.
# 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.txtFrequently 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.
Still have a question?
Shoot us an email at hello@lemonado.io.
Try for freeStop fighting with data. Start feeding your AI.
Connect your data to AI and free your team from reporting and busywork.
Try Lemonado free