Connect DataLion to Claude and other AI clients (MCP)
Through the Model Context Protocol (MCP), AI clients such as Claude work directly with your DataLion projects. An agent can read projects and codebooks, fetch weighted results tables and, if you allow it, import data or build reports. Since DataLion 2026.2.198, every instance has its own MCP endpoint. Clients that support remote MCP no longer need any local add-on.
Requirements
- An administrator account. MCP access is open to administrators only. User API tokens are refused.
- An AI client that supports remote MCP: either with a DataLion sign-in (custom connectors in Claude, ChatGPT in developer mode) or with a bearer token, for example Claude Code. For Claude Desktop there is also the local extension, see below.
- For the remote endpoint: DataLion release 2026.2.198 or later. For connecting by sign-in: release 2026.2.199 or later.
Connect by signing in (Claude and ChatGPT)
Since release 2026.2.199, supported AI clients connect without a token. The client opens a DataLion sign-in, and an administrator approves the connection. The pages Admin → AI → Claude and Admin → AI → ChatGPT show your instance’s MCP address under Connection values and the steps in each client.
Claude (claude.ai and Claude Desktop):
- In Claude, open Settings → Connectors and choose Add custom connector.
- Name it “DataLion” and paste the MCP server URL from DataLion.
- Choose Connect. Claude opens the DataLion sign-in.
ChatGPT:
- In ChatGPT, turn on developer mode under Settings → Apps & Connectors → Advanced settings. Your ChatGPT plan has to allow custom connectors.
- Create a new connector, paste the MCP server URL and choose OAuth as the sign-in method.
Approval in DataLion: After signing in, DataLion shows the Connect an AI client page asking whether the client may use DataLion. Choose the access level (Read-only integration, Analyst, Report builder or Admin builder, see the list in the next section) and click Allow access. Only administrators can approve.
Manage connections: Connected by sign-in on the same page lists every connected client with its access level and when it connected. Revoke ends a connection immediately. Without a revoke, an approval expires after 90 days and the client signs in again. A connection that goes unused for 30 days also needs a fresh sign-in.
Create a token for the agent
- Open Admin → Integrations → API access.
- Enter a Token name, for example “Claude Code laptop”.
- Choose the Purpose. It decides which tools the agent sees:
- Power BI: 4 tools, read projects only.
- Read-only integration: 13 tools, read projects, data, reports, results tables, codebooks and documents.
- Analyst: 16 tools, plus data imports.
- Report builder: 32 tools, plus editing reports, tabs, widgets, text boxes, codebooks and documents.
- Admin builder: all 34 tools, plus creating and editing projects.
- Choose the Expiry (30, 90 or 365 days), click Create API token and copy the token.
Start with Read-only integration. Grant more rights only once the agent needs to write.
Connect the remote endpoint
The endpoint is https://<your DataLion address>/mcp. The client sends the token in the header Authorization: Bearer <token>.
In Claude Code you set up the connection with one command:
claude mcp add --transport http datalion https://<your DataLion address>/mcp --header "Authorization: Bearer <token>"
Other clients take the same two values, URL and header. Then ask the agent something like “Which projects are in DataLion?” to test the connection.
What an agent can do
The tools follow the token’s rights. With read rights, an agent can list projects, search codebooks, read reports and tabs and fetch weighted results tables with get_chart_table. These results carry a signed receipt that traces a figure back to its calculation. With write rights, it creates reports, tabs, charts and text boxes, generates codebooks or uploads data.
Files never travel through the MCP connection itself. For uploads, DataLion creates a one-time link that you open in the browser.
Every call is logged
DataLion writes every tool call with user, token, client, tool, project, status and duration to the admin log. You see the last 100 entries under Admin → Maintenance in the Admin log section. Revoke a token you no longer need under Admin → Integrations → API access.
The local Claude extension
For Claude Desktop, the local extension is still available. It runs on your computer and talks to DataLion through the API.
- Open Admin → Integrations → AI and the Claude tab.
- Download the
.mcpbfile with Download DataLion Claude extension. - Install it in Claude Desktop under Settings → Extensions → Install Extension.
- Enter the DataLion address and an API token.
The extension starts read-only. You switch on write tools explicitly in its settings.
Security
- An agent only sees the tools its token’s purpose allows, and only projects the account has access to.
- Tokens expire after 30, 90 or 365 days.
- Error messages from the MCP endpoint contain no internal details.