商业贷款验证服务

MCP服务器提供商业贷款文档验证功能,适用于牙科诊所贷款工作流,支持10种工具跨5个领域调用。

  • by bhushanon
  • TypeScript
  • 本地部署
  • 更新于
在 GitHub 查看 bhushanon/loan-verification-mcp-server

使用说明

贷款验证mcp服务器

MCP服务器 第二阶段:商业贷款文件验证 --牙科诊所贷款工作流程。

在5个域中公开10个工具,可由Claude和任何兼容MCP的AI代理调用。


可用工具

工具 域 描述
doc_parse_document 文档 OCR解析+篡改检测
doc_validate_document_set 文档 检查贷款类型的完整性
kyc_validate_pan KYC PAN验证+观察名单屏幕
kyc_verify_aadhaar KYC Aadhaar身份+人脸匹配
gst_verify_gstin GST GST实体+外壳检测
gst_get_filing_history GST 月度申报趋势
fraud_query_registry 欺诈 跨银行欺诈信号查找
fraud_submit_signal 欺诈 写回新的欺诈信号
credential_verify_dental 凭证 DCI牙科登记检查
orchestrate_stage2_verification 编排 A2A管道协调器
orchestrate_generate_verification_summary 编排 最终风险总结

快速启动(地方发展)

# 1. Install dependencies
npm install

# 2. Build TypeScript
npm run build

# 3. Run with mock APIs (no real API keys needed)
npm start

# 4. Test with MCP Inspector
npm run inspect

部署到AWS EC2

# On EC2 — install Node.js 20
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt install -y nodejs

# Clone/upload project
scp -i your-key.pem -r ./loan-verification-mcp-server ec2-user@YOUR_EC2_IP:~/

# Install and build
cd loan-verification-mcp-server
npm install
npm run build

# Run as HTTP server (for Claude API integration)
TRANSPORT=http PORT=3001 npm start

# Keep alive with PM2
npm install -g pm2
pm2 start "TRANSPORT=http PORT=3001 npm start" --name loan-mcp
pm2 save
pm2 startup

Nginx反向代理配置

location /loan-mcp/ {
    proxy_pass http://localhost:3001/;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
}

连接到Claude(Claude_desktop_config.json)

对于 本地克劳德桌面 (标准版本):

{
  "mcpServers": {
    "loan-verification": {
      "command": "node",
      "args": ["/path/to/loan-verification-mcp-server/dist/index.js"],
      "env": {
        "USE_MOCK_APIS": "true"
      }
    }
  }
}

对于 远程HTTP (EC2):

{
  "mcpServers": {
    "loan-verification": {
      "url": "http://YOUR_EC2_IP:3001/mcp"
    }
  }
}

切换到真实API

设置环境变量并设置 USE_MOCK_APIS=false:

export USE_MOCK_APIS=false
export PAN_API_KEY=your_nsdl_key
export GST_API_KEY=your_gst_key
export AADHAAR_API_KEY=your_uidai_key
export FRAUD_API_KEY=your_internal_key
export OCR_API_KEY=your_aws_textract_key
export DENTAL_API_KEY=your_dci_key

# Set real endpoints
export PAN_VERIFY_URL=https://your-pan-api.com/verify
export GST_VERIFY_URL=https://api.gst.gov.in/commonapi
export OCR_URL=https://your-aws-textract-wrapper.com

克劳德对话示例

User: I have a new dental clinic loan application. 
      Case ID: LOAN-2024-001
      Applicant: Dr. Rajesh Sharma, PAN: ABCDE1234F
      Loan type: clinic_setup
      Uploaded docs: PAN_CARD, AADHAAR, DENTAL_DEGREE_BDS, ITR, BANK_STATEMENT

Claude: [calls orchestrate_stage2_verification]
→ Gets execution plan with 7 steps

[calls doc_validate_document_set] → PASS: PROJECT_REPORT and LEASE_AGREEMENT missing
[asks user for missing docs]
[calls kyc_validate_pan + fraud_query_registry in parallel]
→ PAN: PASS | Fraud: PASS
[calls kyc_verify_aadhaar + credential_verify_dental]
→ Aadhaar: PASS | Credential: PASS (9 years practice)
[calls orchestrate_generate_verification_summary]
→ Risk score: 10/100 (LOW) | PROCEED TO STAGE 3

项目结构

src/
├── index.ts                    # Server entry point + transport config
├── constants.ts                # API endpoints, keys, thresholds
├── types/index.ts              # TypeScript domain types
├── services/
│   ├── apiClient.ts            # Shared HTTP client + utilities
│   └── mockData.ts             # Mock API responses for development
└── tools/
    ├── documentTools.ts        # OCR, document validation
    ├── kycTools.ts             # PAN, Aadhaar
    ├── gstTools.ts             # GST verification
    ├── fraudAndCredentialTools.ts  # Fraud registry, dental credentials
    └── orchestrationTools.ts   # A2A pipeline coordinator