{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["tabs","tab"]},"redocly_category":"Guides","type":"markdown"},"seo":{"title":"Getting Started for AI Agents","description":"Treasure Data Product Documentation · Collect and Unify · Segment and Activate · Experiment and Analyze · Decisioning Automate with AI Scale and Trust.","siteUrl":"https://docs.treasuredata.com","lang":"en-US","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"getting-started-for-ai-agents","__idx":0},"children":["Getting Started for AI Agents"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The Treasure Data documentation and platform are accessible through ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Claude Code"]}," and other MCP-compatible AI tools via the Model Context Protocol (MCP). This allows AI assistants to access documentation and interact with your Treasure Data environment directly."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"benefits","__idx":1},"children":["Benefits"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Real-time documentation access"]},": AI assistants receive accurate, contextual help about Treasure Data products and features."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Platform interaction"]},": AI assistants can query databases, manage segments, run workflows, and more."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Dynamic API guidance"]},": AI assistants can extract and explain API reference content based on user needs."]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"ask-ai-documentation-assistant","__idx":2},"children":["Ask AI (Documentation Assistant)"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The Treasure Data documentation site includes a built-in AI assistant that can answer questions about products, features, and APIs directly from the documentation."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"how-to-use","__idx":3},"children":["How to Use"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Click the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Ask AI"]}," button in the bottom-right corner of any documentation page."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Type your question in natural language."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The AI assistant searches the documentation and provides relevant answers with source links."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can also access Ask AI through the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Search"]}," modal in the top navigation bar."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"what-you-can-ask","__idx":4},"children":["What You Can Ask"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The AI assistant indexes and searches all documentation content:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Product guides"]},": Complete documentation for all Treasure Data products"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["API references"]},": OpenAPI specifications and endpoint details"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Integration guides"]},": Setup instructions for data sources and destinations"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Best practices"]},": Implementation patterns and recommendations"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"example-questions","__idx":5},"children":["Example Questions"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"How do I set up a Parent Segment?\nWhat integrations are available in Integration Hub?\nHow does Real-Time ID Stitching work?\nWhat are the differences between Trino and Hive?\nHow do I create a customer journey?\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The AI assistant provides answers based on the latest documentation content, with links to the relevant pages for more details."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"mcp-servers","__idx":6},"children":["MCP Servers"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For developers and AI tools, Treasure Data provides two MCP servers for different use cases:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"MCP Server"},"children":["MCP Server"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Purpose"},"children":["Purpose"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"What You Can Do"},"children":["What You Can Do"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Treasure Docs MCP"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Documentation search"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Ask questions about Treasure Data products and features"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["tdx MCP"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Platform interaction"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Query databases, manage segments, run workflows, and more"]}]}]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"treasure-docs-mcp-server","__idx":7},"children":["Treasure Docs MCP Server"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use the Treasure Docs MCP server to explore documentation and discover APIs."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The server is registered at: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://docs.treasuredata.com/mcp"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"available-tools","__idx":8},"children":["Available Tools"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"documentation-tools","__idx":9},"children":["Documentation Tools"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Tool"},"children":["Tool"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Parameters"},"children":["Parameters"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["list-apis"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["name?: string"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Lists available APIs with their context and purpose."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["get-endpoints"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["name: string"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Returns all endpoints and their descriptions for a specific API."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["get-endpoint-info"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["name: string"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["path: string"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["method: string"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Returns comprehensive information about a specific endpoint, including parameters, security, and examples."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["get-security-schemes"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["name: string"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Gets the security schemes for a specific API."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["get-full-api-description"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["name: string"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Returns the complete OpenAPI description."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"search-tools","__idx":10},"children":["Search Tools"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Tool"},"children":["Tool"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Parameters"},"children":["Parameters"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["search"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["query: string"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Searches documentation and returns relevant content for a query."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"use-the-mcp-server","__idx":11},"children":["Use the MCP Server"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Users can connect their preferred AI tools that support MCP (for example, Cursor, Claude Code, and VS Code) to the Treasure Docs MCP server."]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Copy the MCP server URL: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://docs.treasuredata.com/mcp"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Add it to your tool using the instructions below."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["After connecting, the tool can access Treasure Data documentation and API references."]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"label":"Cursor","disable":false},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"connect-cursor-to-the-mcp-server","__idx":12},"children":["Connect Cursor to the MCP Server"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["In Cursor, open the command palette.",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["macOS: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Command + Shift + P"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Windows/Linux: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Ctrl + Shift + P"]}]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Type \"Open MCP settings\" in the command palette."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Select \"Add custom MCP\"."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Cursor opens the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["mcp.json"]}," file."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"configure-the-mcp-server","__idx":13},"children":["Configure the MCP Server"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["In ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["mcp.json"]},", add the server configuration:"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"mcpServers\": {\n    \"td-docs\": {\n      \"url\": \"https://docs.treasuredata.com/mcp\"\n    }\n  }\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"ol","attributes":{"start":2},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Save the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["mcp.json"]}," file."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Return to MCP settings and confirm the connection."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["After connecting, Cursor displays the list of available tools."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"test-the-cursor-connection","__idx":14},"children":["Test the Cursor Connection"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In Cursor chat (Agent mode), ask a question that triggers an MCP tool:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"How do I configure Real-Time ID Stitching?\n"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Claude Code","disable":false},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"connect-claude-code-to-the-mcp-server","__idx":15},"children":["Connect Claude Code to the MCP Server"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Run the following command:"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"claude mcp add td-docs https://docs.treasuredata.com/mcp --transport http\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"ol","attributes":{"start":2},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["In the Claude Code CLI, type ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/mcp"]}," to verify the connection."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Claude Code lists the available tools with descriptions and parameters."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"test-the-claude-code-connection","__idx":16},"children":["Test the Claude Code Connection"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In the Claude Code CLI, ask a question that uses an MCP tool:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"What are the best practices for creating Parent Segments?\n"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"VS Code","disable":false},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"connect-vs-code-to-the-mcp-server","__idx":17},"children":["Connect VS Code to the MCP Server"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["In VS Code, open the command palette.",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["macOS: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Command + Shift + P"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Windows/Linux: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Ctrl + Shift + P"]}]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Type \"MCP: Add Server\" in the command palette."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Select \"HTTP\" to connect to a remote MCP server."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Enter the MCP server URL: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://docs.treasuredata.com/mcp"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Enter a name for the connection (e.g., ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["td-docs"]},")."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"test-the-vs-code-connection","__idx":18},"children":["Test the VS Code Connection"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Open Chat with AI in Agent mode and select the Tools icon."," ","Confirm that your MCP connection appears with a list of available tools."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Ask the AI to perform a query that uses an MCP tool:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"Show me the API specification for the Personalization API\n"},"children":[]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"tdx-mcp-server","__idx":19},"children":["tdx MCP Server"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/treasure-code/"},"children":["tdx CLI"]}," provides an MCP server that enables AI tools to interact with your Treasure Data environment directly."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"setup","__idx":20},"children":["Setup"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["First, install and authenticate tdx:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"# Install tdx\nnpm install -g @treasuredata/tdx\n\n# Authenticate\ntdx auth setup\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"available-tools-1","__idx":21},"children":["Available Tools"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Tool"},"children":["Tool"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Parameters"},"children":["Parameters"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tdx_run"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["args: string[]"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Execute any tdx CLI command. Returns JSON output."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tdx_search"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["query: string"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["category?: string"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Search for relevant tdx commands based on what you want to do."]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Categories for tdx_search:"]}," Data, CDP, AI, Context, Utilities"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"use-the-mcp-server-1","__idx":22},"children":["Use the MCP Server"]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"label":"Cursor","disable":false},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"connect-cursor-to-the-tdx-mcp-server","__idx":23},"children":["Connect Cursor to the tdx MCP Server"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["In Cursor, open the command palette (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Command + Shift + P"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Ctrl + Shift + P"]},")."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Type \"Open MCP settings\" and select \"Add custom MCP\"."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"configure-the-mcp-server-1","__idx":24},"children":["Configure the MCP Server"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["mcp.json"]},", add the tdx server configuration:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"mcpServers\": {\n    \"tdx\": {\n      \"command\": \"tdx\",\n      \"args\": [\"mcp\"]\n    }\n  }\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Without global install (using npx):"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"mcpServers\": {\n    \"tdx\": {\n      \"command\": \"npx\",\n      \"args\": [\"@treasuredata/tdx\", \"mcp\"]\n    }\n  }\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To use a specific profile:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"mcpServers\": {\n    \"tdx\": {\n      \"command\": \"tdx\",\n      \"args\": [\"mcp\"],\n      \"env\": {\n        \"TDX_PROFILE\": \"my-profile\"\n      }\n    }\n  }\n}\n","lang":"json"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Claude Desktop","disable":false},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"connect-claude-desktop-to-the-tdx-mcp-server","__idx":25},"children":["Connect Claude Desktop to the tdx MCP Server"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Open your Claude Desktop configuration file:"," ","Add the tdx server configuration:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"mcpServers\": {\n    \"tdx\": {\n      \"command\": \"tdx\",\n      \"args\": [\"mcp\"]\n    }\n  }\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Without global install (using npx):"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"mcpServers\": {\n    \"tdx\": {\n      \"command\": \"npx\",\n      \"args\": [\"@treasuredata/tdx\", \"mcp\"]\n    }\n  }\n}\n","lang":"json"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Windsurf","disable":false},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"connect-windsurf-to-the-tdx-mcp-server","__idx":26},"children":["Connect Windsurf to the tdx MCP Server"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Open your Windsurf MCP configuration file at ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["~/.windsurf/mcp.json"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Add the tdx server configuration:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"mcpServers\": {\n    \"tdx\": {\n      \"command\": \"tdx\",\n      \"args\": [\"mcp\"]\n    }\n  }\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Without global install (using npx):"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"mcpServers\": {\n    \"tdx\": {\n      \"command\": \"npx\",\n      \"args\": [\"@treasuredata/tdx\", \"mcp\"]\n    }\n  }\n}\n","lang":"json"},"children":[]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"example-conversation","__idx":27},"children":["Example Conversation"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Once configured, you can have conversations like:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"> What databases are available in Treasure Data?\n\nAI uses tdx_run with args: [\"databases\"]\n\n> Show me the schema for the users table in mydb\n\nAI uses tdx_run with args: [\"describe\", \"mydb.users\"]\n\n> Run a query to find the top 10 users by order count\n\nAI uses tdx_run with args: [\"query\", \"SELECT user_id, COUNT(*) as orders\n  FROM mydb.orders GROUP BY user_id ORDER BY orders DESC LIMIT 10\"]\n\n> Create a segment for users who made a purchase in the last 30 days\n\nAI uses tdx_search to find segment commands, then tdx_run to create the segment\n"},"children":[]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"tdx-claude-all-in-one-setup","__idx":28},"children":["tdx claude: All-in-One Setup"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For Treasure Data customers, the easiest way to get started is using ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tdx claude"]},", which provides:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["TD LLM Proxy integration"]},": Use your existing ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://www.treasuredata.com/terms/ai-suite-credits-definition/"},"children":["AI Suite credits"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Pre-configured TD Skills"]},": Enhanced capabilities for SQL, workflows, and CDP operations"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Documentation search"]},": Built-in access to TD documentation"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"quick-start","__idx":29},"children":["Quick Start"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"# Install tdx and Claude Code\nnpm install -g @treasuredata/tdx\ncurl -fsSL https://claude.ai/install.sh | bash\n\n# Authenticate with Treasure Data\ntdx auth setup\n\n# Launch Claude Code with TD integration\ntdx claude\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"example-conversations","__idx":30},"children":["Example Conversations"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Once inside Claude Code via ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tdx claude"]},":"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"> How to set up data ingestion to TD from Snowflake?\n\n> Analyze mydb.user_events data\n\n> Write a workflow to periodically import data from S3\n\n> Create a SQL query to find top customers by revenue\n\n> Build a user segment for customers who purchased in the last 30 days\n"},"children":[]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"td-skills-for-enhanced-ai-assistance","__idx":31},"children":["TD Skills for Enhanced AI Assistance"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/treasure-code/guide/td-skills"},"children":["TD Skills"]}," are pre-built Claude Code plugins that enhance AI assistance for Treasure workflows:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Skill Category"},"children":["Skill Category"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"What It Helps With"},"children":["What It Helps With"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["SQL Skills"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Trino/Hive syntax, TD-specific functions, query optimization"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Workflow Skills"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Digdag workflows, scheduling, dbt integration"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["tdx Skills"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Segments, journeys, activations, AI agents"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["All TD Skills are automatically available when using ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tdx claude"]},"."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"learn-more","__idx":32},"children":["Learn More"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://modelcontextprotocol.io/"},"children":["Model Context Protocol (MCP)"]}," - Learn more about MCP"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/treasure-code/"},"children":["tdx CLI Documentation"]}," - Complete tdx reference"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/treasure-code/commands/mcp"},"children":["tdx MCP Command"]}," - Detailed MCP server documentation"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/treasure-code/commands/claude"},"children":["tdx claude Command"]}," - Claude Code integration guide"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/treasure-code/guide/td-skills"},"children":["TD Skills"]}," - Pre-built AI skills for Treasure Data"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products"},"children":["Product Documentation"]}," - Browse all Treasure Data products"]}]}]},"headings":[{"value":"Getting Started for AI Agents","id":"getting-started-for-ai-agents","depth":1},{"value":"Benefits","id":"benefits","depth":2},{"value":"Ask AI (Documentation Assistant)","id":"ask-ai-documentation-assistant","depth":2},{"value":"How to Use","id":"how-to-use","depth":3},{"value":"What You Can Ask","id":"what-you-can-ask","depth":3},{"value":"Example Questions","id":"example-questions","depth":3},{"value":"MCP Servers","id":"mcp-servers","depth":2},{"value":"Treasure Docs MCP Server","id":"treasure-docs-mcp-server","depth":2},{"value":"Available Tools","id":"available-tools","depth":3},{"value":"Documentation Tools","id":"documentation-tools","depth":4},{"value":"Search Tools","id":"search-tools","depth":4},{"value":"Use the MCP Server","id":"use-the-mcp-server","depth":3},{"value":"Connect Cursor to the MCP Server","id":"connect-cursor-to-the-mcp-server","depth":4},{"value":"Configure the MCP Server","id":"configure-the-mcp-server","depth":4},{"value":"Test the Cursor Connection","id":"test-the-cursor-connection","depth":4},{"value":"Connect Claude Code to the MCP Server","id":"connect-claude-code-to-the-mcp-server","depth":4},{"value":"Test the Claude Code Connection","id":"test-the-claude-code-connection","depth":4},{"value":"Connect VS Code to the MCP Server","id":"connect-vs-code-to-the-mcp-server","depth":4},{"value":"Test the VS Code Connection","id":"test-the-vs-code-connection","depth":4},{"value":"tdx MCP Server","id":"tdx-mcp-server","depth":2},{"value":"Setup","id":"setup","depth":3},{"value":"Available Tools","id":"available-tools-1","depth":3},{"value":"Use the MCP Server","id":"use-the-mcp-server-1","depth":3},{"value":"Connect Cursor to the tdx MCP Server","id":"connect-cursor-to-the-tdx-mcp-server","depth":4},{"value":"Configure the MCP Server","id":"configure-the-mcp-server-1","depth":4},{"value":"Connect Claude Desktop to the tdx MCP Server","id":"connect-claude-desktop-to-the-tdx-mcp-server","depth":4},{"value":"Connect Windsurf to the tdx MCP Server","id":"connect-windsurf-to-the-tdx-mcp-server","depth":4},{"value":"Example Conversation","id":"example-conversation","depth":3},{"value":"tdx claude: All-in-One Setup","id":"tdx-claude-all-in-one-setup","depth":2},{"value":"Quick Start","id":"quick-start","depth":3},{"value":"Example Conversations","id":"example-conversations","depth":3},{"value":"TD Skills for Enhanced AI Assistance","id":"td-skills-for-enhanced-ai-assistance","depth":2},{"value":"Learn More","id":"learn-more","depth":2}],"frontmatter":{"seo":{"title":"Getting Started for AI Agents"}},"lastModified":"2026-06-01T11:27:28.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/getting-started/ai","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}