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.

SurfaceUse it whenReference
Hosted MCP serverAn AI agent (Claude, Cursor, Kiro, or any MCP client) does the workAI Assistant & MCP
loxtep CLIYou work from a terminal or a CI jobCLI Reference
@loxtep/sdk and Python SDKYour own code or service reads, writes, or manages Loxtep resourcesTypeScript 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

ParameterTypeDescription
options.organization_idstring | undefinedOptional organization scope
options.project_idstring | undefinedOptional project scope
options.instance_idstring | undefinedOptional 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 403 or 404.
  • 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:

SurfaceStatusMessageDetails
MCP toolin the tool error texttool result textstructuredContent.details on the error
TypeScript SDKLoxtepError.status_codeLoxtepError.messageLoxtepError.details
Python SDKLoxtepError.status_codestr(error)LoxtepError.details
CLIprinted with the errorprinted with the errorprinted with the error

Status codes

StatusMeaning
400The request parameters or body are not valid
401Your session is missing or expired. Sign in again (loxtep login, or reconnect the MCP server)
402Plan limit reached or billing inactive. See Plan limits and billing
403You are signed in and your roles do not allow the operation. Check your permissions with loxtep_session → get_current_user
404The resource does not exist, or you cannot see it
429Rate limit exceeded. Retry with backoff
500Internal server error
503Service 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 403 and the message RBAC check failed: <database error message>. On the hosted MCP server it is an OAuth 401 with 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.