Labsco
MCP SERVER

Treasure Data MCP Server

by treasure-data

Queries Treasure Data in Trino SQL, reads the SQL behind a CDP audience segment, and monitors or retries a failed Digdag workflow.

Data Platform: Pipelines, Warehousing, BI & GovernanceVerified
Summary
It opens read-only and stays that way until you say otherwise — the write tool does nothing unless TD_ENABLE_UPDATES is on.

Queries run as Trino SQL with Treasure Data's own UDFs, and on a large table td_interval keeps a question from scanning years of history. The CDP and workflow tools are what make it more than a SQL client: you can read the SQL that defines an audience, and retry a failed Digdag session from a named task without leaving the conversation.

What it is

An MCP server over Treasure Data that opens read-only: catalogue browsing and SELECT queries by default, with writes behind an explicit switch.

What you get
  • The catalogue through information_schema: databases, the tables in one, and a table's columns
  • query for read-only SQL — SELECT, SHOW, DESCRIBE — in the Trino dialect with Treasure Data's own UDFs, and an automatic result limit so a wide table does not flood the context
  • execute for writes, active only when TD_ENABLE_UPDATES is turned on
  • A database context you can switch and read back, so queries stop repeating it
  • Customer Data Platform tools, marked experimental: parent segments (audiences), the segments beneath one, a segment's filtering rules, the activations attached to it, and the SQL behind either a parent segment or a filtered segment
  • Digdag workflow monitoring: projects, workflows, execution sessions filtered by status and time window, the attempts for a session, the tasks inside an attempt with their status, and a task's logs
  • Recovery on failed runs: cancel a running attempt, retry a session from the beginning or from a named task, and retry an attempt with resume
  • Audit logging across every operation
Requirements

A Treasure Data API key in TD_API_KEY, and Node.js 18 or higher. TD_SITE picks the region — us01 by default, with jp01, eu01, ap02, ap03 and dev available — and TD_DATABASE sets a default database. Writes stay off unless TD_ENABLE_UPDATES is true, which is what keeps the execute tool inert on a read-only setup. Run it over stdio with npx @treasuredata/mcp-server. The server is in public preview: free during the preview, with usage-based pricing on query volume planned afterwards.

Setup effort

One command plus a key — npx @treasuredata/mcp-server, then supply credentials