Skip to content

Connect ThoughtSpot to ChatGPT: Manage Users, Roles, and AI Spotter

Learn how to connect ThoughtSpot to ChatGPT using an MCP server. Automate BI administration, user management, and AI Spotter analytics workflows.

Riya Sethi Riya Sethi · · 9 min read
Connect ThoughtSpot to ChatGPT: Manage Users, Roles, and AI Spotter

If you need to connect ThoughtSpot to ChatGPT to automate Business Intelligence (BI) administration, manage user access, or interact directly with ThoughtSpot's AI Spotter, you need a Model Context Protocol (MCP) server. This server acts as the translation layer between ChatGPT's tool calls and ThoughtSpot's highly specific 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 Claude, check out our guide on connecting ThoughtSpot to Claude or explore our broader architectural overview on connecting ThoughtSpot to AI Agents.

Giving a Large Language Model (LLM) read and write access to an enterprise analytics platform like ThoughtSpot is a massive engineering challenge. You have to handle complex ThoughtSpot Modeling Language (TML) payloads, track conversational state for Spotter agents, and map dynamic object identifiers (GUIDs) to MCP tool definitions. Every time ThoughtSpot updates its API schema or adds a new feature, your custom server code must be updated, redeployed, and tested.

This guide breaks down exactly how to use Truto to generate a secure, managed MCP server for ThoughtSpot, connect it natively to ChatGPT, and execute complex BI administration workflows using natural language.

The Engineering Reality of the ThoughtSpot 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, implementing it against ThoughtSpot's API is exceptionally painful.

If you decide to build a custom MCP server for ThoughtSpot, you own the entire API lifecycle. Here are the specific integration challenges that break standard CRUD assumptions when working with ThoughtSpot:

Conversational State for Spotter Agents

Unlike stateless CRUD APIs, interacting with ThoughtSpot's Spotter AI programmatically requires strict session management. When you want ChatGPT to ask Spotter an analytical question via the API, you cannot simply send a raw query string. You must first create a Spotter conversation session (create_a_thought_spot_conversation_creates_create) to obtain a conversation_identifier, then send your message tied to that identifier, and wait for the response to resolve. If your custom MCP server fails to maintain or pass this state accurately, ChatGPT will hallucinate context or drop the conversational thread entirely.

The Complexity of ThoughtSpot Modeling Language (TML)

ThoughtSpot relies on TML (ThoughtSpot Modeling Language) to define logical tables, worksheets, and answers. When exporting or importing metadata, the API expects and returns complex YAML or JSON structures that define these objects. A custom MCP server must parse LLM tool calls and successfully format them into compliant TML structures. If your LLM attempts to update a data model without adhering perfectly to the TML schema, ThoughtSpot will reject the request.

Dynamic Object Identifiers vs. Names

Many ThoughtSpot endpoints accept either a unique GUID or a string name to identify metadata objects (e.g., metadata_identifier). However, if you use a string name, you must also pass the exact metadata type (e.g., LOGICAL_TABLE, WORKSHEET). Building static MCP schemas for this dual-identifier system is frustrating. Your MCP server must guide the LLM to provide the correct combination of parameters, otherwise the API will return ambiguous resolution errors.

Step 1: Create the ThoughtSpot MCP Server

To bridge ThoughtSpot and ChatGPT, we first need to generate a Truto MCP server. Truto dynamically generates tool definitions based on ThoughtSpot's API documentation and scopes them to a specific authenticated account. Truto handles the OAuth token lifecycle, so ChatGPT never encounters an expired credential.

You can create the MCP server in two ways: via the Truto dashboard or programmatically via the REST API.

Method 1: Via the Truto UI

  1. Log into your Truto dashboard and navigate to Integrated Accounts.
  2. Select your connected ThoughtSpot account (or connect a new one using your admin credentials).
  3. Click the MCP Servers tab on the integrated account detail page.
  4. Click Create MCP Server.
  5. Give your server a name (e.g., "ThoughtSpot for ChatGPT").
  6. Optional: Select specific HTTP methods (e.g., read, write) or tags to limit what the LLM can access.
  7. Click Create and copy the generated MCP server URL (e.g., https://api.truto.one/mcp/a1b2c3d4...). Treat this URL as a secret.

Method 2: Via the Truto API

For teams building automated onboarding flows, you can generate the MCP server programmatically. You will need your Truto API token and the integrated_account_id for the ThoughtSpot connection.

Make a POST request to the /mcp endpoint:

curl -X POST https://api.truto.one/integrated-account/<INTEGRATED_ACCOUNT_ID>/mcp \
  -H "Authorization: Bearer $TRUTO_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "ThoughtSpot Admin MCP",
    "config": {
      "methods": ["read", "write"],
      "tags": ["users", "roles", "spotter", "metadata"]
    }
  }'

