Retain So

io.github.retain-so由 GitHub 帳號 retain-so 發布v0.1.2更新於 Oct 24, 2026

Model Context Protocol server for Retain: let AI agents query churn risk and act on retention.

已驗證STDIO僅桌面資料與分析商業與電商

概覽

AI 產生的概覽

Retain MCP 伺服器讓 AI 助理查詢 Retain 中的流失風險、客戶健康度、風險 MRR 和提醒,並可標記或封存提醒。

可以做什麼
依風險等級查詢有流失風險的客戶並依 MRR 排序,依 id 或名稱取得單一客戶的完整檔案。讀取風險 MRR 及各風險等級的活躍提醒數量,依優先順序列出活躍提醒及其風險因素和聯繫狀態。彙總流失指標:流失率、流失 MRR、擴展/收縮和淨收入留存率。對提醒執行操作:標記為已聯繫或封存已解決的提醒(需要讀寫金鑰)。
適用情境
適合已在使用 Retain 的客戶成功、支援或營收團隊,希望用自然語言讓助理查出誰即將流失、有多少 MRR 面臨風險,並在不開啟儀表板的情況下記錄聯繫情況。
執行需求
透過 npx 從 npm 套件 @retain-so/mcp-server 在本機執行,需要 Node.js。需要 Retain 代理金鑰,透過環境變數 RETAIN_API_KEY 傳入,在 Settings → Agent keys 中建立;僅查詢選 read,需要執行操作選 read & write。需要連線至 Retain API 的網路;可用 RETAIN_API_URL 覆寫 API 基礎位址。
安裝前請注意
RETAIN_API_KEY 是僅顯示一次的金鑰,可存取你的 Retain 客戶資料;讀寫金鑰還允許助理變更提醒狀態。寫入工具會將提醒標記為已聯繫並封存提醒,因而修改 Retain 中的資料。工具呼叫會被轉換為對 Retain API 的 HTTP 請求,因此客戶資料會傳送至該服務。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Retain So,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

Retain MCP Server

Let your AI agent see who is about to churn, and do something about it.

@retain-so/mcp-server connects Retain to any MCP client (Claude Code, Claude Desktop, Cursor, Windsurf, and friends). Ask in natural language which customers are at risk, pull a customer's full health profile, check MRR at risk, and log outreach, all without opening the dashboard.

Retain is an AI-first churn prevention and customer analytics platform. This server is the bridge between your agent and your Retain data.

What you can ask your agent to do

Read:

  • "Which customers are at critical risk this week?"
  • "Show me my high-risk customers ordered by MRR."
  • "What's my total MRR at risk, broken down by risk level?"
  • "Pull the full profile for Acme Inc."
  • "List the active alerts I haven't contacted yet."
  • "Summarize this month's churn metrics and net revenue retention."

Act (needs a read+write key):

  • "Mark the alert for Globex as contacted."
  • "Archive the resolved alert for Initech."

Setup (under 5 minutes)

  1. In Retain, go to Settings → Agent keys and create a key. Pick read for query-only, or read & write to let the agent take actions. Copy it (it is shown once).
  2. Add the snippet for your client below.
  3. Restart the client and ask your first question.

Claude Code

bash
claude mcp add retain --env RETAIN_API_KEY=rk_agent_xxx -- npx -y @retain-so/mcp-server

Claude Desktop (claude_desktop_config.json)

json
{  "mcpServers": {    "retain": {      "command": "npx",      "args": ["-y", "@retain-so/mcp-server"],      "env": { "RETAIN_API_KEY": "rk_agent_xxx" }    }  }}

Cursor / Windsurf (.cursor/mcp.json or ~/.codeium/windsurf/mcp_config.json)

json
{  "mcpServers": {    "retain": {      "command": "npx",      "args": ["-y", "@retain-so/mcp-server"],      "env": { "RETAIN_API_KEY": "rk_agent_xxx" }    }  }}

Tools

ToolTypeWhat it does
get_at_risk_customersreadCustomers by churn risk (Critical/High/Stable/Healthy), ordered by MRR. Defaults to Critical + High.
get_customer_detailsreadFull profile for one customer by id or name.
get_mrr_at_riskreadTotal MRR at risk plus active-alert counts by risk level.
get_active_alertsreadActive alerts by priority, with risk factors and outreach state.
get_churn_metricsreadChurn rate, MRR churned, expansion/contraction, net revenue retention.
mark_alert_contactedwriteMark an alert as contacted.
archive_alertwriteArchive a resolved alert.

Coming soon: send_retention_email (trigger a templated retention email).

Example conversation

You: Who's about to churn and how much money is on the line?

Agent: (calls get_mrr_at_risk, then get_at_risk_customers) You have $4,200 MRR at risk across 7 active alerts. The two biggest are Acme Inc ($900, critical, 18 days inactive) and Globex ($650, high).

You: I emailed Acme today, mark their alert as contacted.

Agent: (calls mark_alert_contacted) Done. Acme's alert is now marked as contacted.

Configuration

VariableRequiredDefaultDescription
RETAIN_API_KEYyes(none)Agent key from Settings → Agent keys.
RETAIN_API_URLnohttps://api.retain.soOverride the API base URL (self-host / staging).

Development

bash
npm installnpm run dev        # run from source with tsxnpm run build      # bundle to dist/npm run typecheck

The server holds no business logic and no database. It only translates MCP tool calls into HTTP requests against Retain's public /agent/* API. Contributions and new tools are welcome.

License

MIT

來源:README.md,提交 627800e

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.1.2最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分