MCP Server (Mortgage Comparison Platform)

MCP Server (Mortgage Comparison Platform)

Canonical MCP server for parsing Loan Estimate (LE) and Closing Disclosure (CD) PDFs into MISMO-compliant JSON with LLM-enriched context. Built for AI-driven mortgage automation, compliance, and decisioning.

confersolutions

Research & Data
Visit Server

README

MCP Server (Mortgage Comparison Platform)

A FastAPI-based server that provides mortgage document parsing and comparison tools through a standardized API. The server is designed to be easily integrated with various AI frameworks including CrewAI, AutoGen, and LangChain.

Currently implements a basic "hello" tool as a proof of concept, with mortgage document parsing tools coming soon.

Version License: MIT Website

Status

This is a beta release (v0.1.0) that provides:

  • Core server infrastructure with security features
  • Basic "hello" tool for testing framework integrations
  • Example integrations with CrewAI, AutoGen, and LangChain

Future versions will add mortgage document parsing and comparison tools.

Features

  • FastAPI server with production-ready features:
    • API key authentication
    • Rate limiting support
    • CORS middleware configuration
  • Framework integrations for AI agents:
    • CrewAI
    • AutoGen
    • LangChain
  • Extensible architecture for adding mortgage parsing tools
  • Open source for transparency and community contributions

Quick Start

  1. Clone the repository:
    git clone https://github.com/confersolutions/mcp-mortgage-server.git
    cd mcp-mortgage-server
    

Roadmap

  • ✅ Core server infrastructure with security and rate limiting
  • ✅ Framework integrations (CrewAI, AutoGen, LangChain)
  • ✅ Basic tool implementation ("hello" endpoint)
  • 🚧 Loan Estimate (LE) parsing to MISMO format
  • 🚧 Closing Disclosure (CD) parsing
  • 🚧 Mortgage comparison tools
  • 🚧 Additional mortgage document analysis features

Installation

  1. Clone the repository
  2. Create a virtual environment:
    python -m venv .venv
    source .venv/bin/activate  # On Windows: .venv\Scripts\activate
    
  3. Install dependencies:
    pip install fastapi uvicorn slowapi python-dotenv
    pip install crewai autogen langchain langchain-openai
    

Configuration

Create a .env file in the root directory with the following variables:

API_KEY=your_api_key_here
RATE_LIMIT_PER_MINUTE=120
ALLOWED_ORIGINS=http://localhost:3000
HOST=0.0.0.0
PORT=8001
WORKERS=1

Running the Server

python server.py

The server will start on http://localhost:8001 by default.

API Endpoints

Health Check

GET /health
Response: {"status": "healthy"}

List Available Tools

GET /tools
Headers: X-API-Key: your_api_key_here
Response: List of available tools and their configurations

Call Tool

POST /call
Headers: X-API-Key: your_api_key_here
Body: {
    "tool": "hello",
    "input": {
        "name": "World"  // Optional
    }
}
Response: {
    "output": "Hello, World!"
}

Framework Integration Examples

See examples/test_all_integrations.py for examples of how to use the server with:

  • CrewAI
  • AutoGen
  • LangChain

CrewAI Example

from crewai import Agent, Task, Crew
from mcp_toolkit import MCPToolkitCrewAI

toolkit = MCPToolkitCrewAI()
tools = await toolkit.get_tools()

agent = Agent(
    role="Greeter",
    goal="Say hello to the user",
    tools=tools
)

task = Task(
    description="Say hello to the user",
    agent=agent
)

crew = Crew(
    agents=[agent],
    tasks=[task]
)

result = await crew.kickoff()

AutoGen Example

from autogen import AssistantAgent, UserProxyAgent
from mcp_toolkit import MCPToolkitAutoGen

toolkit = MCPToolkitAutoGen()
tools = await toolkit.get_tools()

assistant = AssistantAgent(
    name="assistant",
    llm_config={"tools": tools}
)

user_proxy = UserProxyAgent(
    name="user_proxy",
    code_execution_config={"use_docker": False}
)

await user_proxy.initiate_chat(assistant, message="Please say hello to Alice")

LangChain Example

from langchain.agents import Tool, AgentExecutor, create_react_agent
from langchain_openai import ChatOpenAI
from mcp_toolkit import MCPToolkitLangChain

toolkit = MCPToolkitLangChain()
tools = [
    Tool(
        name="hello",
        func=lambda x: asyncio.get_event_loop().run_until_complete(toolkit.hello(name=x)),
        description="A tool that says hello to someone",
        return_direct=True
    )
]

llm = ChatOpenAI(temperature=0)
agent = create_react_agent(llm, tools, prompt)
agent_executor = AgentExecutor(agent=agent, tools=tools)

result = await agent_executor.ainvoke({"input": "Please say hello to Bob"})

Rate Limiting

The server implements rate limiting using slowapi. By default, it's set to 120 requests per minute per IP address. This can be configured using the RATE_LIMIT_PER_MINUTE environment variable.

Security

  • API key authentication is required for all endpoints except /health
  • CORS is configured to allow specific origins (set via ALLOWED_ORIGINS environment variable)
  • All exceptions are caught and returned with appropriate error messages

Contributing

Feel free to open issues or submit pull requests for improvements.

About

This project is maintained by Confer Solutions. For questions or support, contact us at info@confersolutions.ai.

License

MIT License - see LICENSE file for details.

Recommended Servers

Crypto Price & Market Analysis MCP Server

Crypto Price & Market Analysis MCP Server

A Model Context Protocol (MCP) server that provides comprehensive cryptocurrency analysis using the CoinCap API. This server offers real-time price data, market analysis, and historical trends through an easy-to-use interface.

Featured
TypeScript
MCP PubMed Search

MCP PubMed Search

Server to search PubMed (PubMed is a free, online database that allows users to search for biomedical and life sciences literature). I have created on a day MCP came out but was on vacation, I saw someone post similar server in your DB, but figured to post mine.

Featured
Python
dbt Semantic Layer MCP Server

dbt Semantic Layer MCP Server

A server that enables querying the dbt Semantic Layer through natural language conversations with Claude Desktop and other AI assistants, allowing users to discover metrics, create queries, analyze data, and visualize results.

Featured
TypeScript
mixpanel

mixpanel

Connect to your Mixpanel data. Query events, retention, and funnel data from Mixpanel analytics.

Featured
TypeScript
Sequential Thinking MCP Server

Sequential Thinking MCP Server

This server facilitates structured problem-solving by breaking down complex issues into sequential steps, supporting revisions, and enabling multiple solution paths through full MCP integration.

Featured
Python
Nefino MCP Server

Nefino MCP Server

Provides large language models with access to news and information about renewable energy projects in Germany, allowing filtering by location, topic (solar, wind, hydrogen), and date range.

Official
Python
Vectorize

Vectorize

Vectorize MCP server for advanced retrieval, Private Deep Research, Anything-to-Markdown file extraction and text chunking.

Official
JavaScript
Mathematica Documentation MCP server

Mathematica Documentation MCP server

A server that provides access to Mathematica documentation through FastMCP, enabling users to retrieve function documentation and list package symbols from Wolfram Mathematica.

Local
Python
kb-mcp-server

kb-mcp-server

An MCP server aimed to be portable, local, easy and convenient to support semantic/graph based retrieval of txtai "all in one" embeddings database. Any txtai embeddings db in tar.gz form can be loaded

Local
Python
Research MCP Server

Research MCP Server

The server functions as an MCP server to interact with Notion for retrieving and creating survey data, integrating with the Claude Desktop Client for conducting and reviewing surveys.

Local
Python