home / mcp / treasure data mcp server
Provides Treasure Data API integration for Claude Code and Claude Desktop.
Configuration
View docs{
"mcpServers": {
"knishioka-td-mcp-server": {
"command": "mcp",
"args": [
"run",
"td_mcp_server/server.py"
],
"env": {
"TD_API_KEY": "YOUR_API_KEY",
"TD_ENDPOINT": "api.treasuredata.com"
}
}
}
}You can run a Treasure Data MCP Server that exposes Treasure Data API interactions as an MCP service. It integrates with Claude Code and Claude Desktop, letting you perform common Treasure Data actions through a consistent MCP interface while keeping credentials and requests centralized.
You interact with the MCP server through a client that speaks the MCP protocol. Start the server locally or remotely, provide your Treasure Data API key, and then issue high-level tool requests such as listing databases, querying tables, managing projects, and exploring workflows. You will access a broad set of Treasure Data actions without composing raw API calls. Use the available tools to discover resources, run searches, inspect project contents, and diagnose workflows. All interactions require your API key and the endpoint you target, which the server forwards to Treasure Data.
To get started, configure your MCP client to connect to the server. If you run the server locally via the recommended CLI flow, your client will send requests to the MCP runtime which in turn calls Treasure Data APIs using the provided credentials.
Prerequisites: Python 3.11 or newer and a working network connection.
# Install Python dependencies
pip install -r requirements.txt
# Start the server using the MCP CLI if you are running locally
export TD_API_KEY="your-api-key"
export TD_ENDPOINT="api.treasuredata.com" # Optional, defaults to api.treasuredata.com
mcp run td_mcp_server/server.pyConfigure Claude Desktop to connect to your MCP server by adding a server entry. The configuration should include the runtime command and environment variables needed to authenticate with Treasure Data.
{
"mcpServers": {
"td": {
"command": "uv",
"args": [
"--directory",
"/absolute/path/to/td-mcp-server",
"run",
"td_mcp_server/server.py"
],
"env": {
"TD_API_KEY": "YOUR_API_KEY",
"TD_ENDPOINT": "api.treasuredata.com"
}
}
}
}Keep your Treasure Data API key secret. Do not hard-code credentials in shared configurations. Prefer environment variables and secure storage for your keys. When distributing configurations, use placeholders (for example, YOUR_API_KEY) and provide instructions for the user to insert their own credentials.
If you encounter authentication or connectivity errors, verify that your TD_API_KEY is correctly exported and that TD_ENDPOINT points to the correct Treasure Data region. Check that the MCP server process is running and listening for client connections. Use the provided tools to verify connectivity and test common operations like listing databases and projects.
This MCP server exposes a comprehensive set of Treasure Data actions organized into practical tools. You can discover databases, tables, projects, workflows, and more. The available tools are listed in the project’s tool catalog and enable you to perform typical Treasure Data operations through MCP.
Get databases in your Treasure Data account with pagination support. Options include verbose, limit, offset, and all_results.
Retrieve detailed information about a specific database by name.
List tables within a specific database with optional verbosity and pagination.
List workflow projects with pagination; can include system projects and verbose details.
Get detailed information about a specific workflow project. For full contents, use the archive and list/read project files.
Download a project's archive to inspect contents such as SQL queries and workflow definitions.
List all files contained in a downloaded project archive.
Read a specific file from a downloaded project archive.
List workflows across all projects with optional verbosity, count limit, and system inclusion.
Perform intelligent search across Treasure Data resources with configurable scope and relevance.
Find a project by name or partial name match.
Find workflows by name with optional project filter and status.
Retrieve project details by exact name match.
Analyze a Treasure Data console URL to identify workflow, project, or job references.
Get detailed information about a workflow by numeric ID.
Comprehensive analysis of a Treasure Data project for documentation or debugging.
Diagnose workflow health and identify issues over a specified time window.
Trace data dependencies and lineage for tables or projects.
Retrieve detailed information about a workflow session.
List recent sessions for workflows, optionally filtered by workflow ID.
Get detailed information about a workflow attempt.
List all tasks for a workflow attempt.
Analyze a workflow execution from a URL or an ID.