Connect an AI agent (MCP)

Give AI agents access to your Labric data through the Model Context Protocol.
View as Markdown

Labric hosts a Model Context Protocol server that exposes the Labric API as tools any MCP-compatible agent can call — Claude, Cursor, or your own agent framework.

Endpoint

The server speaks streamable HTTP:

https://mcp.labric.co/mcp

Authentication

Authenticate with a Labric API key, exactly as you would against the REST API:

Authorization: Bearer lbk_your_api_key

The MCP server holds no data of its own — every tool call forwards your key to the Labric API, which enforces scopes and row-level security. A read-scoped key can only call read tools.

Connecting

Claude Code

$claude mcp add --transport http labric https://mcp.labric.co/mcp \
> --header "Authorization: Bearer lbk_your_api_key"

Other MCP clients

Any client that supports streamable HTTP transport with custom headers works. A typical JSON configuration:

1{
2 "mcpServers": {
3 "labric": {
4 "url": "https://mcp.labric.co/mcp",
5 "headers": {
6 "Authorization": "Bearer lbk_your_api_key"
7 }
8 }
9 }
10}

Available tools

The tools mirror the API Reference one-to-one — they are generated from the same API schema.

ToolDescriptionScope
readRead records from a table with filtersread
execute_sqlRun a read-only SQL queryread
get_schemaInspect table schemasread
list_filesList files in your organizationread
get_file_contentDownload a file’s contentread
writeWrite records to a tablewrite
batch_writeWrite records to multiple tables atomicallywrite
upload_fileUpload a filewrite
revert_job_executionRevert the writes of a job executionwrite