Skip to content

MuhammadFarid1990/CreditSense

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

CreditSense

An agentic credit simulator built on the Model Context Protocol (MCP) with a real JSON-RPC 2.0 backend and a React/Vite frontend.

Not a ChatGPT wrapper. A proper MCP implementation with tool definitions, a stateful credit engine, and a clean UI that lets Claude reason over real financial decisions.


Demo

The user asks: "What happens to my credit score if I open two new cards and then miss a payment?"

Claude calls MCP tools in sequence — get_credit_profilesimulate_credit_action × 3 → explain_factorrecommend_actions — and returns a full scenario analysis with a timeline and action plan.


Architecture

┌─────────────────────────────────────────────────────────┐
│                     React / Vite UI                      │
│              Chat interface + credit dashboard           │
└───────────────────────────┬─────────────────────────────┘
                            │  HTTP
                            ▼
┌─────────────────────────────────────────────────────────┐
│              Node.js / Express MCP Server                │
│                  JSON-RPC 2.0 endpoint                   │
│                                                          │
│  Tools:                                                  │
│  • get_credit_profile     • simulate_credit_action       │
│  • explain_factor         • recommend_actions            │
│  • get_score_breakdown    • project_score_timeline       │
└───────────────────────────┬─────────────────────────────┘
                            │  Anthropic SDK
                            ▼
┌─────────────────────────────────────────────────────────┐
│                   Claude (via MCP)                       │
│        Decides which tools to call and in what order     │
└─────────────────────────────────────────────────────────┘

MCP Tools

Tool What it does
get_credit_profile Returns current simulated credit state (score, utilization, age, etc.)
simulate_credit_action Models the credit impact of an action (new card, late payment, payoff, etc.)
explain_factor Plain-English explanation of any credit factor
recommend_actions Claude generates a ranked action plan to improve score
get_score_breakdown Shows how each factor contributes to the current score
project_score_timeline Projects score trajectory over 6/12/24 months

What makes it technically interesting

Real JSON-RPC 2.0 — not a thin wrapper. The backend implements the MCP spec with proper tool schemas (JSON Schema), error codes, and stateful sessions.

Agentic loop — Claude decides which tools to call, in what order, based on context. The frontend just renders the result.

Stateful credit engine — each simulated action updates the credit state. Claude can chain multiple scenarios: "What if I do X, then Y, then Z?"


Tech stack

Layer Tech
Protocol MCP (Model Context Protocol) / JSON-RPC 2.0
Backend Node.js + Express
Frontend React + Vite + Tailwind CSS
LLM Claude (Anthropic SDK)
State In-memory session store

Quickstart

git clone https://github.com/MuhammadFarid1990/CreditSense
cd CreditSense

# Backend
cd server
npm install
cp .env.example .env
# Add your ANTHROPIC_API_KEY to .env
node index.js

# Frontend (new terminal)
cd ../client
npm install
npm run dev

Open http://localhost:5173.


Project structure

CreditSense/
├── server/
│   ├── index.js          # Express server + JSON-RPC 2.0 handler
│   ├── mcp/
│   │   ├── tools.js      # MCP tool definitions (JSON Schema)
│   │   ├── engine.js     # Credit scoring engine
│   │   └── session.js    # Stateful session management
│   └── .env.example
├── client/
│   ├── src/
│   │   ├── App.jsx       # Main chat interface
│   │   ├── Dashboard.jsx # Credit score visualization
│   │   └── api.js        # JSON-RPC client
│   └── package.json
└── README.md

About the builder

Muhammad Farid — MS Business Analytics & AI @ UT Dallas.

Portfolio · GitHub

Built with Claude.

About

MCP-based agentic credit simulator — JSON-RPC 2.0 backend + React frontend + Claude

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors