Skip to content

Connect Gainsight CS to Claude: Manage Cockpit CTAs & Customer Goals

Learn how to connect Gainsight CS to Claude using a managed MCP server. Automate Cockpit CTAs, update customer goals, and manage timelines with AI agents.

Riya Sethi Riya Sethi · · 9 min read
Connect Gainsight CS to Claude: Manage Cockpit CTAs & Customer Goals

If you need to connect Gainsight CS to Claude to automate customer health tracking, manage Cockpit CTAs, or oversee Success Plans, you need a Model Context Protocol (MCP) server. This server acts as the translation layer between Claude's tool calls and Gainsight's REST APIs. You can either build and maintain this infrastructure yourself, or use a managed integration platform like Truto to dynamically generate a secure, authenticated MCP server URL. If your team uses ChatGPT, check out our guide on connecting Gainsight CS to ChatGPT or explore our broader architectural overview on connecting Gainsight CS to AI Agents.

Giving a Large Language Model (LLM) read and write access to a sprawling customer success platform like Gainsight CS is a massive engineering undertaking. You have to handle complex token lifecycles, map strictly validated JSON schemas to MCP tool definitions, and deal with Gainsight's rigid API quotas and asynchronous job models. Every time Gainsight updates an endpoint or changes a custom object definition, you have to update your server code, redeploy, and test the integration.

This guide breaks down exactly how to use Truto to generate a secure, managed MCP server for Gainsight CS, connect it natively to Claude Desktop, and execute complex customer success workflows using natural language.

The Engineering Reality of the Gainsight CS API

A custom MCP server is a self-hosted integration layer. While the open MCP standard provides a predictable way for models to discover tools, the reality of implementing it against specialized B2B APIs is painful. Gainsight CS is built to manage massive enterprise customer hierarchies, intricate timeline events, and cross-functional success plans. Its API reflects that complexity.

If you decide to build a custom Gainsight CS MCP server, here are the specific integration challenges you will face:

Context-Dependent Object Hierarchies Gainsight's Timeline activities do not accept flat payloads. When creating an activity, the API demands specific ContextName values, and the required identifier fields dynamically shift depending on whether you are logging the activity against a Company, a Relationship, or a specific CTA. An LLM has no inherent knowledge of these shifting schema dependencies. You must build validation logic into your MCP tools that strictly guides the model to provide the right identifier for the right context, otherwise the API will return opaque validation errors.

Strict Bulk Operations and Job Polling Not all endpoints in Gainsight behave like synchronous CRUD operations. When updating users in bulk or triggering massive custom object exports, the API relies heavily on asynchronous jobs. For example, generating a bulk export returns a statusURL that you must repeatedly poll. An LLM executing a single tool call cannot naturally handle long-running polling loops. Your MCP server must abstract this into a synchronous response or provide a secondary tool for the LLM to check job statuses (get_single_gainsight_cs_bulk_export_status_by_id).

Soft Deletes and Ephemeral Data Gainsight handles record deletion (CTAs, tasks, timeline activities) through a strict 15-day soft-delete window. Deleted items are moved to a record_delete_log object. If your AI agent is tasked with auditing deleted records for a compliance review, it will fail silently if it attempts to query data deleted 16 days ago. Your tool descriptions must explicitly define these temporal limits so the model understands the API's constraints.

Rate Limit Passthrough Constraints Gainsight enforces strict rate limits (e.g., 200 calls per minute for Timeline activity creation). It is critical to understand that Truto does not retry, throttle, or apply backoff on rate limit errors. When Gainsight returns an HTTP 429 Too Many Requests, Truto passes that error directly to the caller. Truto normalizes the upstream rate limit information into standardized headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset) per the IETF specification. The caller (the AI agent or orchestrator) is strictly responsible for interpreting these headers and executing its own backoff strategy.

Generating the Gainsight CS MCP Server

Truto eliminates the need to manually code tool definitions. Tools are derived dynamically from Gainsight's existing resource definitions and documentation schemas.

You can generate the MCP server in two ways: via the Truto UI or programmatically via the API.

Option 1: Via the Truto UI

For teams moving fast, the dashboard is the quickest path to a running server.

  1. Navigate to the Integrated Accounts page in your Truto dashboard.
  2. Select your connected Gainsight CS account.
  3. Click the MCP Servers tab.
  4. Click Create MCP Server.
  5. Select your configuration (e.g., restrict to read methods or tag-filter by cockpit).
  6. Copy the generated MCP server URL (e.g., https://api.truto.one/mcp/abc123xyz...).

Option 2: Via the Truto API

For platform engineers dynamically provisioning AI environments for users, create the server programmatically.

Make a POST request to /integrated-account/:id/mcp with your desired configuration:

curl -X POST https://api.truto.one/integrated-account/{integrated_account_id}/mcp \
  -H "Authorization: Bearer YOUR_TRUTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Gainsight CS Cockpit Agent",
    "config": {
      "methods": ["read", "write"],
      "tags": ["cta", "timeline"]
    },
    "expires_at": "2026-12-31T23:59:59Z"
  }'

