MCP Server
Studio exposes your team's datasets, storages, knowledge base, and jobs over MCP (Model Context Protocol). Claude Code, Codex, Cursor, and other MCP clients connect to it. The agent acts with your Studio permissions and can run DataChain jobs on the team's clusters. See Tools for what it can do.
Prerequisites
- Team settings → AI features → Enable AI is on. No LLM provider is needed. Knowledge search and the knowledge index require generated pages; the enrichment tools generate them using the team's provider and budget. See Knowledge Base.
- Copy the MCP URL from Team settings → AI features → MCP server. It looks like
https://studio.datachain.ai/api/mcp/<team>.
Install the skill
pip install datachain
datachain skill install --target claude # also: --target cursor, --target codex
The skill is the instructions, MCP is the tools. The skill tells the agent to check the knowledge base before computing anything, how to name and save datasets, and which SDK rules a script must follow; MCP is how it acts on the team's data in Studio.
Connect
Start Claude Code, run /mcp, select studio, choose Authenticate, and
approve access in the browser. To share the setup through a repository, commit
.mcp.json at its root; it holds no credentials.
- Settings → Connectors → Add custom connector.
- Name:
Studio. URL: the MCP URL. Leave the advanced fields empty. - Click Add, then Connect, and approve access in the browser.
- In a chat, open the tools menu (the + button) and make sure Studio is enabled.
On Team and Enterprise plans an organization owner adds the connector once; each member then connects it. Custom connectors require a paid plan.
Approve access in the browser. Codex CLI, the Codex IDE extension, and the ChatGPT desktop app share this configuration.
Add to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json in a repository:
Open Settings → MCP and click Needs login next to studio.
- Open the Command Palette and run MCP: Add Server.
- Select HTTP, enter the MCP URL and the name
studio, and choose Global or Workspace. - Run MCP: List Servers, select studio, click Start Server, and approve access in the browser.
Follow your client's instructions for a remote server and use the MCP URL. The server
speaks Streamable HTTP and supports OAuth with dynamic client registration; request
the scopes DATASETS JOBS. If the client cannot sign in through a browser, use an
access token.
Then ask the agent:
A connected client calls the list_datasets tool and answers with dataset names from
Studio. If no tool call appears in the transcript, the client did not use the server.
Authentication
Interactive clients sign in with OAuth: the client opens the Studio sign-in page, you approve once, and the client keeps the session.
Access tokens
For CI, scripts, or agents without a browser, create a token under Personal settings → Tokens with an expiration and only the scopes and role the agent's tools need, per the tools table: DATASETS with the Read role to browse, the Write role to enrich, JOBS with the Write role to run jobs; Admin only for team-wide enrichment. Keep the token in an environment variable and reference it from the config.
.mcp.json at the project root; ${STUDIO_TOKEN} is expanded from the environment.
Permissions and safety
- The agent sees what your Studio account can see on that team, further limited by the token's scopes. See Security & Permissions.
run_jobexecutes code on the team's compute cluster. Keep your client's per-call confirmation on forrun_job,cancel_job, andenrich_all.- To revoke access, delete the token under Personal settings → Tokens. Turning off Enable AI disconnects every client of the team.
Troubleshooting
- 401, or the client keeps asking to authenticate: sign in again from the client.
- 403 "No access to team": your account is not a member of the team in the URL, or the token was created for another team.
- 403 "AI features are disabled for this team": turn on Enable AI.