Skip to main content

MCP Server

Datadata provides a standard MCP (Model Context Protocol) service endpoint, allowing AI agents to interact with the Datadata platform as if calling local tools.

datadata-mcp is the skill that instructs agents on how to use the MCP Server.

Installing the datadata-mcp Skill

npx skills add datadata-team/datadata-skills

Once installed, agents can interact with Datadata through the following MCP tools.

MCP Endpoint

https://www.datadata.com/api/mcp/v1

Authentication

When configuring the MCP client, choose OAuth. The browser will redirect to Datadata for authorization. This is the most standard and convenient method, supported by Claude Desktop, VS Code, Cursor, Windsurf, Claude Code, and other MCP clients.

API Key Authentication

You can also authenticate via API Key:

  1. Log in to datadata.com → Settings → API Keys
  2. Create a new key and select the required permissions
  3. Configure it in your MCP client

Recommended Permissions:

PermissionPurpose
queries:execute-adhocRun SQL queries
executions:getRetrieve query results
datasources:readRead datasource information
datasources:scanScan datasource structure
datasources:replace-fileReplace datasource files
data-spaces:writeCreate tables and insert data

MCP Tools

Datasource Discovery & Metadata

ToolPurposeKey Parameters
search-datasourceSearch for datasourcessearch — username or keyword
get-datasource-infoGet datasource metadatadatasourceId
list-tablesList tables and viewsdatasourceId, schemaName (optional)
describe-tableGet table column structure (cached metadata with comments)datasourceId, schemaName, tableName
scan-datasourceTrigger async schema scandatasourceId
set-table-commentSet table/column commentsdatasourceId, schemaName, tableName

Data Querying

ToolPurpose
execute-adhocExecute SQL/DQL queries, returns execution ID and result download link

Data Spaces Management

ToolPurposeKey Parameters
create-tableCreate a table with column names and typesdatasourceId, tableName, columns
describe-data-space-tableView table structure in real-timedatasourceId, tableName
insert-rowsBatch insert data (transactional)datasourceId, tableName, columns, rows
drop-tableDelete a tabledatasourceId, tableName

Query Engine & SQL Writing

Engine Selection

  • Default to duckdb engine
  • Switch to clickhouse only for ClickHouse datasources
  • DuckDB supports cross-datasource JOINs; ClickHouse does not

Datasource Binding

Bind datasources via the datasources parameter, format:

["DATASOURCE_ID:ATTACH_ALIAS"]

Reference tables in SQL by alias, not datasource ID.

Table Naming Conventions

Ducklake (Data Spaces):

ducklake.{datasourceName}.{tableName}

Database datasources (MySQL, PostgreSQL, etc.):

attachAlias.schemaName.tableName

File datasources (CSV, JSON, Parquet, etc.):

memory.main.attachAlias

Data Spaces

Data Spaces are the table management capability exclusive to ducklake-type datasources.

Full Workflow

create-table → describe-data-space-table → insert-rows → execute-adhoc → drop-table

Result Handling

execute-adhoc returns an execution ID and a result download link (NDJSON/CSV). Agents download to local storage using curl for preview.

Do not read full large datasets directly into context.

Configuration Example

{
"mcpServers": {
"datadata": {
"command": "npx",
"args": ["-y", "@datadata/mcp-server"],
"env": {
"DATADATA_API_KEY": "ak_xxxxxxxxxxxxxxxx"
}
}
}
}