The API will return a JSON response containing the secure URL:

{
  "id": "mcp_abc123",
  "name": "ThoughtSpot Admin MCP",
  "config": { "methods": ["read", "write"] },
  "expires_at": null,
  "url": "https://api.truto.one/mcp/a1b2c3d4e5f67890"
}

Step 2: Connect the MCP Server to ChatGPT

With your secure Truto MCP URL in hand, you must now register it with your ChatGPT environment.

Method 1: Via the ChatGPT UI

If you are using ChatGPT Pro, Plus, Business, Enterprise, or Education, you can add the server directly through the interface:

  1. Open ChatGPT and navigate to Settings -> Apps -> Advanced settings.
  2. Toggle Developer mode to ON.
  3. Under MCP servers / Custom connectors, click Add new server.
  4. Set the Name to "ThoughtSpot API".
  5. Paste your Truto MCP URL into the Server URL field.
  6. Click Save.

ChatGPT will immediately connect to the URL, execute the initialize handshake, and populate its context window with the available ThoughtSpot tools.

Method 2: Via Manual Config File (Local Client)

If you are running a local MCP client or testing via the @modelcontextprotocol/server-sse proxy, you can configure your MCP connection using a JSON config file (typically mcp.json or your client's equivalent).

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

Restart your MCP client, and it will bind the ThoughtSpot toolset directly to your local agent.

Hero Tools for ThoughtSpot

Truto exposes the full ThoughtSpot REST API as granular tools. Below are the hero tools most commonly used by IT admins and data engineers connecting ThoughtSpot to ChatGPT.

Start Spotter Conversation

Tool name: create_a_thought_spot_conversation_creates_create

This tool initializes a new AI agent conversation in ThoughtSpot (Spotter). It returns a conversation_identifier which is strictly required for sending subsequent analytical queries. You can optionally ground the conversation in specific data models.

"Initialize a new Spotter conversation in ThoughtSpot grounded in the 'Q3_Sales_Data' model and give me the conversation ID."

Send Spotter Message

Tool name: thought_spot_agent_conversations_v_2_send

Once a conversation is created, this tool sends a natural language message to Spotter and returns the complete analytical response synchronously. It requires the conversation_identifier generated in the previous step.

"Using the conversation ID you just generated, ask Spotter: 'What were the top 3 selling products by revenue in North America last month?'"

Create a ThoughtSpot User

Tool name: create_a_thought_spot_user

Automates user onboarding by provisioning a new account in the ThoughtSpot directory. It requires a name, display_name, and email, and returns the created user record along with its internal GUID.

"Create a new ThoughtSpot user for Jane Doe. Her email is jane.doe@company.com and her display name should be 'Jane Doe (Data Science)'."

Update a ThoughtSpot Role

Tool name: update_a_thought_spot_role_by_id

Modifies an existing role's assigned privileges (e.g., granting CAN_MANAGE_VERSION_CONTROL or DATAMANAGEMENT). This is critical for orchestrating Role-Based Access Control (RBAC) via natural language.

"Update the 'Junior Analyst' role in ThoughtSpot to include the 'CAN_USE_SPOTTER' privilege."

Export TML Metadata

Tool name: create_a_thought_spot_tml_export

Exports the ThoughtSpot Modeling Language (TML) representation of metadata objects (like worksheets, answers, or liveboards) in JSON or YAML format. Useful for auditing schema configurations or backing up data models.

"Export the TML definition for the logical table named 'Core_Customer_Metrics' in YAML format."

Audit AI Usage Data

Tool name: list_all_thought_spot_ai_usage_data_users

Retrieves a user's combined Spotter usage position, detailing every usage pool they draw from, including query allowances and consumed limits. Perfect for IT admins monitoring AI expenditures.

"Check the current AI Spotter usage limits and consumption for the user 'john.smith'."

To view the complete inventory of available ThoughtSpot tools, including their required JSON schema payloads and property definitions, visit the ThoughtSpot integration page.

Workflows in Action

Once your MCP server is connected, ChatGPT can orchestrate complex, multi-step ThoughtSpot operations. Here are two practical examples of how an AI agent executes these tasks.

Workflow 1: AI-Driven Analytics via Spotter

Business users often need to query BI platforms without logging into a dashboard. By connecting ChatGPT to ThoughtSpot, users can retrieve live analytical data via Spotter.

"Start a new ThoughtSpot Spotter session based on the 'Global Sales' data source. Once it's ready, ask it for the total revenue broken down by region for the last quarter."

How ChatGPT executes this:

  1. create_a_thought_spot_conversation_creates_create: ChatGPT calls this tool, passing the requested data source, and extracts the conversation_identifier from the response.
  2. thought_spot_agent_conversations_v_2_send: ChatGPT immediately calls this second tool, injecting the conversation_identifier and the user's natural language question ("total revenue broken down by region for the last quarter").
  3. Formatting: ChatGPT receives the analytical result from Spotter, formats the raw data into a clean markdown table, and presents it to the user.

Workflow 2: Automated User Onboarding and RBAC

IT administrators frequently waste time provisioning accounts and assigning roles. ChatGPT can fully automate this lifecycle.

"We have a new data engineer, Alex Chen (alex.chen@corp.com). Please create a ThoughtSpot account for him, then assign him to the 'Engineering_Read_Write' role. Finally, export the TML for the 'Engineering_Schema' worksheet so I can review what he has access to."

How ChatGPT executes this:

sequenceDiagram
    participant User as User
    participant ChatGPT as ChatGPT
    participant TS as ThoughtSpot API (via MCP)

    User->>ChatGPT: "Create user Alex, assign role, export TML"
    ChatGPT->>TS: call create_a_thought_spot_user (Alex Chen)
    TS-->>ChatGPT: returns user_id (GUID)
    ChatGPT->>TS: call update_a_thought_spot_role_by_id (add user_id to role)
    TS-->>ChatGPT: returns 204 Success
    ChatGPT->>TS: call create_a_thought_spot_tml_export (Engineering_Schema)
    TS-->>ChatGPT: returns TML payload
    ChatGPT-->>User: "User created, role assigned. Here is the TML definition..."
  1. create_a_thought_spot_user: ChatGPT provisions the new account and caches the returned user_id.
  2. update_a_thought_spot_role_by_id: ChatGPT looks up the requested role, modifies its payload to include the new user_id, and applies the update.
  3. create_a_thought_spot_tml_export: ChatGPT fetches the requested worksheet configuration and displays the YAML/JSON structure to the admin for review.

Security and Access Control

Exposing an enterprise BI tool to an LLM requires strict governance. Truto MCP servers provide several mechanisms to lock down AI access at the infrastructure layer:

  • Method Filtering: Use the config.methods array during MCP server creation to restrict operations. Passing ["read"] ensures the LLM can only query data (e.g., list users, fetch TML) and cannot execute create, update, or delete operations.
  • Tag Filtering: Use the config.tags array to restrict access by functional domain. For instance, tagging a server with ["spotter"] ensures the LLM can only access conversational AI endpoints and cannot touch user administration endpoints.
  • Additional Authentication (require_api_token_auth): By default, possessing the MCP URL grants access. Setting this flag to true forces the MCP client to also pass a valid Truto API token in the Authorization header, preventing unauthorized lateral access if the URL is leaked.
  • Auto-Expiration (expires_at): You can set a strict TTL (Time-To-Live) on the MCP server. Truto's underlying KV storage and durable alarms will automatically destroy the server endpoint at the specified ISO datetime, ideal for temporary agent workflows.

Handling ThoughtSpot Rate Limits via Truto

When writing automated workflows, it is critical to understand how API limits are managed.

Truto does not automatically retry, throttle, or absorb rate limit errors on your behalf.

If ChatGPT executes a loop that exceeds ThoughtSpot's API quota, ThoughtSpot returns an HTTP 429 error. Truto passes this 429 error directly back to the caller. However, Truto does normalize the upstream rate limit information into standardized IETF HTTP headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset). It is the responsibility of the calling agent or client architecture to inspect these normalized headers and implement the appropriate backoff and retry logic.

Connect ThoughtSpot to AI Agents Today

Building a custom integration layer between ChatGPT and ThoughtSpot means taking on the burden of authentication lifecycles, TML schema parsing, and Spotter session tracking. Every time ThoughtSpot updates a feature, your engineering team has to update the server.

Truto eliminates this overhead. By dynamically generating documentation-driven MCP servers, you can give ChatGPT secure, structured access to ThoughtSpot in minutes.

FAQ

Can ChatGPT query my ThoughtSpot data directly?
Yes. By using the Truto MCP server, ChatGPT can initiate sessions with ThoughtSpot's AI Spotter to query your data models and return the analytical results directly into the chat interface.
How does Truto handle ThoughtSpot API rate limits?
Truto passes upstream HTTP 429 rate limit errors directly back to the caller. It normalizes the rate limit data into standard IETF headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset), leaving the retry and backoff logic up to your client.
Can I prevent ChatGPT from deleting ThoughtSpot users or roles?
Yes. When creating the MCP server in Truto, you can pass a method filter (e.g., config.methods: ["read"]). This strictly prevents the LLM from executing any write, update, or delete operations.
Does Truto support exporting ThoughtSpot Modeling Language (TML)?
Yes, Truto exposes tools to export and import TML, allowing ChatGPT to audit schemas, backup worksheet configurations, and read complex object definitions.

More from our Blog