MCP
¶
This page documents the Model Context Protocol (MCP) server for LaminHub.
MCP connects AI applications to LaminHub so they can retrieve and manage data in a LaminDB instance on behalf of the authenticated user.
Warning
MCP support is experimental. Tools and behavior may change before a stable release.
Available tools¶
The server currently provides the following tools. Tool availability and the data returned depend on the authenticated user’s permissions.
Tool |
Description |
|---|---|
|
Attach a label to a record. |
|
Delete multiple records. |
|
Register an artifact from an existing storage path. |
|
Create records. |
|
Create a transform in an instance. |
|
Delete a record. |
|
Remove a label from a record. |
|
Run a registered function for a transform. |
|
Export a record and its related records. |
|
Retrieve artifact metadata for a storage path. |
|
Retrieve the authenticated user’s account. |
|
Retrieve a record by ID or UID. |
|
Query records from a model. |
|
Return relation counts for a record. |
|
List models related to a schema model. |
|
Query hierarchical relatives of records. |
|
Discover instance models or inspect a model’s schema. |
|
Query values for a model field. |
|
Aggregate records by selected dimensions. |
|
List spaces attached to an instance. |
|
List instances available to the authenticated user. |
|
Merge one branch into another. |
|
Query features linked to records. |
|
Register a form on an instance. |
|
Update existing records. |
Connect¶
Configure your MCP client with the hosted HTTP endpoint and a Lamin JWT. For example:
{
"mcpServers": {
"laminhub": {
"type": "http",
"url": "https://<laminhub-domain>/api/mcp",
"headers": {
"Authorization": "Bearer <lamin-jwt>"
}
}
}
}
Replace <laminhub-domain> with the domain for your deployment and
<lamin-jwt> with a JWT obtained from your Lamin API key. See
Authentication for how to obtain a JWT.
Because Lamin JWTs expire, obtain a new one from your API key when needed.
Connect Codex¶
In Codex, select Plugins → MCP → Add → Add Custom MCP Server. Give the
server a name, such as laminhub, enter
https://<laminhub-domain>/api/mcp, and select No Authentication.
Then add the MCP server for your LaminHub deployment to
~/.codex/config.toml:
[mcp_servers.laminhub]
url = "https://<laminhub-domain>/api/mcp"
bearer_token_env_var = "LAMIN_ACCESS_TOKEN"
Replace <laminhub-domain> with the domain for your deployment, as described
above. Set LAMIN_ACCESS_TOKEN to your Lamin JWT, then restart Codex from the
same shell so it inherits the environment variable. For example, on macOS:
export LAMIN_ACCESS_TOKEN="<lamin-jwt>"
open -a Codex
Connect GitHub Copilot¶
In GitHub Copilot, select Customize → MCP → + Add Server. Enter
https://<laminhub-domain>/api/mcp, replacing <laminhub-domain> with the
domain for your deployment. Select HTTP as the transport, then add this
header:
Authorization: Bearer <lamin-jwt>
Replace <lamin-jwt> with your Lamin JWT.