Docs menu

AI assistants (MCP)

Personal access tokens

Create, use and revoke tokens for MCP clients and pipelines that can't sign in with OAuth.

Use a token when a client asks for an API key or header rather than opening a sign-in page: scripts, pipelines, servers and some editors.

Create a token

  1. 1Open Settings → AI assistants and find Personal access tokens.
  2. 2Name it after where it'll be used (for example "n8n receipt bot") and choose when it expires: 30, 90 or 365 days, or never.
  3. 3Copy the token (it starts with l1mcp_). It's shown once; LedgerOne keeps only a fingerprint of it.

Use it

Send it as a bearer token with every request:

http
Authorization: Bearer l1mcp_…

Try it with the official MCP Inspector:

bash
npx @modelcontextprotocol/inspector

Choose Streamable HTTP, enter https://finance.psycodelabs.lk/api/mcp, add the Authorization header, connect and list the tools.

Revoke a token

Press Revoke next to it in Settings → AI assistants. Requests using it stop working immediately. The list shows when each token was last used, so you can spot ones you no longer need.