Skip to main content
GainTrace runs a hosted Model Context Protocol server. Connect an MCP client - Claude, ChatGPT, Cursor, Claude Code, or your own - and it can read your Companies, People, health, signals, revenue, and more, and take audited actions, all scoped to one workspace. The same setup steps live in the app under Settings > MCP, with a tile for each client.

Endpoint

Transport is streamable HTTP: POST for JSON-RPC, GET for the SSE stream. The server is stateless - each request is bound to your auth context.

Connect a client

Connections use OAuth: each user signs in with their own GainTrace account and approves access in the browser. GainTrace advertises its OAuth flow at /.well-known/oauth-protected-resource, so compliant clients discover it automatically. No API key is needed for these flows.
1

Add the custom connector

In Claude (web or desktop), open Customize > Connectors, click the + button, and choose Add custom connector. Name it GainTrace and paste the endpoint URL as the remote MCP server URL, then click Add. On Team or Enterprise plans, an Owner adds it from Organization settings > Connectors first; members then find it under Customize > Connectors and click Connect.
2

Sign in once

Claude opens a GainTrace sign-in window the first time you use a tool. Sign in, approve the requested access, and the connection stays live for future chats.
3

Use it

Toggle GainTrace on per chat from the + button in the message bar. Try: “List my at-risk companies in GainTrace.”

API key instead of OAuth

Clients that support custom headers can authenticate with a gt_live_ secret key (Settings > API Keys) instead of OAuth:
The key’s scopes decide which tools are available and whether writes are allowed. Use a gt_live_ (secret) key, never a gt_pub_ key.

Which workspace a connection sees

When you approve an OAuth connection, the consent screen lists the requested access and asks which workspace to authorize - if you belong to several, pick deliberately, because the connection is bound to that one workspace from then on. Your membership is re-checked on every request: if you leave the workspace, the connection stops working immediately, even if the token has not expired. To disconnect, remove the connector in the client (Claude, ChatGPT, Cursor, and Claude Code each have a remove or disconnect option for MCP servers). For API-key connections, revoke the key in Settings > API Keys.

Tools

The server exposes about 100 tools, grouped in three tiers. Clients discover them automatically, so you rarely name them yourself. The server only lists the tools your connection has a scope for, so a client never sees a tool it can’t run.

Tier C - workflows

One-shot answers to CS-shaped questions. Prefer these first.

Tier B - namespaced

Precise reads and writes per resource (gt_<namespace>_*).

Tier A - data platform

Address any data model directly when a workflow tool can’t.
In the tables below, Read tools change nothing. Write tools change data and are audited. IDs are UUIDs.

Tier C - workflow tools

Each call answers a customer-success question in one step. All are read-only except gt_implementation_plan_propose, which proposes a change for approval.

Tier A - data platform

For novel queries the workflow tools can’t satisfy. All are read-only.

Tier B - read tools

These tools need the admin:governance scope. OAuth connections can never be granted it, so they don’t appear in Claude, ChatGPT or Cursor. An API key that carries the scope can list them.

Tier B - write tools

Every write tool needs a write: scope and accepts an idempotency_key, except the proposal tools in the next section and gt_survey_import_run.

Writes that wait for a person

Some tools don’t act on their own. They queue a change for approval.
  • gt_survey_request_invitations and gt_survey_request_segment_invitations queue survey invitations for approval in Triage. Whatever your workspace’s invitation review is set to, requests from an MCP client always wait: nothing is sent until a teammate approves it in Triage. gt_workflow_ai_decide can reject a queued survey invitation but can’t approve it. The survey must be active, and every person needs an email address. Both default to a dry run that reports who would be invited and who is skipped (survey cooldown, frequency rule, already waiting for approval). Pass dry_run: false to queue the invitations. The segment tool matches up to 1,000 people, and its dry run reports how many match, a sample, and skip reasons for the first 100. A live call returns mode, queued, sending, skipped and a batchId that groups the invitations into one Triage thread. Invitations that nobody approves expire after 14 days.
  • gt_workflow_ai_pending_approvals and gt_workflow_ai_decide let a client list and settle Trace AI actions that are already waiting for approval. A connection with write:workflow_ai can approve other Trace AI actions that wait for approval, and can reject a queued survey invitation, but it can’t approve one. Grant that scope only to clients you want to be able to settle those actions.
  • Admins can turn agent writes off. With Let Trace AI and MCP agents change surveys off in Settings > Surveys > Sending and identity, every write:surveys tool returns forbidden. Reads keep working.
  • gt_source_model_propose and gt_implementation_plan_propose only propose a data-model change. They need write:data and a role with permission to edit models, and nothing is applied until a person confirms the proposal. The response has status: "awaiting_approval", a review_url and an expires_at, and the member who authorized the connection gets a notification. Only that member can apply or decline the proposal, from Setup in GainTrace, within 14 days. Proposals made in Trace AI chat expire after 15 minutes.
