Data source: Standard amortization formulas
Overview
Mortgage Calculator performs computations on your inputs — no external data source required. This tutorial covers all 4 tools with parameter reference and code examples.
Prerequisites
- Sign up at https://context.gnist.ai/signup for a free API key (100 calls/day).
- Choose your integration method: MCP protocol or REST API.
Connect via MCP
Add to your MCP client config (Claude Desktop, Cursor, etc.):
{
"mcpServers": {
"gnist-mortgage-calculator": {
"url": "https://context.gnist.ai/mcp/mortgage-calculator/",
"headers": {
"Gnist-API-Key": "YOUR_API_KEY"
}
}
}
}
Tools (4)
calculate_monthly_payment
Calculate fixed monthly mortgage payment. Given a loan amount, interest rate, and term, computes the monthly payment, total amount paid over the life of the loan, and total interest.
| Parameter | Type | Required | Description |
|---|---|---|---|
principal | number | required | Loan amount. |
annual_rate | number | required | Annual interest rate as a percentage (e.g. 5.5 for 5.5%). |
term_years | integer | required | Loan term in years. |
curl -X POST "https://context.gnist.ai/mcp/mortgage-calculator/" \
-H "Content-Type: application/json" \
-H "Gnist-API-Key: YOUR_API_KEY" \
-d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "calculate_monthly_payment", "arguments": {"principal": 1.0, "annual_rate": 5.5, "term_years": 2025}}}'
import httpx
resp = httpx.post(
"https://context.gnist.ai/mcp/mortgage-calculator/",
headers={"Gnist-API-Key": "YOUR_API_KEY"},
json={'id': 1,
'jsonrpc': '2.0',
'method': 'tools/call',
'params': {'arguments': {'annual_rate': 5.5,
'principal': 1.0,
'term_years': 2025},
'name': 'calculate_monthly_payment'}},
)
print(resp.json())
calculate_amortization
Generate a full amortization schedule for a mortgage. Returns monthly entries showing how each payment splits between principal and interest, plus the remaining balance after each payment.
| Parameter | Type | Required | Description |
|---|---|---|---|
principal | number | required | Loan amount. |
annual_rate | number | required | Annual interest rate as a percentage (e.g. 5.5 for 5.5%). |
term_years | integer | required | Loan term in years. |
curl -X POST "https://context.gnist.ai/mcp/mortgage-calculator/" \
-H "Content-Type: application/json" \
-H "Gnist-API-Key: YOUR_API_KEY" \
-d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "calculate_amortization", "arguments": {"principal": 1.0, "annual_rate": 5.5, "term_years": 2025}}}'
import httpx
resp = httpx.post(
"https://context.gnist.ai/mcp/mortgage-calculator/",
headers={"Gnist-API-Key": "YOUR_API_KEY"},
json={'id': 1,
'jsonrpc': '2.0',
'method': 'tools/call',
'params': {'arguments': {'annual_rate': 5.5,
'principal': 1.0,
'term_years': 2025},
'name': 'calculate_amortization'}},
)
print(resp.json())
calculate_affordability
Estimate how much home a buyer can afford. Uses the 28% front-end DTI ratio: maximum housing payment is 28% of gross monthly income, minus existing debts.
| Parameter | Type | Required | Description |
|---|---|---|---|
annual_income | number | required | Gross annual income. |
annual_rate | number | required | Annual interest rate as a percentage (e.g. 5.5 for 5.5%). |
monthly_debts | number | optional | Existing monthly debt obligations. (default: 0.0) |
down_payment | number | optional | Cash available for down payment. (default: 0.0) |
term_years | integer | optional | Loan term in years. (default: 30) |
curl -X POST "https://context.gnist.ai/mcp/mortgage-calculator/" \
-H "Content-Type: application/json" \
-H "Gnist-API-Key: YOUR_API_KEY" \
-d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "calculate_affordability", "arguments": {"annual_income": 1.0, "annual_rate": 5.5}}}'
import httpx
resp = httpx.post(
"https://context.gnist.ai/mcp/mortgage-calculator/",
headers={"Gnist-API-Key": "YOUR_API_KEY"},
json={'id': 1,
'jsonrpc': '2.0',
'method': 'tools/call',
'params': {'arguments': {'annual_income': 1.0, 'annual_rate': 5.5},
'name': 'calculate_affordability'}},
)
print(resp.json())
report_feedback
Report a bug, feature request, or general feedback for this data source. Use this when something doesn't work as expected, when you'd like a new feature, or when you have suggestions for improvement. Args: feedback: Describe the issue or suggestion. feedback_type: One of 'bug', 'feature_request', or 'general'.
| Parameter | Type | Required | Description |
|---|---|---|---|
feedback | string | required | |
feedback_type | string | optional | (default: general) |
curl -X POST "https://context.gnist.ai/mcp/mortgage-calculator/" \
-H "Content-Type: application/json" \
-H "Gnist-API-Key: YOUR_API_KEY" \
-d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "report_feedback", "arguments": {"feedback": "example"}}}'
import httpx
resp = httpx.post(
"https://context.gnist.ai/mcp/mortgage-calculator/",
headers={"Gnist-API-Key": "YOUR_API_KEY"},
json={'id': 1,
'jsonrpc': '2.0',
'method': 'tools/call',
'params': {'arguments': {'feedback': 'example'}, 'name': 'report_feedback'}},
)
print(resp.json())
FAQ
What data does Mortgage Calculator provide?
Mortgage payment calculator — monthly payments, amortization schedules, and affordability estimates. It exposes 4 tools: calculate_monthly_payment, calculate_amortization, calculate_affordability, report_feedback.
Does this toolkit require external data?
No. It performs computations on your inputs directly. You only need a Gnist API key.
What format does the Mortgage Calculator API return?
JSON, via either MCP protocol (JSON-RPC 2.0) or REST API.