The API returns a payload containing the url. This single URL handles discovery, authentication, and execution.

Connecting Gainsight CS to Claude

Once you have your Truto MCP URL, providing Claude with full API access takes seconds. You can connect it via the UI for cloud environments or via a config file for local desktop agents.

Option 1: Via the Claude or ChatGPT UI

If you are using ChatGPT or Claude's web interfaces (available on Pro/Enterprise plans with developer features enabled):

  1. Go to Settings -> Connectors -> Add (in ChatGPT) or Settings -> Integrations -> Add MCP Server (in Claude).
  2. Name your connection (e.g., "Gainsight CS Integration").
  3. Paste the Truto MCP server URL.
  4. Click Add.

The model will immediately handshake with the URL and pull down all available Gainsight tools.

Option 2: Via Claude Desktop Config File

If you are running Claude Desktop or a local orchestrator like Cursor, you connect via Server-Sent Events (SSE). Open your claude_desktop_config.json file (typically found at ~/Library/Application Support/Claude/claude_desktop_config.json on macOS) and add the following:

{
  "mcpServers": {
    "gainsight_cs": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-sse",
        "--url",
        "https://api.truto.one/mcp/YOUR_TRUTO_MCP_TOKEN"
      ]
    }
  }
}

Restart Claude Desktop. The agent now has direct, schema-aware access to your Gainsight instance.

Hero Tools for Gainsight CS

Truto automatically generates dozens of tools covering the Gainsight CS API. Here are the highest-leverage tools for automating customer success workflows.

list_all_gainsight_cs_cta

Fetches Call to Action (CTA) records from Cockpit. It supports selecting specific fields and applying filters, making it ideal for triaging customer health alerts.

"Find all high-priority CTAs that are currently open for the 'Enterprise' customer segment, and list the DueDate and OwnerId for each."

create_a_gainsight_cs_cta

Generates a new CTA in Gainsight Cockpit. The agent must provide the GsCompanyId, TypeName, and a CtaName. This is heavily used for automated risk escalation.

"Create a new Risk CTA for the company with GSID '12345'. Name it 'Usage Drop Risk - Urgent', set the priority to high, and assign it to the default CSM."

gainsight_cs_customer_goal_bulk_update

Updates existing customer goals in Gainsight NXT. This tool allows the LLM to modify goal statuses and associate them with CTAs or Success Plans based on recent account activity.

"Update the customer goal named 'Q3 Adoption Target' for GSID '98765'. Change its status to 'At Risk' and link it to the newly created usage drop CTA."

list_all_gainsight_cs_company

Queries core Company records from Gainsight. Agents use this to fetch ARR, Renewal Date, LifeCycle stage, and standard firmographics before making operational decisions.

"Retrieve the ARR, RenewalDate, and current Stage for the company named 'Acme Corp'."

list_all_gainsight_cs_activity

Reads inserted Timeline activity records. The LLM can filter activities by ContextName, TypeName, or ActivityDate to analyze recent customer interactions.

"Pull all Timeline activities logged against Acme Corp in the last 30 days. Summarize the main discussion points from the Executive Business Reviews."

create_a_gainsight_cs_activity

Creates a new Timeline activity. This is essential for agents that summarize support tickets, emails, or call transcripts and log them back into Gainsight as a structured note.

"Log a new Timeline activity for Acme Corp. Set the TypeName to 'Update', add the summary of our recent churn discussion to the Notes field, and mark the ActivityDate as today."

To view the complete schema definitions and the full list of available proxy tools, view the Gainsight CS integration page.

Workflows in Action

Here is how an AI agent actually uses these tools in sequence to automate complex customer success operations.

Workflow 1: Churn Risk Escalation & Goal Adjustment

When a CSM identifies a massive drop in product usage, they can ask the agent to escalate the account, update their success goals, and log the action.

"Acme Corp's usage just dropped by 40%. Create a high-priority risk CTA for them, then update their current 'Q4 Expansion' customer goal to 'At Risk'. Finally, log a Timeline activity noting that this risk was escalated automatically due to telemetry drops."

