The LoanPro MCP Server provides read-only access to LoanPro financial data through multiple transport protocols including HTTP, Server-Sent Events (SSE), and stdio. It implements the Model Context Protocol for accessing loan information, customer details, and payment history.
cp .env.example .env
.env
file:
LOANPRO_API_URL=https://your-loanpro-instance.com/api
LOANPRO_API_KEY=your_api_key_here
LOANPRO_TENANT_ID=your_tenant_id_here
PORT=8080
# Logging configuration (optional)
LOG_LEVEL=INFO
LOG_FORMAT=TEXT
# Default HTTP transport
go run .
# or explicitly
go run . --transport=http
Available endpoints:
POST /mcp
- MCP requestsGET /
- Server informationGET /health
- Health checkgo run . --transport=sse
go run . --transport=stdio
# or using the legacy flag
go run . --stdio
go build -o loanpro-mcp-server .
Retrieves comprehensive loan information by ID.
Parameters:
loan_id
(required): The loan ID to retrieveReturns: Complete loan details including balances, payment info, and customer information.
Searches for loans with filters and search terms.
Parameters:
search_term
(optional): Search term to match against customer name, display ID, or titlestatus
(optional): Filter by loan statuslimit
(optional): Maximum number of results (default: 10)Returns: List of matching loans with basic information.
Retrieves customer information by ID.
Parameters:
customer_id
(required): The customer ID to retrieveReturns: Customer details including name, email, phone, and creation date.
Searches for customers with a search term.
Parameters:
search_term
(optional): Search term to match against customer names, email, or SSNlimit
(optional): Maximum number of results (default: 10)Returns: List of matching customers with contact information.
Gets payment history for a loan.
Parameters:
loan_id
(required): The loan ID to get payment history forReturns: Chronological list of payments made on the loan.
# Get server info
curl http://localhost:8080/
# Health check
curl http://localhost:8080/health
# List available tools
curl -X POST http://localhost:8080/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"tools/list","id":1}'
# Get loan details
curl -X POST http://localhost:8080/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"get_loan","arguments":{"loan_id":"123"}},"id":2}'
For compiled binary:
{
"mcpServers": {
"loanpro": {
"command": "/path/to/loanpro-mcp-server",
"args": ["--transport=stdio"],
"env": {
"LOANPRO_API_URL": "https://your-loanpro-instance.com/api",
"LOANPRO_API_KEY": "your_api_key",
"LOANPRO_TENANT_ID": "your_tenant_id"
}
}
}
}
For Go source:
{
"mcpServers": {
"loanpro": {
"command": "go",
"args": ["run", ".", "--transport=stdio"],
"cwd": "/path/to/loanpro-mcp-server",
"env": {
"LOANPRO_API_URL": "https://your-loanpro-instance.com/api",
"LOANPRO_API_KEY": "your_api_key",
"LOANPRO_TENANT_ID": "your_tenant_id"
}
}
}
}
Start the server with SSE transport:
go run . --transport=sse
Connect to the SSE endpoint:
http://localhost:8080/sse
Configure logging via environment variables:
Set the LOG_LEVEL
environment variable:
Set the LOG_FORMAT
environment variable:
# Debug level with text format
LOG_LEVEL=DEBUG ./loanpro-mcp-server --transport=stdio
# Info level with JSON format
LOG_LEVEL=INFO LOG_FORMAT=JSON ./loanpro-mcp-server --transport=http
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "loanpro" '{"command":"go","args":["run",".","--transport=stdio"],"cwd":"/path/to/loanpro-mcp-server","env":{"LOANPRO_API_URL":"https://your-loanpro-instance.com/api","LOANPRO_API_KEY":"your_api_key","LOANPRO_TENANT_ID":"your_tenant_id"}}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"loanpro": {
"command": "go",
"args": [
"run",
".",
"--transport=stdio"
],
"cwd": "/path/to/loanpro-mcp-server",
"env": {
"LOANPRO_API_URL": "https://your-loanpro-instance.com/api",
"LOANPRO_API_KEY": "your_api_key",
"LOANPRO_TENANT_ID": "your_tenant_id"
}
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"loanpro": {
"command": "go",
"args": [
"run",
".",
"--transport=stdio"
],
"cwd": "/path/to/loanpro-mcp-server",
"env": {
"LOANPRO_API_URL": "https://your-loanpro-instance.com/api",
"LOANPRO_API_KEY": "your_api_key",
"LOANPRO_TENANT_ID": "your_tenant_id"
}
}
}
}
3. Restart Claude Desktop for the changes to take effect