Get the FREE Ultimate OpenClaw Setup Guide →

td

An Official Treasure Data MCP Server

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio treasure-data-td-mcp-server npx @treasuredata/mcp-server \
  --env TD_SITE="us01" \
  --env TD_API_KEY="your_api_key" \
  --env TD_DATABASE="sample_datasets" \
  --env TD_ENABLE_UPDATES="false"

How to use

This Treasure Data MCP Server exposes a curated set of tools that let AI assistants interact with Treasure Data without giving direct database access. It provides read-only querying through the list_databases, list_tables, describe_table, and query tools, along with an optional execute tool that can perform write operations when enabled. CDP tools are available in experimental mode to inspect segments and details within Treasure Data’s Customer Data Platform. The tools are designed to be used by embedding the corresponding JSON payloads into your prompts or through Claude Code integration, allowing you to request specific actions such as listing databases, discovering tables, describing schemas, running safe read queries, and optionally executing updates when permitted. When using Claude Code, you can add the server with a named alias (td) and point Claude Code to run the MCP via npx, ensuring you’re always using the latest version.

How to install

Prerequisites:

  • Node.js 18.0.0 or higher (includes npm and npx)
  • Access to run MCP via npx or global installation of the MCP server package

Installation steps (recommended):

  1. Ensure Node.js is installed
  2. Run the MCP server via npx (no global install required):
npx @treasuredata/mcp-server

If you prefer a traditional installation, you can install globally:

npm install -g @treasuredata/mcp-server

Then run the server directly (depending on your setup, you may call the package name or a script provided by the package):

treasuredata-mcp-server

Configuration notes:

  • Use the MCP client configuration to point to the npx command as shown in the readme example.
  • Set environment variables as needed (TD_API_KEY, TD_SITE, TD_ENABLE_UPDATES, TD_DATABASE).

Additional notes

Tips and common considerations:

  • TD_API_KEY is required to authenticate with Treasure Data.
  • TD_SITE can be us01, jp01, eu01, ap02, ap03, or dev; choose based on your region.
  • TD_ENABLE_UPDATES must be true to enable the write-enabled execute tool; default is false for safety.
  • TD_DATABASE can be set to a default database to simplify subsequent queries.
  • The MCP server supports read-only operations by default; enabling updates should be restricted to trusted contexts.
  • For Claude Code integration, you can register the server with a short alias (td) and use npx @treasuredata/mcp-server to always pull the latest version.
  • The Available Tools section in the README outlines exact payload formats for each action; reuse those payload shapes in prompts.
  • If you encounter connectivity or authentication issues, verify TD_API_KEY, TD_SITE, and network access to Treasure Data endpoints.

Related MCP Servers

Sponsor this space

Reach thousands of developers