LLMs.txt: Complete documentation index for AI agents
startAutoMCPFrameRenderer
Table of Contents

startAutoMCPFrameRenderer🔗

startAutoMCPFrameRenderer(viewConfig?: AutoMCPFrameRendererViewConfig = {}) : MutationObserver

Starts an automatic renderer that watches the DOM for iframes containing the tsmcp=true query parameter and replaces them with fully configured ThoughtSpot embed iframes. The query parameter is automatically added by the ThoughtSpot MCP server.

A MutationObserver is set up on document.body to detect both directly added iframes and iframes nested within added container elements. Each matching iframe is replaced in-place with a new ThoughtSpot embed iframe that merges the original iframe’s query parameters with the SDK embed parameters.

A frame that replays a stored chat (it carries Param.TsmcpConversationId) is resolved to the answer’s current session first. If that fails, the frame is replaced with a short text notice instead of an embed; set unresolvedAnswerNoticeText to change it.

Call observer.disconnect() on the returned observer to stop monitoring the DOM.

Function Parameters

viewConfig

Optional configuration for the auto-rendered embeds. Accepts all properties from AutoMCPFrameRendererViewConfig. Defaults to an empty config.

Returns

MutationObserver

import { startAutoMCPFrameRenderer } from '@thoughtspot/visual-embed-sdk';

// Start watching the DOM for tsmcp iframes
const observer = startAutoMCPFrameRenderer({
  // optional view config overrides
});

// Later, stop watching
observer.disconnect();

Detailed example of how to use the auto-frame renderer: Python React Agent Simple UI

© 2026 ThoughtSpot Inc. All Rights Reserved.