API / Getting started
Using Light from an AI client
Light's MCP server for Claude and other AI clients: how it differs from the REST API, and what an agent reading this reference should know.
Light exposes the same data and actions two ways: the REST API documented on this site, and an MCP server (Model Context Protocol) that AI assistants such as Claude call directly. If you are reading this as an agent, or setting one up, this page says which to use.
Which one
| REST API | MCP server | |
|---|---|---|
| Caller | Your code, on a schedule or in a workflow | An AI assistant acting for a signed-in person |
| Credential | API key (Authorization: Basic …) or OAuth token |
Personal lmcp_… token, or OAuth 2.1 through the Claude connector |
| Acts as | A service account with the roles you gave the key | The person who connected, with their roles |
| Amounts | Integers in minor units (1250 is 12.50) |
Decimals in major units (12.5); field names end in InMajors |
| Surface | Every endpoint on this site | Roughly a hundred tools: search and read across master data, documents and reports; create and submit; approve; and flagged write operations |
| Discover | This site, and /docs/llms.txt |
tools/list at runtime. The list is filtered to what the caller may do. |
API keys cannot call the MCP server, and MCP tokens work only on the MCP endpoint. They are different principals with different audiences.
Connecting
Setup is in the product under Settings → Profile → MCP Tokens: create a token (shown once, lmcp_ prefix, up to 20 active per user, optional expiry) and point your client at
https://api.light.inc/rest/ext/mcp
with Authorization: Bearer lmcp_…. Claude.ai and Claude Desktop users connect through the Light connector instead and sign in with their Light account; no token needed. Step-by-step instructions for Claude Code, OpenCode, n8n and other clients are in the help centre: Connect your AI assistant to Light.
The server speaks JSON-RPC 2.0 over HTTP POST (initialize, tools/list, tools/call, ping). Rate limiting is reported as a JSON-RPC error inside a 200 response rather than an HTTP 429, so the session survives and the client can back off.
If you are an agent reading the REST reference
- The five Concepts pages are short and explain the rules the endpoint notes assume: why entries balance, how amounts are signed, which status changes are verbs.
- Every page here has a markdown twin: append
.mdto its URL./docs/llms.txtindexes them, and/docs/llms-full.txtis the whole reference in one file. - Each endpoint's Note records behaviour the OpenAPI spec gets wrong or omits, verified against Light's source. Read it before the field list.
- Example payloads are generated from the schema unless the page says otherwise: shapes are real, values are placeholders, and fields that exclude each other are all shown. Do not send a generated example unchanged.
- The MCP server also exposes Light's help articles as tools, for "how do I" questions about the product rather than the API.