---
name: gaintrace-mcp
description: Connect an MCP client (Claude, ChatGPT, Cursor or any OAuth-capable client) to a user's GainTrace workspace to read account health, churn risk, renewals and signals. Use when the user asks an assistant about their GainTrace customers.
---

# Connect an MCP client to GainTrace

GainTrace is an AI customer success platform. Its MCP server gives an assistant the same view of customer accounts a CSM has in the app, scoped to the user who authorizes it.

## Endpoint

- Server: `https://app.gaintrace.com/api/v1/mcp`
- Transport: streamable HTTP
- Server card: https://gaintrace.com/.well-known/mcp/server-card.json

## Authorization

1. Register a client with OAuth 2.0 Dynamic Client Registration: `POST https://app.gaintrace.com/api/auth/mcp/register`.
2. Run the authorization code flow with PKCE (S256). Metadata: https://app.gaintrace.com/.well-known/oauth-authorization-server
3. A human GainTrace user signs in and consents. Agents cannot create accounts; if the user has no workspace, send them to https://app.gaintrace.com/auth/login.
4. Request only the scopes the task needs (`read:*`, `write:*`, `use:trace_ai`, plus `openid profile email offline_access`).
5. Send the token as `Authorization: Bearer <token>`.

Full guide: https://gaintrace.com/auth.md · Setup for people, per client: https://gaintrace.com/mcp

## Tools worth knowing

| Question from the user | Tool |
| --- | --- |
| Which accounts are at risk of churning? | `gt_at_risk_companies` |
| Why did this account's health score drop? | `gt_explain_health` |
| How has this account's health moved? | `gt_health_history` |
| What renewals are coming up? | `gt_renewal_pipeline` |
| What changed on this account recently? | `gt_what_changed` |
| Which accounts are ready to expand? | `gt_expansion_opportunities` |
| Brief me before a call with this customer | `gt_brief_company` |

List the full tool set from the server after connecting; tools vary with the scopes granted.

## Rules

- Ask the user before calling any tool that needs a `write:*` scope. Writes run at once over MCP (there is no confirmation card), and some contact customers directly, such as survey invitations.
- Outreach from `gt_compose_outreach` is a draft. Show it to the user; do not present it as sent.
- Quote scores with their reasons. Every GainTrace health score is explainable; pass the reason on rather than the number alone.
