Platform Access Reference
You reach Loxtep through one of three supported surfaces. Each one handles sign-in and request signing for you, and each one exposes the same Connect, Products, Meaning, Use, Inbox, and Observe jobs.
| Surface | Use it when | Reference |
|---|---|---|
| Hosted MCP server | An AI agent (Claude, Cursor, Kiro, or any MCP client) does the work | AI Assistant & MCP |
loxtep CLI | You work from a terminal or a CI job | CLI Reference |
@loxtep/sdk and Python SDK | Your own code or service reads, writes, or manages Loxtep resources | TypeScript SDK, Python SDK |
Agents call the loxtep_* MCP tools with an operation name. Scripts use the CLI or an SDK client. Calling the platform's HTTP routes yourself is not a supported way to integrate with Loxtep.
SDK client signature
The SDK client is the entry point for code that talks to Loxtep.
const client = await LoxtepClient.fromWorkspace(options?);
Parameters
| Parameter | Type | Description |
|---|---|---|
options.organization_id | string | undefined | Optional organization scope |
options.project_id | string | undefined | Optional project scope |
options.instance_id | string | undefined | Optional runtime instance scope |
Returns
Promise<LoxtepClient>, signed in as the user from loxtep login.
Example usage lists the source data products in the current workspace:
import { LoxtepClient } from '@loxtep/sdk';
const client = await LoxtepClient.fromWorkspace();
const products = await client.build.data_products.list({ kind: 'source' });
The same job from an agent is loxtep_build → list_data_products, and from a terminal it is loxtep data-products list. See the TypeScript SDK Reference for constructor options used in CI and services.
Errors
Every surface reports a failure with the same three parts:
- Status — an HTTP-style status such as
403or404. - Message — a human-readable explanation.
- Details — extra context, when there is any. A machine-readable code, when the error has one, is
details.code.
Where to find them:
| Surface | Status | Message | Details |
|---|---|---|---|
| MCP tool | in the tool error text | tool result text | structuredContent.details on the error |
| TypeScript SDK | LoxtepError.status_code | LoxtepError.message | LoxtepError.details |
| Python SDK | LoxtepError.status_code | str(error) | LoxtepError.details |
| CLI | printed with the error | printed with the error | printed with the error |
Status codes
| Status | Meaning |
|---|---|
400 | The request parameters or body are not valid |
401 | Your session is missing or expired. Sign in again (loxtep login, or reconnect the MCP server) |
402 | Plan limit reached or billing inactive. See Plan limits and billing |
403 | You are signed in and your roles do not allow the operation. Check your permissions with loxtep_session → get_current_user |
404 | The resource does not exist, or you cannot see it |
429 | Rate limit exceeded. Retry with backoff |
500 | Internal server error |
503 | Service temporarily unavailable. When details.code is PERMISSION_RELOAD_FAILED, Loxtep could not reload your permissions for that request. Your session is still valid: retry with backoff instead of signing in again |
A permission reload failure is HTTP 503 with this public message. Retry with backoff. Do not sign in again or reconnect MCP; the session is still valid. details.cause_class is optional and for support and triage only — include it if you open a ticket. It does not change the retry action, and it may be absent.
{
"message": "Unable to reload permissions. Please try again later.",
"details": {
"code": "PERMISSION_RELOAD_FAILED",
"cause_class": "timeout"
}
}
When present, cause_class is one of timeout, connection_refused, connection_reset, dns_failure, query_failed, db_unavailable, missing_user_id, or unknown. Host names, SQL, credentials, and user_id are never returned.
The hosted MCP stream POST and DELETE return the same 503 body, not an OAuth 401, so MCP clients should retry rather than re-authenticate.
Known issue: The 503 covers only the permission reload. Loxtep also reads role permissions when the permissions loaded for you do not already allow the operation. If that read fails, the operation is refused with
403and the messageRBAC check failed: <database error message>. On the hosted MCP server it is an OAuth401with that message instead. This is temporary, not a change to your roles: retry later.
Plan limits and billing (402)
A plan limit or inactive billing returns status 402 with the code plan_limit_exceeded or billing_inactive. A plan limit error also carries these fields (values illustrative):
{
"message": "Plan limit exceeded for data_products",
"code": "plan_limit_exceeded",
"metric": "data_products",
"limit": 3,
"current": 3,
"plan_id": "<plan id>",
"upgrade_url": "/org/billing"
}
metric is data_products, team_members, or events_processed. A billing_inactive error has the message "Billing is inactive", code, plan_id, status (restricted or suspended), and upgrade_url. Send users to upgrade_url (the billing page) to upgrade or fix billing.