Connect Claude Code
Claude Code supports both authentication methods. Use OAuth for interactive work on your own
machine; use a machine token when you need a fixed environment, or when the client runs
unattended (scripts, CI).
Endpoint
https://mcp.lendapi.com/mcp
Option 1 — OAuth (recommended for interactive use)
Add the server:
claude mcp add --transport http lendapi https://mcp.lendapi.com/mcp/fullClaude Code loads tool definitions on demand, so it takes the full list at /mcp/full
(/mcp serves the smaller catalog meant for claude.ai, Claude Desktop and ChatGPT; both work).
Then authenticate:
- In Claude Code, run
/mcp. - Select lendapi.
- Choose the authenticate option. Your browser opens the LendAPI portal.
- Sign in (2FA and SSO are supported).
- On the consent screen, check the tenant name and click Allow access. One approval
covers Live and Sandbox; every tool takes an optionalenvironmentargument and runs in
Live unless asked for Sandbox. - The browser returns control to Claude Code and the server shows as connected.
Nothing is stored in your project. Your first approval creates a dedicated API key per
environment on the tenant (LendAPI MCP (Live) · <your email> and LendAPI MCP (Sandbox) · <your email>) that you can
revoke from Admin Portal → API Settings.
Option 2 — Machine token in a header
claude mcp add --transport http lendapi https://mcp.lendapi.com/mcp \
--header "Authorization: Bearer live_your_token_here"The token decides both the tenant and the environment:
| Token prefix | Environment |
|---|---|
live_ | Live |
test_ | Sandbox |
Create tokens in Admin Portal → Settings → Developer Settings → API settings → Add New Key.
See Authentication for the full procedure and the rules
about which environment a new key belongs to.
Keep the token out of your shell history and out of version control. Read it from your
environment instead:
claude mcp add --transport http lendapi https://mcp.lendapi.com/mcp \
--header "Authorization: Bearer $LENDAPI_TOKEN"Scopes: project vs. user
By default claude mcp add registers the server for the current project. To make it available
in every project on your machine, add a user scope:
claude mcp add --scope user --transport http lendapi https://mcp.lendapi.com/mcpUse separate names for separate environments so you can tell them apart:
claude mcp add --transport http lendapi-live https://mcp.lendapi.com/mcp \
--header "Authorization: Bearer $LENDAPI_LIVE_TOKEN"
claude mcp add --transport http lendapi-sandbox https://mcp.lendapi.com/mcp \
--header "Authorization: Bearer $LENDAPI_TEST_TOKEN"Verify
claude mcp listThen in Claude Code:
List the decision workflows in my LendAPI tenant.
Managing the connection
# Inspect a single server's configuration
claude mcp get lendapi
# Remove it
claude mcp remove lendapiTo rotate a header token, remove the server and add it again with the new token. To change the
environment on an OAuth connection, remove it, add it again, and pick the other environment on
the consent screen.
Notes and limits
- Workflow authoring works only on a Live connection. A sandbox token or a sandbox-approved
OAuth connection can read applications, decisions, and products, but authoring tools are not
yet supported there. - Action tools (
app_update_stage,app_create_manual_offer,app_add_note) require a
live-mode token. - Claude Code asks for permission before running a tool that writes. Approve those one at a
time rather than granting a blanket allow.
Troubleshooting
| Symptom | What to do |
|---|---|
401 on every call | The token is wrong, expired, or the key was switched off in API Settings. |
403 on a specific tool | The token's tenant does not have access to that resource. |
| Authoring tools fail on a sandbox connection | Expected — use a Live connection to author. |
More in Troubleshooting.
See also
Updated about 14 hours ago

