Skip to main content

MCP Baseline

MCP server for interacting with the Baseline loan origination system API. Enables AI assistants to manage loans, tasks, borrowers, vendors, and investors.

Overview

Built on @alianzacap/mcp-framework v3.0.2, providing:

  • Auth0 OAuth authentication for Cloudflare Workers
  • STDIO mode for DXT (Desktop Extension) deployment
  • Type-safe tool definitions with Zod validation

Deployment Options

ModeDescriptionURL
Cloudflare WorkerOAuth-enabled edge deployment (primary)https://mcp-baseline.alianzacap.com
STDIOClaude Desktop DXT extensionLocal
DXT ExtensionPackaged Claude Desktop installation.dxt file

Available Tools

Loan Management

ToolDescription
getLoanRetrieve complete loan details by ID
listLoansGet summary list of all loans
updateLoanUpdate specific fields of an existing loan
createLoanCreate a new loan application
getLoanLedgerRetrieve top 50 transactions in a loan's ledger

Task Management

ToolDescription
getTaskGet complete task details by ID
listTasksGet summary list of all tasks with pagination
createTaskCreate a new task
updateTaskUpdate any field of an existing task
deleteTaskPermanently delete a task

Borrower Management

ToolDescription
createBorrowerCreate new borrower
listBorrowersList all borrowers
getBorrowerGet borrower details
updateBorrowerUpdate borrower
deleteBorrowerDelete borrower
connectBorrowersLink borrowers to loans
disconnectBorrowersUnlink borrowers from loans

Vendor Management

ToolDescription
createVendorCreate new vendor
listVendorsList all vendors
getVendorGet vendor details
updateVendorUpdate vendor
deleteVendorDelete vendor
connectVendorsLink vendors to loans
disconnectVendorsUnlink vendors from loans

Investor Management

ToolDescription
createInvestorCreate new investor
listInvestorsList all investors
getInvestorGet investor details
updateInvestorUpdate investor
deleteInvestorDelete investor
connectInvestorsLink investors to loans
disconnectInvestorsUnlink investors from loans

Authentication

OAuth (Consumer Apps)

Configure Claude Desktop:

{
"mcpServers": {
"baseline": {
"command": "npx",
"args": [
"mcp-remote",
"https://mcp-baseline.alianzacap.com/mcp"
]
}
}
}

M2M (Server-to-Server)

# 1. Get access token from Auth0
TOKEN=$(curl -s -X POST https://dev-alianzacap.us.auth0.com/oauth/token \
-H "Content-Type: application/json" \
-d '{
"client_id": "YOUR_M2M_CLIENT_ID",
"client_secret": "YOUR_M2M_CLIENT_SECRET",
"audience": "urn:mcp-baseline",
"grant_type": "client_credentials"
}' | jq -r '.access_token')

# 2. Call MCP endpoint
curl -X POST https://mcp-baseline.alianzacap.com/mcp-m2m \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "getLoan",
"arguments": { "loanId": "12345" }
},
"id": 1
}'

STDIO Mode

For local Claude Desktop integration:

{
"mcpServers": {
"baseline": {
"command": "node",
"args": ["/path/to/mcp-baseline/dist/server-stdio.js"],
"env": {
"BASELINE_API_KEY": "your-api-key-here"
}
}
}
}

Endpoints

EndpointTransportAuthPurpose
/health-NoneHealth check
/mcpStreamable HTTPOAuthConsumer apps
/sseSSE (legacy)OAuthLegacy clients
/mcp-m2mStreamable HTTPJWT BearerServer-to-server

Environment Variables

STDIO Mode

VariableDescription
BASELINE_API_KEYBaseline API key (required)
BASELINE_API_URLAPI URL (default: production)
BASELINE_DEBUGEnable debug logging

Cloudflare Worker

VariableDescription
AUTH0_DOMAINAuth0 tenant domain
AUTH0_CLIENT_IDApplication client ID
AUTH0_CLIENT_SECRETApplication client secret
AUTH0_AUDIENCEAPI identifier (urn:mcp-baseline)
BASELINE_API_KEYBaseline API key

API Reference

Maps to Baseline API endpoints:

MCP ToolsBaseline Endpoint
Loans/loan (GET, PATCH, POST)
Loan Ledger/loan/{id}/transaction (GET)
Tasks/task (GET, POST), /task/{id} (GET, PATCH, DELETE)
Borrowers/borrower + CRUD
Vendors/vendor + CRUD
Investors/investor + CRUD

Deployment

Automatic: Push to main triggers GitHub Actions deployment.

Manual:

# Sync secrets
./scripts/sync-secrets-from-aws.sh

# Build and deploy
npm run build
npx wrangler deploy