The Treasure Data documentation and platform are accessible through 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.
- Real-time documentation access: AI assistants receive accurate, contextual help about Treasure Data products and features.
- Platform interaction: AI assistants can query databases, manage segments, run workflows, and more.
- Dynamic API guidance: AI assistants can extract and explain API reference content based on user needs.
The Treasure Data documentation site includes a built-in AI assistant that can answer questions about products, features, and APIs directly from the documentation.
- Click the Ask AI button in the bottom-right corner of any documentation page.
- Type your question in natural language.
- The AI assistant searches the documentation and provides relevant answers with source links.
You can also access Ask AI through the Search modal in the top navigation bar.
The AI assistant indexes and searches all documentation content:
- Product guides: Complete documentation for all Treasure Data products
- API references: OpenAPI specifications and endpoint details
- Integration guides: Setup instructions for data sources and destinations
- Best practices: Implementation patterns and recommendations
How do I set up a Parent Segment?
What integrations are available in Integration Hub?
How does Real-Time ID Stitching work?
What are the differences between Trino and Hive?
How do I create a customer journey?The AI assistant provides answers based on the latest documentation content, with links to the relevant pages for more details.
For developers and AI tools, Treasure Data provides two MCP servers for different use cases:
| MCP Server | Purpose | What You Can Do |
|---|---|---|
| TD Docs MCP | Documentation search | Ask questions about Treasure Data products and features |
| tdx MCP | Platform interaction | Query databases, manage segments, run workflows, and more |
Use the TD Docs MCP server to explore documentation and discover APIs.
The server is registered at: https://docs.treasuredata.com/mcp
| Tool | Parameters | Description |
|---|---|---|
list-apis | name?: string | Lists available APIs with their context and purpose. |
get-endpoints | name: string | Returns all endpoints and their descriptions for a specific API. |
get-endpoint-info | name: string, path: string, method: string | Returns comprehensive information about a specific endpoint, including parameters, security, and examples. |
get-security-schemes | name: string | Gets the security schemes for a specific API. |
get-full-api-description | name: string | Returns the complete OpenAPI description. |
| Tool | Parameters | Description |
|---|---|---|
search | query: string | Searches documentation and returns relevant content for a query. |
Users can connect their preferred AI tools that support MCP (for example, Cursor, Claude Code, and VS Code) to the TD Docs MCP server.
- Copy the MCP server URL:
https://docs.treasuredata.com/mcp - Add it to your tool using the instructions below.
After connecting, the tool can access Treasure Data documentation and API references.
- In Cursor, open the command palette.
- macOS:
Command + Shift + P - Windows/Linux:
Ctrl + Shift + P
- macOS:
- Type "Open MCP settings" in the command palette.
- Select "Add custom MCP".
Cursor opens the mcp.json file.
- In
mcp.json, add the server configuration:
{
"mcpServers": {
"td-docs": {
"url": "https://docs.treasuredata.com/mcp"
}
}
}- Save the
mcp.jsonfile. - Return to MCP settings and confirm the connection.
After connecting, Cursor displays the list of available tools.
In Cursor chat (Agent mode), ask a question that triggers an MCP tool:
How do I configure Real-Time ID Stitching?The tdx CLI provides an MCP server that enables AI tools to interact with your Treasure Data environment directly.
First, install and authenticate tdx:
# Install tdx
npm install -g @treasuredata/tdx
# Authenticate
tdx auth setup| Tool | Parameters | Description |
|---|---|---|
tdx_run | args: string[] | Execute any tdx CLI command. Returns JSON output. |
tdx_search | query: string, category?: string | Search for relevant tdx commands based on what you want to do. |
Categories for tdx_search: Data, CDP, AI, Context, Utilities
- In Cursor, open the command palette (
Command + Shift + PorCtrl + Shift + P). - Type "Open MCP settings" and select "Add custom MCP".
In mcp.json, add the tdx server configuration:
{
"mcpServers": {
"tdx": {
"command": "tdx",
"args": ["mcp"]
}
}
}Without global install (using npx):
{
"mcpServers": {
"tdx": {
"command": "npx",
"args": ["@treasuredata/tdx", "mcp"]
}
}
}To use a specific profile:
{
"mcpServers": {
"tdx": {
"command": "tdx",
"args": ["mcp"],
"env": {
"TDX_PROFILE": "my-profile"
}
}
}
}Once configured, you can have conversations like:
> What databases are available in Treasure Data?
AI uses tdx_run with args: ["databases"]
> Show me the schema for the users table in mydb
AI uses tdx_run with args: ["describe", "mydb.users"]
> Run a query to find the top 10 users by order count
AI uses tdx_run with args: ["query", "SELECT user_id, COUNT(*) as orders
FROM mydb.orders GROUP BY user_id ORDER BY orders DESC LIMIT 10"]
> Create a segment for users who made a purchase in the last 30 days
AI uses tdx_search to find segment commands, then tdx_run to create the segmentFor Treasure Data customers, the easiest way to get started is using tdx claude, which provides:
- TD LLM Proxy integration: Use your existing AI Suite credits
- Pre-configured TD Skills: Enhanced capabilities for SQL, workflows, and CDP operations
- Documentation search: Built-in access to TD documentation
# Install tdx and Claude Code
npm install -g @treasuredata/tdx
curl -fsSL https://claude.ai/install.sh | bash
# Authenticate with Treasure Data
tdx auth setup
# Launch Claude Code with TD integration
tdx claudeOnce inside Claude Code via tdx claude:
> How to set up data ingestion to TD from Snowflake?
> Analyze mydb.user_events data
> Write a workflow to periodically import data from S3
> Create a SQL query to find top customers by revenue
> Build a user segment for customers who purchased in the last 30 daysTD Skills are pre-built Claude Code plugins that enhance AI assistance for Treasure Data workflows:
| Skill Category | What It Helps With |
|---|---|
| SQL Skills | Trino/Hive syntax, TD-specific functions, query optimization |
| Workflow Skills | Digdag workflows, scheduling, dbt integration |
| tdx Skills | Segments, journeys, activations, AI agents |
All TD Skills are automatically available when using tdx claude.
- Model Context Protocol (MCP) - Learn more about MCP
- tdx CLI Documentation - Complete tdx reference
- tdx MCP Command - Detailed MCP server documentation
- tdx claude Command - Claude Code integration guide
- TD Skills - Pre-built AI skills for Treasure Data
- Marketing as Code Book - Learn AI-assisted CDP development
- Product Documentation - Browse all Treasure Data products