GUIDES

AI apps and MCP

Connect the NoChurn MCP server to Claude Code, Cursor, VS Code, Windsurf or ChatGPT. Test mode by default, and never live without a human.

The NoChurn MCP server lets an AI coding agent integrate NoChurn into your app: account setup, test keys, the cancel flow, customer data, webhooks, tested code, sandbox scenarios and the integration checklist. It also answers business questions, read only: why customers churn, who is at risk, what NoChurn saved.

Test mode by default. Every tool takes mode: "test" | "live" (default test). In live mode, reads work only if you allowed them for that app, and every change needs a human: the tool creates a live request and returns an approval link for an owner or admin. The agent never sees a live secret.

Two ways to connect

Remote (recommended) Local
Transport Streamable HTTP, https://mcp.nochurn.sh/mcp stdio, npm package @nochurn/mcp
Credential OAuth 2.1: the client opens a NoChurn sign-in, you pick the account A test secret key nc_test_… in NOCHURN_API_KEY (anything else is refused)
Shown in the journal as The AI app, by name The API key

Install

Claude Code

Remote (the browser opens on first use):

claude mcp add --transport http nochurn https://mcp.nochurn.sh/mcp

Local, with a test key from Developers:

claude mcp add nochurn --env NOCHURN_API_KEY=nc_test_… -- npx -y @nochurn/mcp

Then ask “Integrate NoChurn into this app”, or run the prompt /mcp__nochurn__integrate_nochurn.

Cursor

~/.cursor/mcp.json, or .cursor/mcp.json in the project (never commit a key):

{
  "mcpServers": {
    "nochurn": { "url": "https://mcp.nochurn.sh/mcp" }
  }
}

Local:

{
  "mcpServers": {
    "nochurn": { "command": "npx", "args": ["-y", "@nochurn/mcp"], "env": { "NOCHURN_API_KEY": "nc_test_…" } }
  }
}

VS Code (Copilot agent mode)

.vscode/mcp.json:

{
  "servers": {
    "nochurn": { "type": "http", "url": "https://mcp.nochurn.sh/mcp" }
  }
}

Local, with the key asked once and stored by VS Code:

{
  "inputs": [{ "id": "nochurn-key", "type": "promptString", "description": "NoChurn test secret key (nc_test_…)", "password": true }],
  "servers": {
    "nochurn": { "type": "stdio", "command": "npx", "args": ["-y", "@nochurn/mcp"], "env": { "NOCHURN_API_KEY": "${input:nochurn-key}" } }
  }
}

Windsurf

The MCP config file of Cascade (Cascade › MCP › “Open MCP config file” shows where it is on your build), remote:

{
  "mcpServers": {
    "nochurn": { "serverUrl": "https://mcp.nochurn.sh/mcp" }
  }
}

For the local server, use the same command / args / env block as Cursor, in the file of your home directory, never in the project.

ChatGPT

Remote only. Add NoChurn as a custom connector in ChatGPT’s settings, with the URL https://mcp.nochurn.sh/mcp and OAuth authentication; ChatGPT opens the NoChurn sign-in, where you pick the account and approve. Depending on the plan, custom connectors may need to be allowed first (developer mode, or an admin of the workspace). The menu names change over time: follow OpenAI’s help for the current steps.

What the agent can do

Group Tools
Discovery docs_search, docs_get, openapi_get
Account account_get_setup, account_connect_stripe_link, billing_source_set
Keys api_keys_create_test, publishable_key_get, widget_secret_create
Detection project_detect
Cancel flow cancel_flow_get, cancel_flow_update_draft, cancel_flow_set_theme, cancel_flow_preview_url, flow_publish_test
Code integration_get_snippets (tested code, the same as in these docs)
Data attributes_define, customers_update_attributes
Webhooks webhook_endpoints_create, webhook_endpoints_send_test
Sandbox sandbox_create_customer, sandbox_simulate_failed_payment, sandbox_simulate_card_removed, sandbox_run_cancel_flow
Verification integration_verify (the 7-point checklist)
Insights (read only) churn_drivers, customers_at_risk, revenue_saved
Live mode request_go_live, live_request_status

Every API error comes back as a tool error with NoChurn’s message, fix and docs_url. Customer content in tool results (names, emails, attribute values, AI text) is marked as data, never as instructions.

Rights of an AI app

  • Scopes: read, configure and sandbox. There is no live scope. Writes are limited to a closed list of endpoints that only touch test mode or a draft.
  • Your role applies: the app can do what the person who connected it can do, no more.
  • Live reads only when that person ticked “Allow reading live data” when connecting, or turned it on later in Settings › AI apps. Otherwise a live read answers 403 live_read_not_granted.
  • Live writes never run directly (403 live_approval_required). The app asks with POST /v1/live_requests; an owner or admin approves it in the dashboard, and it runs in that person’s name. Some things can never be requested: the team, AI access, two-factor settings, the NoChurn plan, existing keys and deleting the account.
  • Revoke an app in Settings › AI apps (DELETE /v1/oauth/grants/{id}): its pending live requests are cancelled.

Every action of an app is written to the account’s events with the app’s name as the actor.