gt_survey_create_draft creates a draft only. It never activates a survey or contacts anyone.

Survey tools

The survey tools work on the surveys, responses and rules of the workspace your connection is bound to.
  • Shared with Trace AI. gt_survey_summary, gt_survey_responses, gt_survey_company_rollup, gt_survey_coverage, gt_survey_rules, gt_survey_question_results, gt_survey_themes, gt_survey_count and gt_survey_report use the same definitions as the questions you ask Trace AI in chat, so both give the same numbers. Besides the read:surveys scope, these nine check your Surveys read permission in GainTrace, and a custom role without it gets a permission_denied error. A survey or Company that isn’t in your workspace returns a not_found error such as Couldn't find survey <id>. Check the id and your access to it.
  • Responses. Each gt_survey_responses row names its survey, Company and person, carries the respondent’s name and email when the survey recorded them, and has an app_path that opens the response in GainTrace. To list the responses about one deal, ticket, plan or custom record, pass subject_type (deal, ticket, plan or record) with subject_id; subject_id alone returns a validation error. Rows have a subject with its type, id and label. When a survey asked an AI follow-up question, answers._probe holds the question and the answer.
  • Drafts can’t turn on AI. gt_survey_create_draft takes no survey settings, so a draft made over MCP never has the AI follow-up question on, and has no translations.
  • Imports. gt_survey_import_run returns run_id, status, fetched, imported, updated, unchanged, skipped, skip_reasons and error. skipped is the total as a number, and skip_reasons lists up to 20 reasons with a count each. It never echoes a respondent’s email.
  • Rules. gt_survey_rules_update changes frequency (recontactDays, dismissedRecontactDays, and an optional companyLimit of people and days, or null to turn it off), follow_up (slaHours, autoAssign of none, negative or all) and company_scores (method, windowDays, roleWeights). Whether invitations send at once or wait for approval is an admin setting in the app, and MCP can read it but not change it.

Deprecated aliases

Earlier tool names built on account and contact vocabulary still work as aliases of the gt_company_* and gt_people_* tools. They share the same behavior and scopes, so existing connectors keep working.

Scopes

OAuth connections can be granted these scopes on the consent screen. An API key carries its own scope list.
  • Read: read:companies, read:contacts, read:deals, read:activities, read:signals, read:cortex, read:health, read:revenue, read:flows, read:views, read:surveys, read:plans, read:data, read:identity, read:sync, read:comm, read:portal, read:workflow_ai, read:governance, read:webhooks
  • Write: write:companies, write:contacts, write:signals, write:cortex, write:health, write:revenue, write:flows, write:views, write:surveys, write:plans, write:data, write:identity, write:sync, write:comm, write:portal, write:workflow_ai, write:webhooks
  • Trace AI: use:trace_ai, which the workflow tools marked above need.
admin:governance and admin:billing are never granted over OAuth. Governance and billing changes stay in the app. Tokens authorized under the older read:accounts and write:accounts names still satisfy read:companies and write:companies.

Permissions and limits

  • Scopes - each tool requires one scope. Your OAuth grant or API key decides which tools are listed and callable. Tools your connection has no scope for are not listed, and calling one by name returns a Tool <name> not found error. Re-authorize with the scope to use it.
  • Audited - every tool call that runs is recorded in the workspace audit log with the acting identity and its outcome (success, error or denied), on a best-effort basis. Replays of an idempotent write and calls rejected for invalid arguments are not recorded.
  • Idempotent writes - write tools that accept an idempotency_key return the cached response when you repeat a call with the same key. Keys are held for up to 24 hours on a best-effort basis. A deploy can clear the cache early, so keep writes safe to retry.
  • Rate limits - per connection and per tool, each tool allows 60 read calls or 20 write calls per minute. gt_ask allows 10 per minute. A rate-limit error tells you how long to back off.
  • Workspace isolation - the server only ever sees the one workspace your connection was authorized for.
  • IP allowlist - if your workspace has an IP allowlist configured, MCP requests must come from an allowed address.
  • Role permissions - the implementation tools also check your role in GainTrace, not only the token scope.
The server exposes tools only. It has no prompts or resources yet. Point your client at the endpoint and it lists the tools it’s allowed to use.
Last modified on October 20, 2026