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 server | Local CLI bridge | |
|---|---|---|
| Where it runs | DataRecs-hosted, per cell | On your own machine |
| Best for | Chat-style assistants and hosted AI tools | Trusted local agents that need to make changes |
| Install required | None | The DataRecs CLI |
| Capability | Read-only access to your tenant | Full read/write access through your logged-in CLI session |
Hosted MCP server
Section titled “Hosted MCP server”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/mcpReplace <your-cell> with the cell assigned to your account.
OAuth sign-in
Section titled “OAuth sign-in”If your client supports MCP OAuth discovery, sign in through the browser and let DataRecs handle the session.
API key connection
Section titled “API key connection”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>" } } }}claude mcp add --transport http datarecs \ https://mcp.<your-cell>.datarecs.io/mcp \ --header "Authorization: Bearer dtrcs:<your-api-key>"Local CLI bridge
Section titled “Local CLI bridge”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.
datarecs auth login --company your-company-slugdatarecs mcp serveClaude Code:
claude mcp add datarecs -- datarecs mcp serveClaude 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" } } }}Explore the tools
Section titled “Explore the tools”Before wiring a client up, inspect the available tools from the CLI:
datarecs mcp toolsdatarecs mcp tools --search rundatarecs mcp describe get_rundatarecs mcp doctorTroubleshooting
Section titled “Troubleshooting”- 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 loginhas been completed first.