# MCP Server (Platform)

`tdx mcp` command exposes the MCP server for AI tools, so agents can query databases, manage segments, and run workflows in your Treasure AI environment directly from natural-language prompts. Use it when you want an AI coding tool to operate on your data, not just search documentation.

## Set Up and Run MCP Server (Platform)

```bash
npm install -g @treasuredata/tdx
tdx auth setup
tdx mcp
```

## Available Tools

| 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

For the full tool reference, blocked commands, and troubleshooting, see the [tdx mcp command reference](/treasure-code/commands/mcp).

## Connect Your Tool

Claude Code, OpenAI Codex, VS Code, and Cursor can all connect to MCP Server (Platform). See [Connect Your AI Coding Tool](/getting-started/ai#connect-your-ai-coding-tool) for tool-specific setup steps. For other MCP clients (Claude Desktop, Windsurf), see the [tdx mcp command reference](/treasure-code/commands/mcp).

## Next Steps

- [tdx mcp command reference](/treasure-code/commands/mcp) — full tool reference, blocked commands, and troubleshooting
- [MCP Server (Docs)](/getting-started/ai/mcp-server-docs) — search documentation instead of operating on data
- [Connect Your AI Coding Tool](/getting-started/ai#connect-your-ai-coding-tool)