flowchart TD
    A["Agent parses<br>escalation request"] --> B["create_a_gainsight_cs_cta<br>(Generate Risk CTA)"]
    B --> C["gainsight_cs_customer_goal_bulk_update<br>(Change goal status to 'At Risk')"]
    C --> D["create_a_gainsight_cs_activity<br>(Log telemetry drop on Timeline)"]
    D --> E["Return confirmation<br>to CSM"]

Step-by-step execution:

  1. The agent calls create_a_gainsight_cs_cta, passing the Company GSID and setting the type to a Risk CTA.
  2. The agent takes the GSID and calls gainsight_cs_customer_goal_bulk_update, adjusting the expansion goal status to reflect the new risk.
  3. The agent calls create_a_gainsight_cs_activity, writing a detailed note to the company's timeline linking the telemetry data to the newly created CTA.

Result: The CSM gets a confirmation that the Cockpit is updated, the Success Plan goals reflect reality, and the timeline is documented—all from a single prompt.

Workflow 2: Account Handoff Briefing

When a new CSM inherits a book of business, they need an immediate synthesis of account health, upcoming renewals, and recent touchpoints.

"I am taking over the 'Globex' account. Pull their core company details, list their open CTAs, and fetch all Timeline activities from the past 60 days. Give me a bulleted executive summary of their health and immediate action items."

sequenceDiagram
    participant User as CSM
    participant Claude as Claude
    participant Gainsight as Gainsight API

    User->>Claude: "Summarize Globex account status"
    Claude->>Gainsight: list_all_gainsight_cs_company (Name: Globex)
    Gainsight-->>Claude: Returns ARR, RenewalDate, Stage
    Claude->>Gainsight: list_all_gainsight_cs_cta (Filter by Company GSID)
    Gainsight-->>Claude: Returns open CTAs
    Claude->>Gainsight: list_all_gainsight_cs_activity (Filter by last 60 days)
    Gainsight-->>Claude: Returns recent notes/meetings
    Claude-->>User: Delivers synthesized executive brief

Step-by-step execution:

  1. The agent calls list_all_gainsight_cs_company to find Globex's GSID, ARR, and Renewal Date.
  2. Using the GSID, it calls list_all_gainsight_cs_cta to map out immediate fires or tasks in the Cockpit.
  3. It calls list_all_gainsight_cs_activity to retrieve the historical context of the last 60 days of interactions.
  4. Claude synthesizes the three API responses into a clean, actionable markdown briefing.

Security and Access Control

Giving an LLM access to your enterprise customer data requires strict guardrails. Truto MCP servers provide configurable access controls at the server creation level:

  • Method Filtering: Restrict servers to specific operations. Pass config: { methods: ["read"] } to ensure the agent can only fetch data (like company records or timeline activities) but cannot create CTAs or update goals.
  • Tag Filtering: Limit the surface area of the API. Pass config: { tags: ["cockpit"] } to only expose CTA and Task endpoints, hiding sensitive financial or user management tools.
  • Secondary Authentication (require_api_token_auth): For maximum security, require the client to pass a valid Truto API token in the Authorization header alongside the MCP token URL. This ensures only authenticated users can trigger the tools.
  • Time-to-Live (expires_at): Generate ephemeral servers for temporary contract workers or short-lived CI/CD tasks. Once the timestamp hits, the server and its keys are automatically purged from the edge.

Strategic Wrap-Up

Building an intelligent agent that interacts with Gainsight CS requires more than just formatting JSON. You must manage complex OAuth lifecycles, parse opaque error codes, and constantly monitor the API for schema changes.

Truto abstracts this entire layer. By transforming Gainsight's existing documentation and resources into dynamic, self-healing MCP tools, you skip the maintenance burden entirely. Your engineers can focus on prompt engineering and workflow design, while Truto ensures the underlying API communication is secure, accurate, and scalable.

FAQ

Does Truto automatically retry Gainsight CS rate limit errors?
No. Truto does not retry or apply backoff. When the Gainsight API returns a 429 Too Many Requests, Truto passes the error and the standardized rate limit headers to the caller, who must implement their own backoff logic.
Can I restrict Claude to read-only access for Gainsight CS?
Yes. When generating the MCP server via the Truto UI or API, you can apply method filtering (e.g., config: { methods: ["read"] }) to ensure the LLM can only query data, not modify it.
How are MCP tools generated for Gainsight CS?
Truto dynamically generates MCP tools based on the integration's resource configurations and documentation schemas. No manual code mapping is required; tools are auto-derived from the API definitions.
How do I connect the Truto MCP server to Claude Desktop?
You can connect by adding the Truto MCP URL to your claude_desktop_config.json file using the @modelcontextprotocol/server-sse command, enabling native tool discovery.

More from our Blog