MCP server — read-only v1

Connect your AI agent via MCP

MCP (Model Context Protocol) is an open standard that lets AI clients discover and call tools on your behalf. Add ChurnWin's MCP server to Claude, Cursor, or any compatible client and your agent can query churn data, at-risk customers, and cancellation feedback without any custom code.

Set up ChurnWin MCP in four steps

  1. Step 1

    Create an agent key

    Sign up, connect Stripe, then mint a read-only key in Settings → Agent Access.

  2. Step 2

    Add the MCP endpoint

    Use https://api.churnwin.com/mcp/ and send the key in the Authorization bearer header.

  3. Step 3

    Save the client config

    Paste the JSON config into your MCP-compatible client and replace the example key.

  4. Step 4

    Connect and query

    Reload the client, confirm the ChurnWin tools appear, and ask a churn question.

Connection details

Endpoint

https://api.churnwin.com/mcp/

Auth header

Authorization: Bearer cwk_live_…

Keys are minted at Settings → Agent Access. You need an active ChurnWin plan to create one.

Copy-paste config

Drop this into your MCP client config (e.g. claude_desktop_config.json for Claude Desktop, or the MCP settings panel in Cursor / Windsurf).

{
  "mcpServers": {
    "churnwin": {
      "url": "https://api.churnwin.com/mcp/",
      "headers": {
        "Authorization": "Bearer cwk_live_YOUR_KEY_HERE"
      }
    }
  }
}

Replace cwk_live_YOUR_KEY_HERE with the key you generated in Settings.

Connection check

Verify a failed-payment recovery connection

Do more than confirm that the server appears in your client. Run one bounded recovery brief to verify that the key can see the intended Stripe business, the metrics use the expected 30-day window, and any recommended action stays under human review.

1. Confirm the business scope

Start with list_businesses. If the key can see more than one connected Stripe account, choose the intended business id and pass that same businessvalue to the recovery tools. A connection-scoped key remains limited to its assigned business.

2. Run the evidence brief

Paste this after the ChurnWin tools load. It asks the client to distinguish observed recovery data from a recommendation instead of inventing an outcome.

Copyable connection check

Use list_businesses to confirm the Stripe business scope.
Then review the last 30 days of failed-payment churn with
get_metrics, list_recent_churn, and get_action_plan.

Report payment_failures, recovered_count, recovered_mrr,
and at_risk_mrr. State the period and business used. Separate
observed values from recommendations.
Do not contact customers or change billing.

3. Check the evidence before acting

Scope

The response names the 30-day period and the business id, or says that the result spans every business visible to the key.

Recovery snapshot

Payment failures, attributed recoveries, recovered MRR, and MRR still at risk are reported as observed values. A real zero remains zero; it is not replaced with a marketing estimate.

Human gate

The agent may rank a next step, but billing changes and customer contact remain a person's decision outside the read-only MCP server.

Preview the recovery audit without a key

Available tools

Your AI client will see these 10 tools automatically once the server is connected. All tools accept an optional business parameter to scope results to a specific connected Stripe account.

get_metrics

Current churn rate, MRR, retention, and subscription counts for a given period

get_churn_trend

Day-by-day churn volume over a rolling window

get_churn_reasons

Aggregated cancellation reason breakdown with percentages

list_at_risk_customers

Subscribers ranked by AI risk score with key risk signals

list_recent_churn

Most recently churned customers and MRR lost

get_cancellation_feedback

Verbatim survey responses from churned users

get_action_plan

ChurnWin's AI-generated prioritised retention recommendations

get_feedback_performance

Survey send, open, and response rates over time

list_customers

Full customer roster with status, plan, and MRR — paginated and searchable

list_businesses

All Stripe accounts connected to your ChurnWin workspace

Try it with Claude

Once connected, you can ask Claude natural-language questions about your churn:

You: What are my top churn reasons this quarter and what should I fix first?

→ Claude calls get_churn_reasons, get_action_plan, and get_cancellation_feedback automatically, then synthesises an answer.

Get your API key

You need a ChurnWin account with Stripe connected. Once you're in, head to Settings → Agent Access to mint a key.

Developer overview

What the API gives you, who it's for

REST API reference

All endpoints, params, and JSON examples