Find out why customers churn, without waiting for someone to write SQL.

Churn answers are split across three places: your product database, your product analytics, and your billing system. Valv puts all three in one workspace on your machine, so you can ask a plain question and get a table or chart back, with every query open to check.

Book a demo

Want to see the setup first? Go to the steps.

Short answer

To analyze churn with AI, connect your production database to Valv, add PostHog and your billing tool (for example Stripe) as remote MCP servers in the same workspace, and ask in plain language. The coding agent you already use queries each source, joins the results, and answers with a table or chart. Each database query and code step is cited, so you or an engineer can check how the number was made.

Your database

Who your customers are, which plan and account they belong to, and what they created in the product.

PostgreSQL, MySQL, SQLite, or ClickHouse, added once with a connection string.

PostHog

What people actually do: events, feature usage, last seen, funnels.

PostHog's remote MCP server at mcp.posthog.com, connected with a browser login.

Billing, e.g. Stripe

Who pays what, who cancelled and when, failed payments, refunds.

Any remote MCP server, for example Stripe's at mcp.stripe.com.

Questions you can ask, and what comes back.

Ask the way you would ask a data analyst. The answer shows up in the chat as a table, an inline chart, or a file in your workspace.

  • "Which plans lost the most paying customers last quarter?"

    A table by plan with active customers at the start, cancellations, and churn rate. Usually a single database or billing query.

  • "Did accounts that used exports in their first two weeks churn less than accounts that didn't?"

    Two rows side by side, with account counts and churn for each group. Usage comes from PostHog, the account list and plan from your database.

  • "Which customers on the Business plan haven't been active in 30 days?"

    A list of at-risk accounts with plan, monthly revenue, and last activity date. Good input for a customer success call list.

  • "Show monthly revenue retention by signup cohort for this year."

    A cohort table or line chart, drawn inline in the chat. Ask for it as a dashboard and you get a file you can reopen later.

  • "Churn jumped in August. What changed?"

    A breakdown by plan, signup month, and billing reason, with the agent pointing out which segment moved. Treat this one as a starting point, not a conclusion.

Every answer shows its work.

Citations sit next to the answer. Open one to see the exact query or code the agent ran and the rows it got back.

which plans lost the most paying customers last quarter?
plancancelled
Starter41
Team17
Business4

Query details · app_db

{
  "from": "subscriptions",
  "select": { "plan": true, "cancelled": { "count": true } },
  "where": { "canceled_at": { "gte": "2026-04-01", "lt": "2026-07-01" } },
  "groupBy": ["plan"]
}

Numbers in this example are made up.

Setup

From three logins to your first churn answer.

Five steps, done once. Steps 1 and 2 may need help from an engineer the first time.

  1. 1

    Have a coding agent signed in.

    Valv drives an AI agent that is already installed on your computer, such as Claude Code, Codex, or Cursor, on the subscription you pay for. Install one and sign in, then open Valv and pick it.

  2. 2

    Add your database.

    Use Add datasource and paste a PostgreSQL, MySQL, or ClickHouse connection string, or pick a SQLite file. Ask for a read-only database user or a replica. Then hide columns the agent should not see, like emails.

    postgres://readonly:password@host:5432/app
  3. 3

    Add PostHog as an MCP server.

    Open Add datasource again and choose MCP. Name it posthog, paste the server URL, and add it. Then select Connect in the sidebar and log in to PostHog in your browser.

    https://mcp.posthog.com/mcp
  4. 4

    Add billing the same way.

    Valv connects to any remote MCP server over HTTP, for example Stripe's. Log in through the browser, or paste an API token if the server uses one. Stripe's docs recommend an agent key with only the permissions it needs. Then open the server's Tools tab and turn off anything that writes.

    https://mcp.stripe.com
  5. 5

    Ask, then pin down your definitions.

    Start with a question tied to a real decision. When you and the agent settle what churn means for your business, it proposes a memory fact and you approve it with one click.

    churn = paid subscriptions cancelled in the period, trials excluded

