Endpoint
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.
- Claude
- ChatGPT
- Cursor
- Claude Code
- Other clients
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 agt_live_ secret key (Settings > API Keys) instead of OAuth:
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.
Tier C - workflow tools
Each call answers a customer-success question in one step. All are read-only exceptgt_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
Companies, People, activities, communications
Companies, People, activities, communications
Health, signals, Trace AI predictions
Health, signals, Trace AI predictions
Revenue, surveys, plans, portals
Revenue, surveys, plans, portals
Flows, views, approvals
Flows, views, approvals
Data, identity, sync
Data, identity, sync
OpenAI deep research
OpenAI deep research
Governance (API key only)
Governance (API key only)
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 awrite: 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_invitationsandgt_survey_request_segment_invitationsqueue 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_decidecan 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). Passdry_run: falseto 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 returnsmode,queued,sending,skippedand abatchIdthat groups the invitations into one Triage thread. Invitations that nobody approves expire after 14 days.gt_workflow_ai_pending_approvalsandgt_workflow_ai_decidelet a client list and settle Trace AI actions that are already waiting for approval. A connection withwrite:workflow_aican 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:surveystool returnsforbidden. Reads keep working. gt_source_model_proposeandgt_implementation_plan_proposeonly propose a data-model change. They needwrite:dataand a role with permission to edit models, and nothing is applied until a person confirms the proposal. The response hasstatus: "awaiting_approval", areview_urland anexpires_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_countandgt_survey_reportuse the same definitions as the questions you ask Trace AI in chat, so both give the same numbers. Besides theread:surveysscope, these nine check your Surveys read permission in GainTrace, and a custom role without it gets apermission_deniederror. A survey or Company that isn’t in your workspace returns anot_founderror such asCouldn't find survey <id>. Check the id and your access to it. - Responses. Each
gt_survey_responsesrow names its survey, Company and person, carries the respondent’s name and email when the survey recorded them, and has anapp_paththat opens the response in GainTrace. To list the responses about one deal, ticket, plan or custom record, passsubject_type(deal,ticket,planorrecord) withsubject_id;subject_idalone returns a validation error. Rows have asubjectwith itstype,idandlabel. When a survey asked an AI follow-up question,answers._probeholds thequestionand theanswer. - Drafts can’t turn on AI.
gt_survey_create_drafttakes 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_runreturnsrun_id,status,fetched,imported,updated,unchanged,skipped,skip_reasonsanderror.skippedis the total as a number, andskip_reasonslists up to 20 reasons with a count each. It never echoes a respondent’s email. - Rules.
gt_survey_rules_updatechangesfrequency(recontactDays,dismissedRecontactDays, and an optionalcompanyLimitofpeopleanddays, ornullto turn it off),follow_up(slaHours,autoAssignofnone,negativeorall) andcompany_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 thegt_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 founderror. 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_keyreturn 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_askallows 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.
Related
- Authentication - create and scope
gt_live_API keys - Errors - the shared error envelope and codes