Skip to content
Last updated

Connecting Visual Studio Code (GitHub Copilot) to Treasure AI

Connect VS Code and GitHub Copilot to Treasure AI to query databases, build segments, and debug workflows from Copilot Chat's Agent mode, using your existing GitHub Copilot plan. This page covers connecting MCP Server (Platform) for platform operations, MCP Server (Docs) for documentation search, and installing TD Skills.

Prerequisites

  • VS Code with a GitHub Copilot plan
  • Node.js and npm
  • A Treasure AI account with API access

Connect MCP Server (Platform)

npm install -g @treasuredata/tdx
tdx auth setup
code --add-mcp '{"name":"tdx","command":"tdx","args":["mcp"]}'

To roll this out to your team, commit .vscode/mcp.json to your repository instead of running --add-mcp on each machine:

{
  "servers": {
    "tdx": {
      "command": "tdx",
      "args": ["mcp"]
    }
  }
}

Each teammate still runs tdx auth setup individually to authenticate. If you'd rather not install tdx globally, replace the "command" value with "npx" and "args" with ["@treasuredata/tdx", "mcp"].

Connect MCP Server (Docs)

To let Copilot search Treasure AI documentation directly, add a second MCP server.

  1. Open the command palette (Command + Shift + P on macOS, Ctrl + Shift + P on Windows/Linux).
  2. Type "MCP: Add Server" and select HTTP.
  3. Enter the server URL: https://docs.treasure.ai/mcp.
  4. Enter a name for the connection (for example, td-docs).

Install TD Skills

copilot plugin marketplace add treasure-data/td-skills
copilot plugin install tdx-skills@td-skills
copilot plugin install sql-skills@td-skills
copilot plugin install workflow-skills@td-skills

See TD Skills for the full skill catalog and additional plugins.

Try It

Open Chat in Agent mode, select the Tools icon, and confirm tdx (and td-docs, if connected) appear. Then ask a question that requires querying your data:

> Which of our databases has last week's web events?

Next Steps