Skip to main content

SDK Overview

The SecureLend SDK provides a type-safe TypeScript/JavaScript wrapper for connecting to the SecureLend MCP server programmatically. Use the SDK when you want to:
  • Integrate SecureLend into your own applications
  • Build custom financial comparison tools
  • Automate loan research and analysis
  • Create financial dashboards and reporting
Use Claude/ChatGPT when you want to:
  • Interactive financial advice through AI assistants
  • Quick loan comparisons without coding
  • Natural language financial queries

Quick Start

Installation

npm install @securelend/sdk
# or
pnpm add @securelend/sdk
# or
yarn add @securelend/sdk

Basic Usage

import { SecureLend } from "@securelend/sdk";

// Create client - connects to https://mcp.securelend.ai/mcp
const securelend = new SecureLend();

// Compare business loans
const result = await securelend.compareBusinessLoans({
  loanAmount: 200000,
  purpose: "equipment",
  annualRevenue: 1200000,
  creditScore: 720,
});

console.log(`Found ${result.offers.length} loan offers`);
That’s it! No API keys required - the SDK connects to our public MCP server.

Key Features

πŸ”Œ Direct MCP Connection

Connects directly to https://mcp.securelend.ai/mcp - the same server used by Claude and ChatGPT.
// Default configuration (recommended)
const securelend = new SecureLend();

// Custom configuration (advanced)
const securelend = new SecureLend({
  serverUrl: "https://custom-server.com/mcp",
  timeout: 30000,
});

πŸ“ Full TypeScript Support

Complete type definitions for all requests and responses:
import {
  SecureLend,
  BusinessLoanRequest,
  LoanComparisonResponse,
} from "@securelend/sdk";

const request: BusinessLoanRequest = {
  loanAmount: 200000,
  purpose: "equipment",
};

const response: LoanComparisonResponse =
  await securelend.compareBusinessLoans(request);

πŸš€ Zero Configuration

No API keys, no authentication, no setup. Just install and start using:
import { SecureLend } from "@securelend/sdk";

const securelend = new SecureLend();
// Ready to use immediately

🎯 20 Financial Tools

Access all SecureLend tools programmatically:

6 Loan Comparison Tools

Personal loans, business loans, auto loans, student loans, mortgages

5 Banking & Credit Tools

Banking accounts, savings accounts, credit cards

3 Financial Calculators

Loan payments, mortgage PITI, lease vs purchase

6 Application Tools

Submit applications, track status, upload documents

Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Your Application                β”‚
β”‚   (Node.js, React, Next.js, etc.) β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                ↓
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   @securelend/sdk                 β”‚
β”‚   β€’ Type-safe wrappers            β”‚
β”‚   β€’ Error handling                β”‚
β”‚   β€’ Promise-based API             β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                ↓ MCP Protocol
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   mcp.securelend.ai/mcp           β”‚
β”‚   β€’ 20 financial tools            β”‚
β”‚   β€’ Real-time lender data         β”‚
β”‚   β€’ 200+ lender integrations      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
Benefits:
  • βœ… Always up-to-date (live server connection)
  • βœ… No API keys to manage
  • βœ… No rate limits for comparison tools
  • βœ… Type-safe development experience

Use Cases

Financial Comparison Platforms

Build your own loan comparison website or app:
// API route in Next.js
export async function POST(request: Request) {
  const { loanAmount, purpose } = await request.json();

  const securelend = new SecureLend();
  const offers = await securelend.compareBusinessLoans({
    loanAmount,
    purpose,
  });

  return Response.json(offers);
}

Internal Tools & Dashboards

Create financial analysis tools for your team:
async function analyzeFinancingOptions() {
  const securelend = new SecureLend();

  // Compare multiple product types
  const [loans, cards, banking] = await Promise.all([
    securelend.compareBusinessLoans({ loanAmount: 100000 }),
    securelend.compareBusinessCreditCards({ annualRevenue: 500000 }),
    securelend.compareBusinessBanking({ monthlyTransactions: 200 }),
  ]);

  return { loans, cards, banking };
}

Financial Automation