Already added PostHog or Stripe to Claude Code or Codex? The Add MCP server dialog suggests those servers, so you can pick them instead of typing the URL. It also accepts the JSON snippet from a server's docs.

What stays on your machine, and what doesn't.

Valv is a desktop app, not a hosted analytics service. That changes where your data goes, but it does not mean nothing leaves your laptop.

Stays with you.

Database passwords and MCP logins are encrypted with your OS keychain. MCP tokens are stored outside the workspace folder, so they never sync to your team. Nothing passes through Valv's servers.

Goes to your AI provider.

Your question, the schema, and the results the agent needs are processed by the agent's provider, such as Anthropic or OpenAI, under your account with them. Hide what the agent should not see.

Goes to PostHog and Stripe.

Valv calls their MCP servers directly from your computer. They see the tool calls the agent makes, like any other client. Some PostHog tools use AI themselves and may count toward your PostHog AI usage.

Turn off tools you don't want used.

The database tools are read-only. MCP servers bring their own tools, and some of them write, like creating refunds in Stripe or changing feature flags in PostHog. Switch each one off in the server's settings. The agent and your dashboards can no longer call it.

stripe · Tools

stripe_api_read Enabled
stripe_analytics Enabled
stripe_api_write Off for the AI

Keep the answer as a dashboard.

Ask for a churn dashboard and the agent writes it as an HTML file. Each time you open it, it reruns its database queries and MCP calls, without another AI turn. In a team workspace you can share the file and the server list over git. Each person logs in on their own machine.

More on AI dashboards and memory.

The honest limits.

Want the database side in more depth? Read text to SQL with Valv.

AI churn analysis, answered

How do I analyze churn with AI without writing SQL?

Connect your product database to a Valv workspace, add your product analytics and billing tools as remote MCP servers (PostHog's, for example), and ask in plain language. The coding agent on your machine queries each source, combines the results, and answers with a table or chart plus the queries it ran.

Does Valv work with Stripe's MCP server?

Yes. Valv connects to remote MCP servers over HTTP, with a browser login (OAuth) or an API token sent as a bearer header. Stripe's remote server at https://mcp.stripe.com supports both, so you add it the same way as PostHog: paste the URL, then log in or add an agent key.

Can the agent change data in Stripe or PostHog?

The database tools Valv gives the agent are read-only. Remote MCP servers are different: they expose whatever tools the provider built, and some of those can write. Open the server's settings in Valv and turn off every tool the agent should not use, such as Stripe's stripe_api_write. Disabled tools are hidden from the agent and from dashboards.

Do I still need an engineer?

Once, most likely. Someone with database credentials has to add the connection, ideally with a read-only database user, and hide sensitive columns. After that you can ask your own questions. Have someone who knows the data check the first answers and the definitions behind them.

What does the agent need?

A coding agent installed and signed in on your machine, such as Claude Code, Codex, or Cursor. Valv drives that agent with your existing subscription. There is no separate AI bill from Valv and no API key to paste into the app.

Where does my data go?

Valv runs on your computer and connects directly to your database, PostHog, and Stripe. Nothing passes through Valv's servers. Database passwords and MCP logins are encrypted with your OS keychain. The questions, schema, and results the agent needs are processed by your agent's AI provider, under your account with them.

Can I turn the analysis into a dashboard?

Yes. Ask for a dashboard and the agent writes an HTML file in your workspace. Each time you open it, it runs its saved database queries and MCP tool calls again, so the numbers stay current without another AI turn.

How accurate are the answers?

As accurate as the queries and the definitions behind them. Churn can mean cancelled subscriptions, lost revenue, or inactive accounts, and the agent has to pick one. Every database query and code step is cited in the chat, so you can open it and check. Save the definitions you agree on to Valv's memory so the next question uses them.

Ask your first churn question.

Free for personal use, every feature included. Commercial use needs a seat at beta pricing. See pricing.

All downloads Other platforms and builds