dft mcp¶
MCP (Model Context Protocol) server commands for AI assistant integration.
For when to use MCP vs the CLI, see CLI and MCP for AI assistants. Prefer the CLI when the agent has shell access and dft is installed; use MCP when the environment is MCP-only (VS Code/Copilot agent mode, hosted cloud copilot) or when structured tool calls are already wired up.
Subcommands¶
| Command | Purpose |
|---|---|
dft mcp serve |
Start the MCP server for AI assistant integration. |
dft mcp serve¶
Starts an MCP server that lets AI assistants like Cursor, Claude Code, Claude Desktop, and ChatGPT interact with your Dataface project. The server runs in stdio mode — the standard transport for MCP-compatible tools.
Options¶
| Flag | Description |
|---|---|
--project-dir PATH |
Dataface or dbt project directory. Default: current directory. |
Examples¶
Manual client configuration¶
In most cases, dft init mcp writes the right config for you. For manual setup of Claude Code (~/.config/claude/config.json) or Claude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json):
For a nested project directory:
{
"mcpServers": {
"dataface": {
"command": "dft",
"args": ["mcp", "serve", "--project-dir", "/absolute/path/to/project"]
}
}
}
What the MCP server exposes¶
CLI verbs wrapped as MCP tools that agents call directly:
Face authoring & validation
validate_dashboard— fast YAML schema + cross-reference validationrender_dashboard— produce SVG / HTML / PNG / PDFdescribe_dashboard— describe a dashboard's queries, charts, variables, and layout
Data discovery
search_dashboards— keyword search across face filesdocs— read packaged YAML docs
Query inspection
execute_query— run a query and return the result rowsdescribe_query— return resolved SQL, dialect, and column schemaquery_face— inspect a query defined inside a face file
Agent skills
list_skills— enumerate packaged agent skill recipesget_skill— read a specific skill
See dft skills for the agent-facing skill catalog that ships alongside.
Related¶
- CLI and MCP for AI assistants — when to use MCP vs
dftCLI commands dft init mcp— wire MCP into specific AI clientsdft chat— terminal agent backed by the same toolsdft skills— agent skill catalog