---
title: "Churnkey MCP: Bring Churnkey to your AI agent"
description: "Connect any AI agent to Churnkey with the MCP server. Read retention data, build Cancel Flows and dunning campaigns, run experiments, and publish live—scoped to your role and fully audited."
canonical: "https://churnkey.co/feature/mcp"
category: "feature"
related:
  - /sdk-overview.html.md
  - /feature/cancel-flows.html.md
  - /feature/customer-insights-ai.html.md
  - /feature/customer-timelines.html.md
  - /feature/payment-recovery/index.html.md
last_updated: "2026-07-14"
---

# Churnkey MCP Server: Bring Churnkey to your AI agent

## Overview

`@churnkey/mcp` brings Churnkey to your AI agent. Connect an AI agent to Churnkey with one OAuth sign-in, and it can read your retention data, build [Cancel Flows](/feature/cancel-flows.html.md) and dunning campaigns, run experiments, and publish changes live — all scoped to exactly what you can already do in the dashboard, and fully audited.

Instead of opening the Churnkey dashboard, picking the right view, filtering by plan or cohort, finding the flow, editing the step, and publishing, you ask your AI agent in plain language — and it answers from your live workspace or makes the change for you. The same server works everywhere MCP does: hosted clients like Claude and ChatGPT connect by URL, and local clients like Claude Code, Cursor, and Claude Desktop run it via `npx`.

