Mortgage MCP Server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Mortgage MCP ServerWhat's the monthly payment on a $500k mortgage at 6% over 30 years?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Mortgage MCP Server
A Model Context Protocol (MCP) server that provides mortgage calculation tools for real estate agents and AI assistants.
Features
Monthly Payment Calculation: Calculate fixed monthly payments for mortgages
Amortization Schedules: Generate complete payment schedules with principal/interest breakdown
Lump Sum Payments: Model the impact of lump sum payments on loan payoff
Extra Monthly Payments: Calculate accelerated payoff with extra payments
Structured Logging: Full observability with
structlogType Safety: 100% typed with Python 3.13+
Clean Architecture: Domain → Services → MCP Server layers
Related MCP server: Real Estate MCP Server
Quick Start
Installation
# Create environment
python3.13 -m venv .venv
source .venv/bin/activate
# Install dependencies
pip install -e ".[dev]"Running the Server
python -m mortgage_mcp_server.serverRunning with Docker
The server can run in a Docker container for easier deployment and isolation.
Build the image:
# Using the build script (recommended)
chmod +x build.sh
./build.sh
# Or using docker directly
docker build -t mortgage-mcp-server:latest .Run the container:
docker run -i mortgage-mcp-server:latestThe -i (interactive) flag is required — it keeps stdin open for MCP stdio communication with VSCode/Claude.
Using Docker Compose:
docker-compose up --buildFor full Docker setup and VSCode integration details, see DOCKER.md.
Example: Calculate Monthly Payment
Using the MCP protocol, call the calculate_monthly_payment tool:
{
"principal": 350000,
"annual_interest_rate": 6.5,
"loan_term_years": 30
}Returns:
{
"principal": "350000",
"annual_interest_rate": "6.5",
"loan_term_years": 30,
"monthly_payment": "2208.84"
}Architecture
src/mortgage_mcp_server/
├── domain/ # Pure mortgage calculation logic
│ └── mortgage.py # Core math (monthly payment, amortization, etc.)
├── schemas/ # Pydantic models for validation
│ └── loan.py # Input/output schemas
├── services/ # Application orchestration
│ └── calculator.py # Service layer coordinating domain + I/O
├── server.py # MCP server exposing tools
└── logging.py # Centralized structlog configurationDesign Principles
Domain Layer: Pure functions with no I/O, fully typed, comprehensive docstrings
Services Layer: Orchestrates domain logic, validates at boundaries, uses Pydantic
MCP Server: Exposes tools via Model Context Protocol
Logging: Structured events via
structlogfor observability
Available Tools
calculate_monthly_payment
Calculate the fixed monthly payment for a mortgage.
Parameters:
principal(number): Loan amount in dollarsannual_interest_rate(number): Annual rate as percentage (e.g., 6.5)loan_term_years(integer): Loan term in years
Returns: Monthly payment amount
get_amortization_schedule
Get the complete amortization schedule.
Parameters:
principal(number): Loan amountannual_interest_rate(number): Annual rate as percentageloan_term_years(integer): Loan term in years
Returns: Full schedule with payment-by-payment breakdown
calculate_with_lump_sum
Model the impact of a lump sum payment at a specific month.
Parameters:
principal(number): Loan amountannual_interest_rate(number): Annual rateloan_term_years(integer): Loan termmonthly_payment(number): Regular monthly paymentlump_sum_amount(number): Lump sum amountmonth_to_apply(integer): Which month to apply the lump sum
Returns: Updated amortization schedule
calculate_with_extra_payments
Model accelerated payoff with extra monthly payments.
Parameters:
principal(number): Loan amountannual_interest_rate(number): Annual rateloan_term_years(integer): Loan termmonthly_payment(number): Base monthly paymentextra_monthly_payment(number): Extra amount per monthnum_months_with_extra(integer): How many months to apply extra
Returns: Updated amortization schedule
Testing
# Run tests
pytest tests/
# Run with coverage
pytest --cov=src/mortgage_mcp_server tests/
# View coverage report
pytest --cov=src/mortgage_mcp_server --cov-report=html tests/VSCode Integration
To use this MCP server with Claude in VSCode, add to your settings.json:
{
"claude.mcp.servers": {
"mortgage-calculator": {
"command": ".venv/bin/python",
"args": ["-m", "mortgage_mcp_server.server"],
"cwd": "/Users/jibbs/Documents/git-projects/mortgage-mcp-server",
"env": {
"PYTHONPATH": "src"
}
}
}
}Or with Docker:
{
"claude.mcp.servers": {
"mortgage-calculator": {
"command": "docker",
"args": ["run", "-i", "mortgage-mcp-server:latest"],
"env": {
"PYTHONUNBUFFERED": "1"
}
}
}
}After updating settings, restart VSCode. Claude will now have access to all 4 mortgage calculation tools.
Quality Assurance
# Lint
ruff check src/ tests/
# Format
ruff format src/ tests/
# Check formatting
ruff format --check src/ tests/
# Type check (when Ty is installed)
ty checkDevelopment
This project follows clean architecture principles and the conventions in .github/copilot-instructions.md.
Key Conventions
Python 3.13+ with strict type checking
Ruff for linting and formatting
Pytest for testing
Pydantic for input validation
Structlog for structured logging
Decimal for precise financial calculations
Making Changes
Implement in appropriate layer (domain/services/server)
Add/update types (no
Anyunless justified)Add docstrings to public APIs
Write tests for new functionality
Run quality checks:
ruff check . ruff format . pytest tests/Verify all checks pass before committing
License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseDqualityCmaintenanceProvides access to RateSpot.io mortgage rate APIs, enabling AI assistants to fetch real-time mortgage rates, compare loan products, calculate payments, and access comprehensive lending information.7
- Alicense-quality-maintenanceEnables real estate property searches with location and criteria filtering, plus comprehensive mortgage calculations including monthly payments and affordability analysis. Currently uses mock data for property searches but provides full mortgage calculation functionality.
- Alicense-qualityAmaintenanceMortgage Calculator AI - MCP server providing AI-powered tools and automation by MEOK AI Labs6MIT
- AlicenseAqualityBmaintenanceEnables AI assistants to answer mortgage-related queries by providing tools for lender search, loan limit lookup, down-payment assistance programs, and more, with data sourced from real wholesale lenders and broker-curated intel.89MIT
Related MCP Connectors
Singapore property & financial data APIs for AI agents. 27 MCP tools. x402 micropayments.
Verified Canadian real-estate experts & housing data: vetted pros, market stats, rates, tax math.
Precision math engine for AI agents. 203 exact methods. Zero hallucination.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/jibbs1703/Financial-Tools-MCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server