Skip to content

Connect DataRecs to AI tools (MCP)

DataRecs supports the Model Context Protocol so AI tools can inspect and work with your DataRecs tenant through the same API surface used by the CLI and REST API.

There are two supported connection patterns:

Hosted MCP serverLocal CLI bridge
Where it runsDataRecs-hosted, per cellOn your own machine
Best forChat-style assistants and hosted AI toolsTrusted local agents that need to make changes
Install requiredNoneThe DataRecs CLI
CapabilityRead-only access to your tenantFull read/write access through your logged-in CLI session

Use the hosted MCP server when you want to connect an AI tool without installing the CLI.

The MCP endpoint is cell-specific:

https://mcp.<your-cell>.datarecs.io/mcp

Replace <your-cell> with the cell assigned to your account.

If your client supports MCP OAuth discovery, sign in through the browser and let DataRecs handle the session.

If your client uses a static bearer token, create a tenant API key in the Console and pass it in an Authorization header:

{
"mcpServers": {
"datarecs": {
"type": "http",
"url": "https://mcp.<your-cell>.datarecs.io/mcp",
"headers": {
"Authorization": "Bearer dtrcs:<your-api-key>"
}
}
}
}
Terminal window
claude mcp add --transport http datarecs \
https://mcp.<your-cell>.datarecs.io/mcp \
--header "Authorization: Bearer dtrcs:<your-api-key>"

datarecs mcp serve turns the CLI into a local MCP server over stdio. This is the right option when you want an AI agent to act with your own logged-in DataRecs session.

Terminal window
datarecs auth login --company your-company-slug
datarecs mcp serve

Claude Code:

Terminal window
claude mcp add datarecs -- datarecs mcp serve

Claude Desktop:

{
"mcpServers": {
"datarecs": {
"command": "datarecs",
"args": ["mcp", "serve", "--company", "your-company-slug"]
}
}
}

Cursor:

{
"mcpServers": {
"datarecs": {
"command": "datarecs",
"args": ["mcp", "serve"],
"env": {
"DATARECS_TENANT": "your-company-slug"
}
}
}
}

Before wiring a client up, inspect the available tools from the CLI:

Terminal window
datarecs mcp tools
datarecs mcp tools --search run
datarecs mcp describe get_run
datarecs mcp doctor
  • If a GUI client says the command is missing, use the absolute path from which datarecs.
  • If the hosted connector returns 401, confirm you used the correct cell URL and an API key or OAuth session for the same tenant.
  • If the local bridge cannot start, make sure datarecs auth login has been completed first.