New Light partners with Greenstep to bring agentic finance to the NordicsLight partners with Greenstep Read the announcement

Connect your AI assistant to Light

Category
AI Features
Guide
Admin guides
Reading
9 min read
On this page
  1. 01On this page
  2. 02What the MCP integration does
  3. 03Connect by signing in
  4. 04Connect with an MCP token
  5. 05Configure your AI client
  6. 06Verify the connection
  7. 07Manage your tokens
  8. 08Permissions, logging and limits
  9. 09Troubleshooting
  10. 10Frequently asked questions
  11. 11Related articles

What is this page about: How to connect an AI assistant such as Claude, ChatGPT or Codex to Light, so it can look up your Light data and do tasks for you. It covers both ways to connect, what Light sees and records, how permissions and limits apply, how to manage tokens, and how to fix common errors.

On this page

  • What the MCP integration does
  • Connect by signing in
  • Connect with an MCP token
  • Configure your AI client
  • Verify the connection
  • Manage your tokens
  • Permissions, logging and limits
  • Troubleshooting
  • Frequently asked questions
  • Related articles

What the MCP integration does

Light's MCP integration connects an AI assistant such as Claude, ChatGPT or Codex to your Light account. You can ask it to look up balances and transactions, find invoices, check vendors or run reports. It can also do tasks for you, such as marking an invoice as paid, approving a task or creating a contract. It works with more than 100 Light tools, plus tools from any App Store apps you've installed.

The assistant runs with your AI client's provider, for example Anthropic for Claude, or OpenAI for ChatGPT and Codex. Each time it needs Light, it sends a request naming the tool and the details it's using, such as an invoice number, and Light sends back the result. Your conversation stays with your AI client.

Every Light user can connect. The assistant acts as the user who connected it, with that user's role and permissions.

There are two ways to connect:

  • Sign in: Where your AI client supports it, you sign in with your Light account. This includes Claude on the web, Claude Desktop and ChatGPT.
  • MCP token: Any client that connects to MCP servers over Streamable HTTP can use a token, including Claude Code, Codex, OpenCode and n8n.

Connect by signing in

Claude on the web, Claude Desktop and ChatGPT connect with a sign-in. You add Light as a connector and sign in with your Light account, so no token is needed.

Claude

  1. In Light, open Settings → Profile and go to MCP tokens.
  2. Click Copy URL. The URL is https://api.light.inc/mcp.
  3. In Claude, open Customize, then Connectors.
  4. Click + and choose Add custom connector.
  5. Paste the URL and click Add.
  6. Click Connect and sign in to Light.

On a Claude Team or Enterprise plan, an Owner adds the connector for the whole organization first, from Organization settings → Connectors → Add → Custom → Web. Members then click Connect on it.

To disconnect, remove Light from Claude's connector settings. You manage connector access in Claude. The MCP tokens list in Light shows only the tokens you've created.

Claude Desktop extension

If your version of Claude Desktop has no custom connector option, use Light's extension, which connects with a token:

  1. In Light, open Settings → Profile and go to MCP tokens.
  2. Click Download bundle.
  3. Double-click the downloaded light-mcp.mcpb file. Claude Desktop opens.
  4. Click Install.
  5. Create a token (see the next section) and paste it into Claude Desktop.
  6. Click Save.
  7. Toggle the extension to Enabled.

ChatGPT

  1. In Light, open Settings → Profile and go to MCP tokens.
  2. Click Copy URL. The URL is https://api.light.inc/mcp.
  3. In ChatGPT, go to Plugins.
  4. Click + and choose Add custom MCP server.
  5. Enter a name, such as Light, and a short description.
  6. Under Connection, paste the URL.
  7. Set up authentication with OAuth, review the risk warning and click I understand and want to continue.
  8. Click Create as a plugin.
  9. Sign in to Light when ChatGPT asks, then review the Light tools it finds.

Workspace policies in ChatGPT control who can add a custom MCP server, so on a workspace plan, check with your ChatGPT admin.

To disconnect, remove the Light plugin in ChatGPT.

Connect with an MCP token

Claude Code, Codex, OpenCode, n8n and similar tools connect with a token instead of a sign-in.

  1. Open Settings → Profile and go to MCP tokens.
  2. Click Add.
  3. In the Create MCP token dialog, enter a Name, for example AI assistant - MacBook.
  4. Check the Expiration date. It's set to 90 days from today. You can change it, or clear it for a token that never expires.
  5. Click Create.
  6. Copy the token from the New MCP token dialog. It starts with lmcp_, and this is the only time Light shows it.
  7. Turn on I have saved my token.
  8. Click Done.

Each user can have up to 20 active tokens. Expired tokens count toward the 20 until you revoke them.

Configure your AI client

Claude Code

Run this command once, with your token in place of lmcp_your_token_here, then restart Claude Code. The --scope user option makes Light available in all your projects.

claude mcp add --transport http --scope user light-mcp https://api.light.inc/mcp --header "Authorization: Bearer lmcp_your_token_here"

Codex

The Codex CLI and the Codex IDE extension share the same settings file.

  1. Add your token to your shell profile (~/.zshrc, ~/.bashrc or equivalent), then reload the shell:
