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
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.
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.