How ashoktallapelli/retail_banking_mcp works
Project Type and Purpose
• This is a backend‐focused retail banking system written in Python, exposing both a REST API and an MCP (Mainframe Control Program)-style CLI interface for account management and transactions. It persists data in a local SQLite database (banking.db).
Top-Level Components
a. Clients
• HTTP Clients (Postman, Browser) calling REST endpoints
• MCP CLI tools invoking Python functions directly
b. API Server
• Entry point script (combined_server.py or banking_server.py)
• Web framework (e.g., FastAPI + Uvicorn) hosting the REST endpoints
• OpenAPI docs at /docs
c. Business Logic Layer
• Endpoint handlers in main.py or banking_server.py
• Transaction and account‐management services
d. Data Access Layer
• accounts_db.py implementing CRUD operations against SQLite
e. Database
• banking.db (SQLite) with Accounts and Transactions tables
Relationships and Data Flow
• HTTP Client → REST API Server
• Client issues HTTP requests → Endpoint handlers
• Handler invokes service logic → Data access layer → SQLite
• Results flow back up to client as JSON
• MCP CLI Tool → Service Layer
• MCP calls Python functions (mcp_open_new_account(), etc.)
• These functions map directly to the same service and DAO code paths
• All mutations and reads go through accounts_db.py to banking.db
Architectural Patterns and Principles
• Layered Architecture: Presentation (API & MCP interface) → Business Logic → Data Access → Persistence
• Single-service, single-database, no distributed microservices
• Clear separation of concerns and single responsibility per module
Technologies and Frameworks
• Python 3.x
• FastAPI (or similar) + Uvicorn for REST API
• MCP Python interface for CLI tooling
• SQLite (banking.db) as embedded persistence
• SQLAlchemy or raw sqlite3 in accounts_db.py