export LIGHT_MCP_TOKEN="lmcp_paste_your_token_here"
source ~/.zshrc   # or ~/.bashrc
  1. Open ~/.codex/config.toml and add a light entry:
[mcp_servers.light]
url = "https://api.light.inc/mcp"
bearer_token_env_var = "LIGHT_MCP_TOKEN"
  1. Restart Codex. To check that Light is listed, run codex mcp list or type /mcp in Codex.

OpenCode

  1. Add your token to your shell profile (~/.zshrc, ~/.bashrc or equivalent), then reload the shell:
export LIGHT_MCP_TOKEN="lmcp_paste_your_token_here"
source ~/.zshrc   # or ~/.bashrc
  1. Open ~/.config/opencode/opencode.json and add a light entry under mcp:
{
    "$schema": "https://opencode.ai/config.json",
    "mcp": {
        "light": {
            "type": "remote",
            "url": "https://api.light.inc/mcp",
            "headers": {
                "Authorization": "Bearer {env:LIGHT_MCP_TOKEN}"
            }
        }
    }
}

If OpenCode shows ⚠ needs authentication, open a new terminal where LIGHT_MCP_TOKEN is set, then relaunch OpenCode.

n8n

Follow the walkthrough: Connect Light's MCP server from n8n

Other AI clients

Any AI client that connects to MCP servers over Streamable HTTP can use https://api.light.inc/mcp with the header Authorization: Bearer lmcp_....

Verify the connection

Ask your AI assistant: "What Light tools do you have available?" When it's connected, it lists Light's tools. If it lists none or shows an error, see Troubleshooting below.

Manage your tokens

Your tokens are listed in Settings → Profile → MCP tokens, each with an Active or Revoked badge. Expired tokens also show Active, so open a token to see its expiry date.

A token's details show its status, masked value, created date, expiry date and when it was last used. Last used refreshes at most every 5 minutes. Light stores only a one-way hash of each token.

To revoke a token:

  1. Open the token.
  2. Click Revoke token.

The token stops working straight away, and the next request that uses it gets a 401 error. Revoking is permanent, so create a new token if you need access again.

Each user manages their own tokens. A Company Admin can cut off another user's access by deactivating that user, or narrow it by changing their role.

Permissions, logging and limits

  • Permissions: The assistant can do exactly what the connected user can do in Light, and every tool checks that user's role. To limit what it can reach, connect it as a dedicated Light user with a role that covers only the work it needs.
  • Viewing and changing data: Every connection can both view and change data, within the user's role. Light labels each tool as read or write and tells the assistant to ask you before it makes a change. In Light's own web, mobile, Slack and Teams apps, Light also waits for you to confirm each change. With an external assistant such as Claude, ChatGPT or Codex, asking is up to the assistant.
  • Activity history: Changes made through an AI assistant appear in each record's activity history under the connected user, the same way as changes made in the app.
  • What Light records: Light logs each request in its internal server logs, with the details the assistant sent, the company and the user. Results go back to the assistant without being stored.
  • Rate limits: Each user can make up to 300 requests a minute, including requests that list the available tools. Each company has a daily allowance of 110,000 requests by default, which is the API allowance plus extra room for AI assistants. Over a limit, the assistant gets error -32000 with a hint about when to try again. The same error with "Retry shortly" means too many requests were running at once.

Troubleshooting

Symptom Likely cause Fix
401 Unauthorized The token is revoked, expired or was entered incorrectly Open the token in Settings → Profile → MCP tokens and check its status and expiry date. Create a new token if needed.
Tools list is empty or shorter than expected The connected user's role covers fewer tools, or the tool is in early access for selected companies Check the user's roles in the Roles column on the Users page
OpenCode shows ⚠ needs authentication LIGHT_MCP_TOKEN was missing from the session OpenCode launched from Open a new terminal with the variable exported, then relaunch OpenCode
{"error":{"code":-32601}} The AI client sent a request Light can't handle, often because the client is out of date Update the AI client to its latest version
Error -32000 with a retry hint The user or company reached a rate limit, or too many requests were running at once Wait for the time in the hint, or retry shortly
Any other error A network issue or a temporary Light server issue Check your connection and retry. If it keeps happening, contact Light support with the exact error and the AI client you're using.

Frequently asked questions

Does Light see my conversation with the AI?

Light sees each request the assistant sends, with the details it's using. The rest of the conversation stays with your AI client.


Can an AI assistant do more than I can in Light?

The assistant has exactly your role and permissions, so it can do what you can do in Light and no more.


Can I give an AI assistant read-only access?

Every connection can both view and change data within the connected user's role. To narrow what an assistant can do, connect it as a Light user whose role covers only what it needs.


Which AI clients can connect?

Claude on the web, Claude Desktop, ChatGPT, Claude Code, Codex, OpenCode, n8n, and any other client that connects to MCP servers over Streamable HTTP.


Also searched as: Claude connector, Light MCP server, MCP token, connect Claude to Light, lmcp token, Claude Desktop extension, connect Codex to Light, Codex MCP, connect ChatGPT to Light, ChatGPT MCP, AI assistant security, revoke MCP token.

Was this article helpful?