LendMCP authentication and permissions

Every LendMCP request carries a credential that identifies your tenant and your environment.
There are two ways to supply it:

MethodBest forWhat you handle
OAuthclaude.ai, Claude Desktop, ChatGPT developer mode, Claude CodeNothing — you sign in to the LendAPI portal and approve
Machine tokenClaude Code, scripts, CI, other MCP clientsOne token string, kept in a secret store

Both methods end up at the same place: a request authenticated as one tenant, in one
environment, with the permissions that tenant already has.

Endpoint

https://mcp.lendapi.com/mcp

OAuth

What you see

  1. You paste the endpoint URL into your client and click Connect.
  2. The client finds LendMCP's authorization metadata and registers itself automatically. There
    is no client ID or secret for you to create.
  3. Your browser opens the LendAPI portal login. Sign in as you normally would — 2FA and SSO
    are supported. If you are already signed in, you go straight to the next step.
  4. A consent screen shows:
    • the client that is asking, and the host it will return you to,
    • your tenant name and the account you are signed in as,
    • what the connection will be allowed to do,
    • which environments it covers: Live and Sandbox, or Live only when your account has
      no sandbox workspace yet.
  5. You click Allow access (or Cancel to abort).
  6. You are returned to the client, connected. Each tool call runs in Live unless the
    assistant passes environment: sandbox; it names which one it used.

Signing in through the LendAPI portal is the only way to authorize an OAuth connection. If your
client can send request headers directly (for example a script or CLI), use
machine-token authentication instead of OAuth.

The dedicated API key

The first time you approve a connection for an environment, LendAPI creates a dedicated API
key
on your tenant for you and that environment:

EnvironmentKey name
LiveLendAPI MCP (Live) · [email protected]
SandboxLendAPI MCP (Sandbox) · [email protected]

Facts worth knowing:

  • It is created automatically, on your first approval, and reused on every later
    re-authorization by you for that environment. Each user who approves gets their own key, so a
    connection always carries the role of the person who approved it.
  • It requires an active paid plan. API access is part of the plan; if the tenant's plan does
    not include it, the consent screen says so and no key is created.
  • It is visible in Admin Portal → Settings → Developer Settings → API settings, listed
    by name alongside your other keys.
  • It is separate from every other key you use. MCP connections never ride on the key your
    other integrations use, so revoking one never breaks the other.
  • It is your off switch. Switching the key off (or deactivating it) disconnects every client
    that user authorized, immediately. Deactivating the user does the same.

Token lifetimes

TokenLifetimeBehavior
Access token8 hoursRefreshed silently by the client; you see nothing
Refresh token90 days, slidingEvery refresh issues a fresh pair, so a client in regular use stays connected indefinitely

A connection only goes stale if it sits unused for 90 days. Then the client asks you to sign in
again. Restarting your machine or your client does not disconnect you.

Revoking OAuth access

Pick whichever fits:

To do thisDo that
Disconnect one client, keep othersRemove the connector in that client
Disconnect one user's MCP clients on an environment, immediatelySwitch off that user's LendAPI MCP (Live) · … or LendAPI MCP (Sandbox) · … key in Admin Portal → API Settings
Disconnect every MCP client on the tenantSwitch off every LendAPI MCP (…) key
Change environment on a connectionDisconnect the connector, add it again, pick the other environment

Switching the dedicated key back on does not restore the old connections — reconnect the client.


Machine tokens

A machine token is a long-lived string you send as a header:

Authorization: Bearer live_your_token_here

Creating one

  1. Sign in to the LendAPI portal as an admin.
  2. Go to Settings → Developer Settings → API settings.
  3. Put the portal in the environment you want the key for — Live or Sandbox. This is
    what decides the new key's environment.
  4. Click Add New Key, give it a name that says where it will be used (for example
    "Claude Code — Bob", "CI pipeline"), and submit.
  5. Reveal the key with the eye icon, copy it with the copy icon, and store it in a secret
    manager.

Creating keys requires an admin role and a plan that includes API access.

Prefixes and environment

PrefixEnvironmentData
live_LiveProduction applications, products, and workflows
test_SandboxTest applications and data

The prefix is not decoration — it is how the platform routes the request. One token means one
tenant and one environment; a tool call that asks for the other environment gets a clear
validation error. To work in both environments from a header connection, create two tokens and
register two servers under different names — or connect with OAuth sign-in, which carries both.

Using one

Claude Code:

claude mcp add --transport http lendapi https://mcp.lendapi.com/mcp \
  --header "Authorization: Bearer $LENDAPI_TOKEN"

Any other MCP client:

{
  "mcpServers": {
    "lendapi": {
      "type": "http",
      "url": "https://mcp.lendapi.com/mcp",
      "headers": {
        "Authorization": "Bearer live_your_token_here"
      }
    }
  }
}

Rotating and revoking

  • Rotate: create a new key, update the client to use it, then switch the old key off.
  • Revoke: switch the key off in Admin Portal → API settings (the toggle in the Status
    column). Requests using it start failing immediately with
    Invalid or expired API token.
  • Name keys per consumer. One key per client or pipeline means you can cut off one consumer
    without disturbing anything else.

What a connected client can do

Be clear-eyed about this before you approve a connection. A connected client, acting on your
prompts, can:

CategoryEffect
Read workflow configurationList and inspect variables, outcomes, decision trees and their versions, and products
Author workflowsCreate variables and outcomes, create and modify decision trees, submit versions, promote a version to default, and run a tree against test values
Read applicationsStage and status, computed variable values, provider results, decision outcomes, document statuses — always PII-filtered
Change applicationsApprove, decline, request documents, withdraw; create a manual offer; add an underwriter note

Boundaries that always hold:

  • One tenant. The credential fixes the tenant. Tools do not accept a tenant parameter and
    cannot reach another tenant's data.
  • One environment. Live and Sandbox never mix within a connection.
  • No PII. Applicant names, SSNs, addresses, emails, phone numbers, and dates of birth are
    stripped from application and provider responses before the assistant sees them. Raw provider
    responses are never returned.
  • No credentials in output. Tools never echo tokens or upstream authentication details.
  • Authoring works in both environments. Variables, outcomes, decision trees, products and
    pages can be authored with a Sandbox key; variables_create_derived is the one Live-only
    write.

Actions are irreversible in the sense that matters: a stage change records an outcome, triggers
your webhooks, and writes to the application's history. Treat app_update_stage and
app_create_manual_offer as production changes.

Reducing what a client can do

  • Turn tools off. Most clients let you disable individual tools on a connector. Disabling
    app_update_stage, app_create_manual_offer, and app_add_note gives you a read-only
    underwriting assistant.
  • Approve writes one at a time. Keep your client's confirmation prompts on rather than
    granting a blanket allow for write tools.
  • Use Sandbox for exploration. A sandbox connection cannot touch production applications.
  • Use narrow tokens per consumer so revocation is surgical.

Auth errors

ResponseMeaningFix
401 with a WWW-Authenticate challengeNo credential was sent, or the OAuth access token expiredOAuth clients start the sign-in flow automatically; header clients need a valid token
{"error": "Invalid or expired API token", "status": 401}LendAPI rejected the token — wrong value, or the key was switched offCheck the key in API Settings; rotate or reconnect
{"error": "Token does not have access to this resource", "status": 403}The token's tenant cannot reach that resourceConfirm you are on the right tenant and environment, and that the record belongs to it

More detail in Troubleshooting.

See also


Did this page help you?