> For the complete documentation index, see [llms.txt](https://api-docs.realfinity.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://api-docs.realfinity.io/mcp/overview.md).

# Overview

The Realfinity MCP server exposes Realfinity mortgage tools (loan lookup, tasks and conditions, reporting, pricing, data warehouse queries, and user/metadata lookups) to MCP clients (Claude Desktop, claude.ai custom connectors, MCP Inspector, and other compliant clients) over Streamable HTTP.

## Environments

| Environment | Endpoint                           |
| ----------- | ---------------------------------- |
| Production  | `https://ai.realfinity.io/mcp`     |
| UAT         | `https://ai-uat.realfinity.io/mcp` |

## Health check

`GET https://ai.realfinity.io/health` is unauthenticated and returns:

```json
{"status":"healthy"}
```

Use it to confirm the server itself is reachable before troubleshooting authentication.

## Tool inventory

27 tools are exposed, grouped into six reference pages.

| Tool                                  | Purpose                                                                                                                                                                                        | Page               |
| ------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ |
| `get_loan_application`                | Retrieve a loan application's full snapshot (borrowers, property, timeline, POS data) plus per-section wizard completion status, by MLM `externalId` (preferred) or internal GUID.             | Loan Lookup        |
| `get_loan_application_contacts`       | Retrieve the contacts saved on a loan application (buyer/listing agents, attorneys, escrow, loan officer, CPA, insurance, etc.), synced from MLM, optionally filtered by role.                 | Loan Lookup        |
| `search_loan_applications`            | Search accessible loan applications by free text and/or structured filters (status, purpose, dates, amount, commission, referring agent); returns lightweight, paginated summaries.            | Loan Lookup        |
| `query_loans`                         | Run a custom, whitelisted, parameterized query returning one row per loan; field keys come from a fixed whitelist, so it is injection-safe and read-only.                                      | Loan Lookup        |
| `get_loan_application_user_tasks`     | Retrieve internal user-assigned tasks (loan officer and processor work items) for a loan application, scoped by caller role.                                                                   | Tasks & Conditions |
| `get_loan_application_borrower_tasks` | Retrieve borrower-assigned tasks (document requests, e-sign requests, questions, conditions) for a loan application.                                                                           | Tasks & Conditions |
| `search_loan_tasks`                   | Search loan tasks and underwriting conditions across accessible loans by status, category, assignee, or free text.                                                                             | Tasks & Conditions |
| `conditions_by_outcome`               | Correlate underwriting condition categories with terminal loan outcomes (closed/funded vs. denied/withdrawn/cancelled) to surface which conditions are associated with loans that don't close. | Tasks & Conditions |
| `report_loans`                        | Aggregate accessible loans into buckets by a group-by dimension and metric (count/sum/average/min/max), based on loans' current attributes.                                                    | Reporting          |
| `loan_pipeline_report`                | Current pipeline snapshot: loan counts by macro stage plus a monthly trend, for accessible loans.                                                                                              | Reporting          |
| `report_loan_milestones`              | Funnel flow over time: counts of loans that historically reached each milestone/Northstar stage per week or month.                                                                             | Reporting          |
| `mlo_pipeline_report`                 | MLO onboarding cohort report: deals by creation period and current HubSpot pipeline stage.                                                                                                     | Reporting          |
| `warehouse_loan_milestone_report`     | Org-wide (not caller-scoped) loan pipeline funnel from the Data Warehouse, by milestone and time period.                                                                                       | Reporting          |
| `get_loan_reporting_metadata`         | Return the valid vocabulary (statuses, types, purposes, group-by dimensions, metrics, Northstar stages) accepted by the loan reporting tools.                                                  | Reporting          |
| `search_pricing`                      | Search mortgage pricing and return eligible products with rates and pricing adjustments for a scenario, with built-in defaults.                                                                | Pricing            |
| `get_product_details`                 | Retrieve full rate quotes, lock-period pricing, adjustments, and fee totals for a specific product from a prior `search_pricing` call.                                                         | Pricing            |
| `get_ineligible_products`             | List the products that were ineligible for a prior `search_pricing` call, grouped by product type, with rejection reasons.                                                                     | Pricing            |
| `query_data_warehouse`                | Run a custom, whitelisted, parameterized query against the Data Warehouse `[MeridianLink].[Loans]` table; injection-safe and read-only.                                                        | Data Warehouse     |
| `get_data_warehouse_fields`           | Return the whitelist of fields (key, type, valid operators) available to `query_data_warehouse`.                                                                                               | Data Warehouse     |
| `search_users`                        | Search accessible Realfinity users by free text on first name, last name, or email; returns lightweight user records including last sign-in.                                                   | Users & Metadata   |
| `get_user_licenses`                   | Return the U.S. states a Realfinity user is currently licensed in (active, unexpired licenses only).                                                                                           | Users & Metadata   |
| `get_current_user`                    | Return the signed-in caller's Realfinity `userId`, name, email, roles, and authentication source.                                                                                              | Users & Metadata   |
| `get_user_profile`                    | Return full metadata for one user: roles, company/organization, NMLS, flags, last sign-in, and Optimal Blue channel/originator configuration.                                                  | Users & Metadata   |
| `report_users`                        | Paged, filterable report of all accessible users with full metadata, for configuration and activity reporting (Admin, Processor).                                                              | Users & Metadata   |
| `get_loan_query_fields`               | Return the whitelist of fields (key, type, scope, access requirement) available to `query_loans`.                                                                                              | Users & Metadata   |
| `ping`                                | Health check for the Realfinity MCP server; returns a static greeting plus the server's current UTC timestamp.                                                                                 | Users & Metadata   |
| `get_api_access_token`                | Mint a short-lived Bearer token for the Realfinity Private API, for out-of-band flows the MCP tools don't cover (e.g. task-document upload/download).                                          | Users & Metadata   |
