Integration examples
Claude
Claude Desktop reads a JSON config file; Claude Code takes a single command.
{
"mcpServers": {
"us-mortgage-calculator": {
"type": "http",
"url": "https://www.usmortgagecalc.com/mcp"
}
}
}On macOS the file lives at ~/Library/Application Support/Claude/claude_desktop_config.json; on Windows at %APPDATA%\Claude\claude_desktop_config.json. Restart Claude after editing it.
claude mcp add --transport http us-mortgage-calculator https://www.usmortgagecalc.com/mcpCursor
Project-scoped or global, depending on where you put the file.
{
"mcpServers": {
"us-mortgage-calculator": {
"url": "https://www.usmortgagecalc.com/mcp"
}
}
}Placing the file at .cursor/mcp.json in a project scopes the server to that project. Putting it at ~/.cursor/mcp.json makes it available everywhere.
VS Code
Via the built-in MCP support in GitHub Copilot's agent mode.
{
"servers": {
"us-mortgage-calculator": {
"type": "http",
"url": "https://www.usmortgagecalc.com/mcp"
}
}
}ChatGPT and other agents
For clients that take OpenAI-style function definitions rather than MCP.
Declare the endpoint as a tool and call the REST API when the model invokes it. The definition below covers the main calculation; the same pattern works for every operation in the OpenAPI document, which some frameworks can import directly to generate all eleven at once.
{
"type": "function",
"function": {
"name": "calculate_mortgage",
"description": "Calculate a US monthly mortgage payment including property tax, insurance, mortgage insurance and HOA dues, using state-level tax rates.",
"parameters": {
"type": "object",
"properties": {
"homePrice": { "type": "number" },
"downPaymentPercent": { "type": "number" },
"annualInterestRatePercent": { "type": "number" },
"loanTermYears": { "type": "number" },
"state": { "type": "string", "description": "Full state name, e.g. \"Texas\"" }
},
"required": ["homePrice", "downPaymentPercent", "annualInterestRatePercent", "loanTermYears", "state"]
}
}
}curl
No SDK. It is one POST.
curl -s https://www.usmortgagecalc.com/api/v1/calculate-mortgage \
-H 'content-type: application/json' \
-d '{"homePrice":400000,"downPaymentPercent":20,
"annualInterestRatePercent":6.5,"loanTermYears":30,"state":"Texas"}' \
| jq '.data.totalMonthlyCost'
# 2775.95TypeScript
const response = await fetch("https://www.usmortgagecalc.com/api/v1/calculate-mortgage", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({
homePrice: 400_000,
downPaymentPercent: 20,
annualInterestRatePercent: 6.5,
loanTermYears: 30,
state: "Texas",
}),
});
if (!response.ok) {
const { error } = await response.json();
throw new Error(`${error.code}: ${error.message}`);
}
// Calculation endpoints wrap the result as { data, meta }.
const { data } = await response.json();
console.log(data.totalMonthlyCost);Python
import httpx
response = httpx.post(
"https://www.usmortgagecalc.com/api/v1/calculate-mortgage",
json={
"homePrice": 400000,
"downPaymentPercent": 20,
"annualInterestRatePercent": 6.5,
"loanTermYears": 30,
"state": "Texas",
},
timeout=10,
)
response.raise_for_status()
# Calculation endpoints wrap the result as {"data": ..., "meta": ...}.
print(response.json()["data"]["totalMonthlyCost"])Go, PHP, C# and JavaScript
Same request, in the languages that do not fit above.
Complete runnable programs — each handling the { data, meta } wrapper, the error shape and the optional API key — live in examples/sdk/ in the repository: mortgage.go, mortgage.php, Mortgage.cs and mortgage.js.
For a fully typed client in any language, generate one from the OpenAPI document rather than writing it by hand — it describes all sixteen endpoints and stays in step with the server, because it is generated from the same schemas the endpoints validate against.
Checking it worked
Once connected, ask the assistant something only the server can answer — “what would a $450,000 house in New Jersey cost per month at 6.5% with 10% down?” A correct answer will cite New Jersey's property tax rate and include mortgage insurance, because the tool returns both. If the assistant answers from memory instead, the server is not connected: the figures will be round, and no state tax rate will appear.