Connect LendingWise to Claude: Track Pipeline Status and Loan Files
Learn how to connect LendingWise to Claude using Truto's managed MCP server. Automate loan origination, pipeline tracking, and broker assignments via AI.
If your team needs to connect LendingWise to Claude to automate loan origination workflows, track pipeline statuses, or manage broker assignments, you need a Model Context Protocol (MCP) server. This server acts as the translation layer between Claude's natural language tool calls and the underlying LendingWise REST API. You can either build and maintain this translation layer yourself, or use a managed integration platform like Truto to dynamically generate a secure, authenticated MCP server URL.
If your team uses ChatGPT, check out our guide on connecting LendingWise to ChatGPT or explore our broader architectural overview on connecting LendingWise to AI Agents.
Giving a Large Language Model (LLM) read and write access to a specialized loan origination system like LendingWise is a serious engineering challenge. You have to handle dynamic JSON schemas for custom loan types, manage relational assignments between loans and brokers, and ensure the LLM understands strict pipeline status progressions. Every time a new custom property field is added or a loan program changes, your integration layer must adapt instantly.
This guide breaks down exactly how to use Truto to generate a secure, managed MCP server for LendingWise, connect it natively to Claude, and execute complex loan management workflows using natural language.
The Engineering Reality of the LendingWise API
A custom MCP server is a self-hosted integration layer. While the open MCP standard provides a predictable way for models to discover tools over JSON-RPC, the reality of implementing it against specialized vertical APIs is painful. LendingWise is built to manage complex, multi-party financial transactions. Its API reflects that deep domain complexity.
If you decide to build a custom LendingWise MCP server, you own the entire lifecycle. Here are the specific integration challenges you will face:
Merge-Patch State Management on Loan Files
Advancing a loan through a pipeline in LendingWise is not as simple as calling a dedicated /advance endpoint. Instead, you must update the primary loan file using a merge-patch approach on the primaryStatusId. Every field in the update payload is optional, meaning the LLM must construct a precise, minimal payload containing only the exact numeric ID of the new status. If the LLM hallucinates a string status name instead of the numeric ID, the API will reject the request. A managed MCP server forces the LLM to adhere strictly to the target JSON schema for these updates.
Complex Relational Assignments
In LendingWise, brokers, branches, loan officers, and back-office employees are not just string values on a loan record - they are distinct relational entities. To assign a broker to a loan, you cannot simply update the loan object. You must invoke a specific assignment operation (e.g., passing a brokerId to the loan). If a broker does not exist, you must first create or update the broker entity, retrieve its generated numeric ID, and then pass that ID into the assignment operation. This requires multi-step orchestration that an LLM will struggle with unless tools are explicitly bounded.
Strict Rate Limiting and Backoff Management
LendingWise enforces API quotas to protect system stability. When building an MCP server, you must decide how to handle HTTP 429 (Too Many Requests) errors. Truto takes a deliberate architectural stance here: the platform does not retry, throttle, or apply backoff on rate limit errors automatically. Instead, Truto passes the HTTP 429 error directly back to the caller (the LLM client) and normalizes the upstream rate limit information into standardized headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset) per the IETF specification. This places the responsibility of retry logic and backoff exactly where it belongs - in your agentic orchestration layer, preventing runaway LLM loops from quietly burning through your API quotas.
Creating the LendingWise MCP Server
Truto derives MCP tools dynamically from the underlying API documentation and schemas. The tools are exposed over a JSON-RPC 2.0 endpoint that any MCP client can connect to. The server URL contains a cryptographic token that authenticates the specific LendingWise tenant connection.
You can create this server in two ways.
Method 1: Via the Truto UI
For teams testing workflows or manually configuring Claude Desktop, the UI is the fastest path:
- Log into your Truto dashboard and navigate to the integrated account page for your LendingWise connection.
- Click the MCP Servers tab.
- Click Create MCP Server.
- Select your desired configuration. You can optionally filter by specific HTTP methods (e.g., read-only access) or functional tags.
- Copy the generated secure MCP server URL (e.g.,
https://api.truto.one/mcp/abc123def456...).
Method 2: Via the API
For platforms provisioning agentic workspaces dynamically, you can generate MCP servers programmatically.
Make a POST request to /integrated-account/:id/mcp with your desired configuration:
curl -X POST https://api.truto.one/integrated-account/{integrated_account_id}/mcp \
-H "Authorization: Bearer YOUR_TRUTO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "LendingWise Loan Tracking AI",
"config": {
"methods": ["read", "write", "custom"]
}
}'The API provisions the token in a distributed key-value store and returns a ready-to-use URL:
{
"id": "mcp_01H...",
"name": "LendingWise Loan Tracking AI",
"url": "https://api.truto.one/mcp/abc123def456..."
}Connecting the MCP Server to Claude
Once you have the Truto MCP URL, you can connect it to your Claude environment. All communication happens over standard HTTP POST with JSON-RPC messages.
Method A: Via the Claude UI
If you are using enterprise conversational interfaces (like Claude's web UI or ChatGPT's web UI with custom connectors enabled), you can add the server directly via the settings panel:
- In your AI client, navigate to Settings -> Integrations -> Add MCP Server (or Settings -> Connectors -> Add).
- Paste the Truto MCP server URL you generated above.
- Click Add. The client will automatically perform a handshake, run the
tools/listprotocol, and expose the LendingWise capabilities to the model.
Method B: Via the Claude Desktop Config File
If you are running Claude Desktop locally and want to integrate the remote server, you use a Server-Sent Events (SSE) proxy. Edit your claude_desktop_config.json file to route traffic to Truto.
{
"mcpServers": {
"lendingwise_truto": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-sse",
"https://api.truto.one/mcp/abc123def456..."
]
}
}
}Restart Claude Desktop. The application will initialize the MCP protocol and dynamically load the available LendingWise schemas into the model's context.
High-Leverage LendingWise Tools
Truto automatically translates LendingWise's endpoints into descriptive, snake-case MCP tools. Because query and body parameters are merged into a single flat input namespace, the LLM simply passes a single JSON object. Here are the highest-leverage tools available for loan tracking.
list_all_lending_wise_loans
Fetches a paginated summary of loan files. This tool is critical for pipeline reviews and supports filtering by broker, borrower, or loan officer. It returns high-level data like loanNumber, primaryStatusId, and activeStatus.
"Pull the latest 25 active loan files assigned to loan officer ID 8042 and summarize their current pipeline statuses."
create_a_lending_wise_loan
Initiates a new loan file in the system. The schema enforces required fields like branchID, fileType, loanProgram, primaryStatusId, and borrower details, ensuring the LLM cannot submit a malformed origination request.
"Create a new commercial loan file for borrower John Doe at branch 12. Set the initial pipeline status to 'Lead' (ID 101) and use the standard SBA loan program."
update_a_lending_wise_loan_by_id
Executes a merge-patch update on an existing loan file. This is the primary tool used to advance a deal through the pipeline by modifying the primaryStatusId. The LLM only sends the fields that require changing.
"Move loan file ID 45992 to the 'Underwriting' status. The numeric ID for Underwriting is 204. Update the record now."
lending_wise_loans_add_properties
Attaches subject or collateral properties to a specific loan file. LendingWise supports multi-property loans, but exactly one property must be flagged as isPrimary to mirror its address onto the top-level loan record.
"Add a new primary collateral property to loan ID 45992 located at 123 Main St, Austin TX. Ensure isPrimary is set to true."
lending_wise_brokers_create_or_update
Upserts a broker profile based on their email address. This tool handles creating the contact record if it doesn't exist or updating phone numbers and company details if it does. It returns the numeric broker ID required for assignment.
"Check if broker sarah@capitalpartners.com exists. If not, create her profile with the company name Capital Partners and return her new broker ID."
lending_wise_loans_assign_broker
Links a created broker profile to a specific loan file. This relies on the relational architecture of LendingWise, requiring both the loan_id and the brokerId.
"Take broker ID 7721 that we just created and assign them as the primary broker on loan file ID 45992."
To view the complete inventory of tools, including endpoints for back-office employee assignments, loan type listing, and member management, check out the LendingWise integration page.
Workflows in Action
When you give Claude access to these tightly scoped tools, it can orchestrate complex, multi-step origination tasks that would normally require a human jumping between multiple LendingWise tabs.
Scenario 1: The Loan Processor (Pipeline Progression)
Loan processors spend hours manually checking conditions and moving files between stages. An AI agent can automate status progression based on external triggers or direct chat commands.
"Find the loan file for borrower 'Acme Corp' and move its pipeline status to 'Approved - Pending Funding'. The status ID for that stage is 305."
Execution Steps:
- Claude calls
list_all_lending_wise_loansfiltering by borrower name "Acme Corp" to retrieve the numericid(e.g., 8832). - Claude calls
get_single_lending_wise_loan_by_idpassingid: 8832to verify current state and ensure it's safe to progress. - Claude calls
update_a_lending_wise_loan_by_idpassingid: 8832andprimaryStatusId: 305.
Result: The loan is successfully moved into the funding stage without the processor having to navigate the UI, and the LLM responds confirming the new status and updated timestamp.
Scenario 2: The Intake Specialist (New Deal Setup)
Setting up a new deal requires creating the core entity, registering the broker, linking them together, and attaching the collateral. An LLM handles this relational choreography effortlessly.
"We just got a new bridge loan application from broker Mike Smith (mike@smithlending.com). Create a new loan file for borrower 'XYZ Holdings', add Mike as the broker, and attach the subject property at 400 Broad St as the primary collateral."
Execution Steps:
- Claude calls
lending_wise_brokers_create_or_updatewith Mike's email to get his numericbrokerId. - Claude calls
create_a_lending_wise_loanwith the borrower details to generate the new loan, receiving the newid. - Claude calls
lending_wise_loans_assign_brokerusing the new loanidand Mike'sbrokerId. - Claude calls
lending_wise_loans_add_propertieswith theloan_idand the 400 Broad St address, explicitly passingisPrimary: true.
Result: The entire deal is staged in LendingWise perfectly normalized and linked.
sequenceDiagram
participant Claude as Claude Agent
participant Truto as Truto MCP Server
participant LW as LendingWise API
Claude->>Truto: Call lending_wise_brokers_create_or_update
Truto->>LW: POST /v1/brokers<br>(Upsert logic)
LW-->>Truto: Returns brokerId: 554
Truto-->>Claude: brokerId: 554
Claude->>Truto: Call create_a_lending_wise_loan
Truto->>LW: POST /v1/loans
LW-->>Truto: Returns loan_id: 9912
Truto-->>Claude: loan_id: 9912
Claude->>Truto: Call lending_wise_loans_assign_broker
Truto->>LW: POST /v1/loans/9912/brokers (id: 554)
LW-->>Truto: Assignment confirmed
Truto-->>Claude: SuccessSecurity and Access Control
Exposing financial data to an AI model requires strict governance. Truto provides several configuration flags on the MCP server to restrict what the LLM can do.
- Method Filtering: Limit the server strictly to read-only operations by passing
methods: ["read"]during server creation. This allows the model to query pipeline status without the risk of it updating or deleting a loan. - Tag Filtering: Restrict tools to specific functional areas using
tags: ["loans"], completely hiding administrative tools like employee directory management from the LLM. - Expiration Controls: Use the
expires_atparameter to generate short-lived MCP servers (e.g., for temporary contractor access or ephemeral agent task runs). The server and its underlying token are automatically purged from the distributed key-value store upon expiration. - API Token Requirement: Enable
require_api_token_auth: trueto enforce dual-layer security. The client must possess both the cryptographic MCP URL and a valid Truto API token in the Authorization header to invoke any tools, ensuring the URL alone cannot be abused if leaked.
Moving Beyond Point-to-Point Scripts
Building a custom integration layer for LendingWise means you are constantly writing mapping code to handle custom property fields, reverse-engineering undocumented assignment logic, and managing token refreshes. By leveraging an MCP server backed by a managed proxy architecture, you abstract away the API mechanics entirely.
Your engineering team stops maintaining brittle JSON schemas and starts deploying AI agents that can actually reason about loan pipelines, execute complex deal setups, and operate safely within strict security boundaries. The LLM handles the intent; the MCP server handles the protocol.
FAQ
- How does Truto handle LendingWise API rate limits for AI agents?
- Truto does not automatically retry, throttle, or apply backoff logic. Instead, it passes the HTTP 429 error directly back to the caller (your AI agent) while mapping the upstream headers to the standardized IETF rate limit headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset). The caller is responsible for implementing the retry logic.
- Can I restrict Claude to only read data from LendingWise?
- Yes. When generating the MCP server via the Truto UI or API, you can pass a configuration object like `methods: ["read"]`. This ensures the server only exposes GET and LIST operations, preventing the LLM from creating or updating loan records.
- Do I need to manage authentication tokens for LendingWise?
- No. The MCP server generated by Truto encapsulates the authenticated session for that specific LendingWise tenant account. The LLM client only needs the secure MCP URL to access the approved tools.
- How does Claude handle updating loan pipeline statuses?
- Claude uses the `update_a_lending_wise_loan_by_id` tool, which acts as a merge-patch. Claude only needs to pass the loan ID and the specific numeric `primaryStatusId` to advance the file through the pipeline.