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
| Mode | Description | URL |
|---|---|---|
| Cloudflare Worker | OAuth-enabled edge deployment (primary) | https://mcp-baseline.alianzacap.com |
| STDIO | Claude Desktop DXT extension | Local |
| DXT Extension | Packaged Claude Desktop installation | .dxt file |
Available Tools
Loan Management
| Tool | Description |
|---|---|
getLoan | Retrieve complete loan details by ID |
listLoans | Get summary list of all loans |
updateLoan | Update specific fields of an existing loan |
createLoan | Create a new loan application |
getLoanLedger | Retrieve top 50 transactions in a loan's ledger |
Task Management
| Tool | Description |
|---|---|
getTask | Get complete task details by ID |
listTasks | Get summary list of all tasks with pagination |
createTask | Create a new task |
updateTask | Update any field of an existing task |
deleteTask | Permanently delete a task |
Borrower Management
| Tool | Description |
|---|---|
createBorrower | Create new borrower |
listBorrowers | List all borrowers |
getBorrower | Get borrower details |
updateBorrower | Update borrower |
deleteBorrower | Delete borrower |
connectBorrowers | Link borrowers to loans |
disconnectBorrowers | Unlink borrowers from loans |
Vendor Management
| Tool | Description |
|---|---|
createVendor | Create new vendor |
listVendors | List all vendors |
getVendor | Get vendor details |
updateVendor | Update vendor |
deleteVendor | Delete vendor |
connectVendors | Link vendors to loans |
disconnectVendors | Unlink vendors from loans |
Investor Management
| Tool | Description |
|---|---|
createInvestor | Create new investor |
listInvestors | List all investors |
getInvestor | Get investor details |
updateInvestor | Update investor |
deleteInvestor | Delete investor |
connectInvestors | Link investors to loans |
disconnectInvestors | Unlink 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
| Endpoint | Transport | Auth | Purpose |
|---|---|---|---|
/health | - | None | Health check |
/mcp | Streamable HTTP | OAuth | Consumer apps |
/sse | SSE (legacy) | OAuth | Legacy clients |
/mcp-m2m | Streamable HTTP | JWT Bearer | Server-to-server |
Environment Variables
STDIO Mode
| Variable | Description |
|---|---|
BASELINE_API_KEY | Baseline API key (required) |
BASELINE_API_URL | API URL (default: production) |
BASELINE_DEBUG | Enable debug logging |
Cloudflare Worker
| Variable | Description |
|---|---|
AUTH0_DOMAIN | Auth0 tenant domain |
AUTH0_CLIENT_ID | Application client ID |
AUTH0_CLIENT_SECRET | Application client secret |
AUTH0_AUDIENCE | API identifier (urn:mcp-baseline) |
BASELINE_API_KEY | Baseline API key |
API Reference
Maps to Baseline API endpoints:
| MCP Tools | Baseline 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
Related Documentation
- MCP Framework
- LoanSync Integration
- Auth0 Configuration
- Baseline API Docs
- Source:
mcp-baseline/