The MCP server is free, open source, and MIT-licensed, published on npm as [`@churnkey/mcp`](https://www.npmjs.com/package/@churnkey/mcp).

## What Is MCP?

MCP (Model Context Protocol) is the open standard for connecting an AI agent to external data and tools. Claude, Cursor, ChatGPT, and a growing list of clients speak it natively. `@churnkey/mcp` is Churnkey's implementation — a server that exposes your Churnkey workspace through that standard, so any MCP-aware tool can read, build, and publish across your retention stack with your permission.

## How It Works

Four steps take you from off-by-default to a published change.

1. **Turn it on.** A workspace admin flips on MCP Access for your user in Churnkey → Team. It's off by default, so nothing connects until someone opts in.
2. **Sign in once.** One OAuth sign-in in your browser. You approve exactly what the agent can do on a consent screen — no API key to copy, no secret in your config.
3. **Ask in plain language.** "What's my save rate this quarter?" "Which offer is winning?" "Add a pause step to the flow." Whatever you'd ask a teammate, ask your agent instead.
4. **Read the answer — or make the change.** Take the number and move on, or tell it to act: spin up an A/B test, tighten dunning, publish a flow. It works within your permissions, and logs every change under your name.

## The Tool Catalog

The MCP server hands your agent 54 operations across six areas of Churnkey. Each one either **reads** your data (looks, never changes), **builds** a reversible draft, or **publishes** to live data.

### Cancel Flows (13 tools)

The cancel experience your subscribers see — its steps, offers, surveys, and audience routing.

- Read every flow, its live/draft state, and step-by-step config
- Build: rewrite copy, offers, and survey choices in a safe draft
- Publish the draft live, or re-prioritize segments

### Experiments (7 tools)

Two-arm A/B tests that split a flow on live traffic and crown a winner.

- Read per-arm results with statistical significance
- Build: clone a flow into a variant and set the test up
- Publish: start, pause, or commit the winner to all traffic

### Payment Recovery (18 tools)

Dunning — the emails and texts that recover failed payments, and the revenue they reclaim.

- Read recovered vs. lost revenue, decline reasons, and per-message engagement
- Build: edit email and SMS sequences, offers, and audience rules
- Publish campaigns, toggle them, or stop a running sequence

### Analytics & Context (4 tools)

Every flow interaction and its outcome — save rate, boosted revenue, and workspace context.

- Query sessions and roll them up by any dimension
- Pull save rate, boosted revenue, and feedback themes
- Orient on which workspace, mode, and permissions you have

### Settings & Domains (9 tools)

How cancels and pauses execute in Stripe, [Adaptive Offers](/feature/adaptive-offers.html.md) strategy, and hosted-page domains.

- Read billing behavior, Adaptive Offers config, and DNS state
- Publish: change billing settings and tune Adaptive Offers
- Publish: set subdomains and register custom domains

### Governance & Privacy (3 tools)

The attributed trail of every change an agent or human made, plus GDPR access and erasure.

- Read the audit log of every agent and human action
- Fulfill a GDPR data-access request by email
- Erase a customer's data — destructive, confirm-gated

## Who It's For

Churn isn't one team's problem, and neither is the work. The MCP server meets each team where they already work.

- **RevOps** — Break down save rate by plan, segment, or month with no SQL and no export. Compare Payment Recovery performance by decline reason, card brand, or currency. Rank the fastest-rising cancel reasons from Cancel Flow surveys. Compare two published flow versions side by side.
- **Founders** — Pull the headline numbers you open the dashboard to check: boosted revenue, save rate, and your top offer. See what Payment Recovery clawed back and how it trends. Summarize retention for the board deck, or gut-check this week against your trailing average.
- **Retention teams** — Add a pause-instead-of-cancel step before the discount: the agent edits the flow in a reversible draft, and you publish when it looks right. A/B test a new offer against the current one, tighten the dunning cadence and refresh the copy, or configure Adaptive Offers so the optimizer tunes discounts for you.
- **Engineering** — Pull an account's last 30 days of activity as [Customer Timelines](/feature/customer-timelines.html.md), right in Claude Code or Codex CLI. Audit what the agent changed this week with before/after values. Export permission-scoped structured data as JSON, or fulfill a GDPR data-access request — confirm-gated and logged.

## Two Ways to Connect

First, get access: a workspace admin turns on MCP Access for your user in Churnkey → Team. It's off by default for everyone. Then pick a path — either way you sign in with OAuth, not an API key.

### Connect by URL

For hosted clients like Claude and ChatGPT. Add one connector URL — it signs you in with OAuth in your browser. No install, no key.

```text
https://mcp.churnkey.co/mcp
```

In your client: Settings → Connectors → Add custom connector, paste the URL, and approve access.

### Run It Locally

For Claude Code, Cursor, and Claude Desktop. Sign in once, then register the server — it spawns on demand with your stored session.

```bash
# sign in (opens the consent screen)
npx @churnkey/mcp auth login

# then register with your client
claude mcp add churnkey -- npx -y @churnkey/mcp
```

Prefer config files? Drop the same block into `.mcp.json` or your client's config. See the [docs](https://docs.churnkey.co/data-integrations/mcp) for client-specific setup.

## Governance and Trust

An agent that can publish live changes needs real guardrails. Every one is built in.

- **Per-user OAuth 2.1.** Sign in as you over OAuth 2.1 with PKCE — no API keys in your config, no shared secret to leak.
- **Role-scoped.** An agent can never do more than you can in the dashboard. Scopes are capped to your workspace role.
- **You approve every scope.** A consent screen shows exactly what it asks for. PII and live-change scopes are flagged — uncheck anything before you approve, or request a narrow set up front with `--scopes`.
- **Fully audited.** Every call is attributed to you and tagged `mcp-oauth` in the audit log, with before/after values.
- **Admin-gated.** MCP access is off by default. An admin enables it per user in Team — and can revoke any session instantly.
- **Drafts, confirms, and limits.** Reads are always safe. Edits land in drafts, going live takes an explicit confirm, and writes are rate-limited.

## Data and Privacy

Requests go straight to Churnkey — locally via `npx` from your machine, or through the hosted endpoint. The conversation context, including any data the agent receives, stays with whichever AI tool you're using, under their privacy policy.

## Open Source

The MCP server is open source and MIT-licensed, published on npm as [`@churnkey/mcp`](https://www.npmjs.com/package/@churnkey/mcp). Audit it, fork it, or contribute back. It pairs with Churnkey's open-source cancellation SDK — see the [SDK overview](/sdk-overview.html.md) for the developer reference.

## FAQ

### What is MCP?

MCP (Model Context Protocol) is the open standard for connecting your AI agent to external data and tools. Claude, Cursor, ChatGPT, and a growing list of clients speak it natively. `@churnkey/mcp` is our implementation — a server that exposes your Churnkey workspace through that standard.

### Which AI tools does it work with?

Anything that speaks MCP. Hosted clients like Claude and ChatGPT connect by URL. Local clients like Claude Code, Cursor, and Claude Desktop run it via `npx`. The same server works across all of them.

### Is it read-only?

No — and that's the point. It reads your data and can build and publish changes: Cancel Flows, dunning campaigns, A/B tests, settings, and more. But only within your role, only what you approved on the consent screen, and every action is audited. Reads are always safe, edits land in reversible drafts, and going live takes an explicit confirm.

### How does authentication work?

Per user, over OAuth 2.1. You sign in once in your browser — no API key in your config. Each action runs as your Churnkey user, inherits your workspace role, and is recorded under your name. A workspace admin has to enable MCP Access for you first (Churnkey → Team). It's off by default.

### Can I limit what the agent can do?

Yes, several ways. Your workspace role sets a hard ceiling. The consent screen lets you uncheck any scope before approving (or request a narrow set up front with `--scopes`). And you — or an admin — can revoke a session instantly from Churnkey settings.

### Where does my data go?

Requests go straight to Churnkey — locally via `npx` from your machine, or through the hosted endpoint. The conversation context, including any data the agent receives, stays with whichever AI tool you're using, under their privacy policy.

### Is it open source?

Yes. The MCP server is open source and MIT-licensed, published on npm as `@churnkey/mcp`. Audit it, fork it, or contribute back.

## Related

- [Cancel Flows](/feature/cancel-flows.html.md) — Personalized cancellation flows that reduce voluntary churn up to 54%.
- [Customer Insights AI](/feature/customer-insights-ai.html.md) — Automated theme extraction and sentiment analysis from cancellation feedback.
- [Customer Timelines](/feature/customer-timelines.html.md) — See how individual customers respond to invoices, cancel flows, and recovery efforts.
- [Payment Recovery](/feature/payment-recovery/index.html.md) — Recover failed payments automatically with precision retries and dunning campaigns.
- [SDK Overview](/sdk-overview.html.md) — Churnkey's open-source cancellation SDK for developers.