Automate loan research and monitoring:
async function monitorRates() {
  const securelend = new SecureLend();

  // Check rates daily
  setInterval(
    async () => {
      const offers = await securelend.comparePersonalLoans({
        loanAmount: 25000,
        purpose: "debt_consolidation",
      });

      const bestRate = Math.min(...offers.map((o) => o.interestRate));
      if (bestRate < 9.0) {
        await sendAlert(`Great rate found: ${bestRate}%`);
      }
    },
    24 * 60 * 60 * 1000,
  ); // Daily
}

Embedded Financial Services

Add financial comparison to your existing product:
// Inside your SaaS app
async function showFinancingOptions(businessData) {
  const securelend = new SecureLend();

  const financing = await securelend.compareBusinessLoans({
    loanAmount: businessData.requestedAmount,
    purpose: "working_capital",
    annualRevenue: businessData.revenue,
  });

  return financing.offers;
}

Available Methods

Loan Comparison

Compare personal loan offers Parameters: loanAmount, purpose, creditScore, employmentStatus, monthlyIncome, state Returns: Array of loan offers with rates, terms, lender details Full reference β†’
Compare business loan offers Parameters: loanAmount, purpose, annualRevenue, industry, state, creditScore Returns: Business loan offers with approval likelihood Full reference β†’
Compare auto loan rates Parameters: loanAmount, isNew, creditScore, state Returns: Auto loan rate comparisons Full reference β†’
Compare student loan options Parameters: loanAmount, degreeType, creditScore, coSignerCreditScore, state Returns: Student loan offers by lender Full reference β†’
Compare mortgage rates Parameters: loanAmount, loanType, homePrice, downPayment, creditScore, propertyType, state Returns: Mortgage rate comparisons Full reference β†’
Compare commercial mortgages Parameters: loanAmount, loanType, homePrice, downPayment, creditScore, propertyType, state Returns: Commercial mortgage options Full reference β†’

Banking & Credit Cards

Compare checking/savings accounts Full reference β†’
Compare business banking products Full reference β†’
Compare high-yield savings Full reference β†’
Compare personal credit cards Full reference β†’
Compare business credit cards Full reference β†’

Financial Calculators

Calculate monthly loan payments Parameters: loanAmount, interestRate, loanTermInMonths Returns: Monthly payment, total interest, amortization Full reference β†’
Calculate PITI mortgage payments Parameters: propertyValue, downPayment, interestRate, loanTermInYears, propertyTaxRate, homeInsurance Returns: Complete PITI breakdown Full reference β†’
Compare vehicle lease vs buy Parameters: purchasePrice, downPayment, interestRate, loanTermInMonths, monthlyLeasePayment, etc. Returns: Total cost comparison Full reference β†’
View complete tool reference β†’

Packages

@securelend/sdk (Core)

The main SDK package for TypeScript/JavaScript. Status: βœ… Beta - Available for testing
npm install @securelend/sdk
Platform Support:
  • βœ… Node.js 16+
  • βœ… Modern browsers
  • βœ… Edge runtime (Vercel, Cloudflare Workers)
  • βœ… React Server Components

@securelend/react (Coming Soon)

React hooks and components. Status: πŸ”„ In Development - Q1 2025
import { useLoans } from '@securelend/react';

function LoanComparison() {
  const { data, loading, error } = useLoans({
    loanAmount: 200000,
    purpose: 'equipment'
  });

  if (loading) return <Spinner />;
  return <LoanList offers={data.offers} />;
}

Python SDK (Planned)

Python client library. Status: πŸ”„ Planned - Q2 2025
from securelend import SecureLend

securelend = SecureLend()
loans = securelend.compare_business_loans(
    loan_amount=200000,
    purpose='equipment'
)

Comparison: SDK vs AI Integration

Use the SDK when you:

  • βœ… Need programmatic access
  • βœ… Want to build custom applications
  • βœ… Need to process multiple queries
  • βœ… Want to integrate with existing systems
  • βœ… Need automated workflows

Use Claude/ChatGPT when you:

  • βœ… Want interactive conversations
  • βœ… Need natural language queries
  • βœ… Want quick one-off comparisons
  • βœ… Prefer guided assistance
  • βœ… Don’t want to write code
Both connect to the same MCP server, so you get identical data and capabilities. Setup Claude Desktop β†’

Next Steps


Support