mortgagetape™

Connect Mortgage Tape to your AI assistant

Mortgage Tape exposes its scoring API as a Model Context Protocol (MCP) server. Point any MCP-capable assistant — Claude Desktop, ChatGPT, Gemini, Claude Code, or your own JSON-RPC client — at the endpoint below and the four scoring tools show up in the assistant's tool list, backed by the same calibrated models the web app uses.

MCP endpoint https://mortgagetape.com/mcp

Twelve tools, one endpoint

Grouped by what they do. All behave the same whether you call them from Claude Desktop, ChatGPT, Gemini, the Claude Code CLI, or a direct JSON-RPC client.

  • Ask a question — query runs a natural-language question through the same classifier + SQL generator + summarizer that powers chat on mortgagetape.com. Spans HMDA, Fannie, Freddie, Ginnie Mae, Optimal Blue locks, FFIEC Call Reports, NAIC insurer filings, the LLPA matrix, and Fed Z.1. Response carries: answer (the summarizer's narrative — the same text a chat user sees), sql (the generated query), columns + rows (up to 50 sample rows), row_count, and follow_ups (suggested next questions).
  • Check a loan — eligibility runs an application against the codified Fannie Mae, Freddie Mac, FHA, and VA rulesets and returns per-agency findings with Guide citations plus the aggregate verdict.
  • Score a loan — list_models for the catalog (PIW, repurchase, EPD, prepay 12 / 24 / 36, HomeReady, Home Possible, DPA, LLPA overlay, EPO 6-mo composite + v2.0 split heads (epo_split_prepay / epo_split_epd30), pull-through, denial, approval, and more), get_model_info / get_model_schema to describe a model and its payload, score_loan to score — returns calibrated probability, risk band, and an operating recommendation. score_cpr_monthly_projection is the composite 4-bucket hazard model that returns a 12-month voluntary-CPR path for MSR valuation / recapture / portfolio CPR forecasting; separate tool because its response is a vector, not a single probability.
  • Look things up — find_lender (HMDA agency-ticket directory by LEI, respondent name, or alias), find_servicer (cross-agency servicer book), lookup_mbs_pool (any 9-char Fannie / Freddie / Ginnie CUSIP), and list_cmbs_deals (non-agency CMBS corpus).
  • Read the market — market_snapshot returns the current OB-lock market headline (rates, WoW deltas, product mix, mature-cohort pull-through, and FICO×LTV LLPA reality vs the published Fannie grid).
  • Pull industry benchmarks — benchmark_cpr_cdr returns monthly voluntary-prepay CPR and foreclosure CDR from the GSE + Ginnie loan-level disclosures, sliced by agency, product, vintage, origination channel, and region. The same aggregate that drives the /benchmarks page and that the CPR monthly- projection model is reconciled against.

Pick your path

Three ways to connect, depending on your client:

  1. GUI MCP client (Claude Desktop, claude.ai Connectors, ChatGPT, Gemini) — just paste the URL; sign in through your browser.
  2. Claude Code CLI — one claude mcp add command with an API key.
  3. Direct integrator — Python, TypeScript, or curl against the raw JSON-RPC endpoint.

1. GUI MCP client (OAuth)

Supported GUI clients auto-register and walk you through a browser consent screen on mortgagetape.com. No API key needed.

Claude Desktop (or claude.ai Connectors)

  1. Open Settings › Connectors (or Integrations) and click Add custom connector.
  2. URL: https://mortgagetape.com/mcp
  3. Click Add. A browser tab opens on mortgagetape.com asking you to approve — click Approve.
  4. Return to Claude; the Mortgage Tape tools appear in the tool picker.

ChatGPT

  1. In ChatGPT, open Settings › Connectors (or the Connectors sidebar in a chat).
  2. Choose Add custom connector (or New MCP server) and paste https://mortgagetape.com/mcp.
  3. ChatGPT discovers our OAuth metadata, auto-registers, and opens a sign-in window pointed at mortgagetape.com — approve the connection there.
  4. Mention the connector in a chat (“Score this loan with Mortgage Tape…”) to invoke it.

Exact menu labels vary by plan and ChatGPT version. If you don't see the connector option, check that custom MCP connectors are enabled for your workspace.

Gemini

  1. In the Gemini app, open Settings › Extensions (or Connected apps › Add MCP server in Gemini-powered IDE assistants).
  2. Choose Custom MCP server, paste https://mortgagetape.com/mcp, and save.
  3. Gemini opens a mortgagetape.com approval page — approve, then return to the Gemini chat.

MCP support in consumer Gemini is rolling out gradually; if your Gemini build doesn't expose an MCP connector UI yet, use the direct-integrator path below with an API key.

2. Claude Code CLI

Claude Code uses API keys, not OAuth. Mint one first:

  1. Sign in and open /account/api-keys.
  2. Name the key (e.g. “Claude Code laptop”) and click Generate. Copy the raw mt_… value — it is shown once.

Then in a terminal:

claude mcp add \
  --scope user \
  --transport http \
  mortgage-tape \
  https://mortgagetape.com/mcp \
  --header "Authorization: Bearer mt_YOUR_KEY_HERE"

Verify with claude mcp list. To remove: claude mcp remove mortgage-tape.

3. Direct integrator (Python / TypeScript / curl)

Mint an API key as in step 2 above. The MCP endpoint speaks JSON-RPC 2.0 over HTTPS. The one-and-only auth header:

Authorization: Bearer mt_YOUR_KEY_HERE

Python

import httpx, json

url = "https://mortgagetape.com/mcp"
headers = {"Authorization": "Bearer mt_YOUR_KEY_HERE"}

# List available tools
rpc = {"jsonrpc": "2.0", "id": 1, "method": "tools/list"}
print(httpx.post(url, json=rpc, headers=headers).json())

# Score a loan
rpc = {
    "jsonrpc": "2.0", "id": 2, "method": "tools/call",
    "params": {
        "name": "score_loan",
        "arguments": {
            "model_name": "epd",
            "payload": {
                "borrower_fico": 740, "original_ltv": 80, "dti": 35,
                "source": "FNM_SFP", "loan_purpose": "P",
                "property_state": "TX", "original_interest_rate": 7.0,
            },
        },
    },
}
print(httpx.post(url, json=rpc, headers=headers).json())

TypeScript / Node.js

const url = "https://mortgagetape.com/mcp";
const headers = {
  "Authorization": "Bearer mt_YOUR_KEY_HERE",
  "Content-Type": "application/json",
};

async function rpc(method, params = {}) {
  const res = await fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify({ jsonrpc: "2.0", id: 1, method, params }),
  });
  return res.json();
}

// List tools
console.log(await rpc("tools/list"));

// Score a loan
console.log(await rpc("tools/call", {
  name: "score_loan",
  arguments: {
    model_name: "epd",
    payload: {
      borrower_fico: 740, original_ltv: 80, dti: 35,
      source: "FNM_SFP", loan_purpose: "P",
      property_state: "TX", original_interest_rate: 7.0,
    },
  },
}));

curl

curl -X POST https://mortgagetape.com/mcp \
  -H "Authorization: Bearer mt_YOUR_KEY_HERE" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'

Official MCP SDKs

If your app already uses an MCP SDK, point it at Mortgage Tape as a streamable-HTTP server with a static Bearer token — no custom JSON-RPC code needed.

Python — mcp (the official SDK)

pip install mcp
import asyncio
from mcp import ClientSession
from mcp.client.streamable_http import streamablehttp_client

async def main():
    headers = {"Authorization": "Bearer mt_YOUR_KEY_HERE"}
    async with streamablehttp_client("https://mortgagetape.com/mcp", headers=headers) as (read, write, _):
        async with ClientSession(read, write) as session:
            await session.initialize()
            tools = await session.list_tools()
            print([t.name for t in tools.tools])
            result = await session.call_tool("score_loan", {
                "model_name": "epd",
                "payload": {
                    "borrower_fico": 740, "original_ltv": 80, "dti": 35,
                    "source": "FNM_SFP", "loan_purpose": "P",
                    "property_state": "TX", "original_interest_rate": 7.0,
                },
            })
            print(result.structuredContent)

asyncio.run(main())

TypeScript — @modelcontextprotocol/sdk

npm install @modelcontextprotocol/sdk
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { StreamableHTTPClientTransport }
  from "@modelcontextprotocol/sdk/client/streamableHttp.js";

const transport = new StreamableHTTPClientTransport(
  new URL("https://mortgagetape.com/mcp"),
  { requestInit: { headers: { Authorization: "Bearer mt_YOUR_KEY_HERE" } } }
);
const client = new Client({ name: "my-app", version: "0.1.0" }, { capabilities: {} });
await client.connect(transport);

const tools = await client.listTools();
console.log(tools.tools.map(t => t.name));

const result = await client.callTool({
  name: "eligibility",
  arguments: {
    application: {
      loan_purpose: "purchase", occupancy: "primary_residence",
      number_of_units: 1, loan_amount: 380000, property_value: 400000,
      representative_credit_score: 720, dti: 38,
    },
  },
});
console.log(result.structuredContent);

Example prompts

Once connected, your assistant will route naturally to the right tool:

  • “What's the PIW probability for a 740-FICO, 80-LTV purchase in Texas at $420K?”
  • “Score this loan for 6-month EPO risk: paste loan attributes”
  • “Which scoring models do you have for GNMA loans?”
  • “What fields does the repurchase model expect?”

Limits & good citizenship

  • Scoring is rate-limited at the same free-tier daily cap as the web experience, shared across web, MCP, and direct API.
  • Up to 10 active API keys per user. Revoke unused ones from the keys page.
  • OAuth access tokens live 24 hours; your MCP client refreshes them automatically. Revoke access any time from the keys page.
  • Mortgage Tape never stores raw API keys or OAuth access tokens in plaintext — only SHA-256 hashes.

Get the next Mortgage Tape Insight in your inbox.

Occasional research + product updates. Unsubscribe anytime.