leonvz-banking-mcp
Version:
A comprehensive Banking MCP server for Bancon Bank - demonstrating banking tools, resources, and prompts
299 lines (223 loc) ⢠10.1 kB
Markdown
# Bancon Bank MCP Server
A comprehensive **Model Context Protocol (MCP)** server for **Bancon Bank** that demonstrates powerful banking capabilities through all three main MCP categories:
- **š§ Banking Tools** - Execute banking operations and financial calculations
- **š Banking Resources** - Access account data, rates, and financial information
- **š¬ Banking Prompts** - Financial guidance and banking assistance templates
This is a proof-of-concept demonstrating how MCP servers can provide sophisticated banking capabilities to AI agents, enabling customers to manage their finances through natural conversation.
## Installation
### Option 1: Use with npx (Recommended)
The easiest way to use this banking MCP server is with `npx`:
```bash
npx leonvz-banking-mcp
```
### Option 2: Install globally
```bash
npm install -g leonvz-banking-mcp
leonvz-banking-mcp
```
### Option 3: Install locally
```bash
npm install leonvz-banking-mcp
npx leonvz-banking-mcp
```
## Claude Desktop Integration
To use this banking server with Claude Desktop, add it to your configuration:
**macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
**Windows**: `%APPDATA%/Claude/claude_desktop_config.json`
```json
{
"mcpServers": {
"bancon-bank": {
"command": "npx",
"args": ["-y", "leonvz-banking-mcp"]
}
}
}
```
Alternatively, if you installed it globally:
```json
{
"mcpServers": {
"bancon-bank": {
"command": "leonvz-banking-mcp"
}
}
}
```
## What is MCP for Banking?
The **Model Context Protocol (MCP)** enables AI agents to securely access and interact with banking systems. For **Bancon Bank**, this means customers can:
- Access real-time account data through **Resources**
- Execute banking operations through **Tools** (transfers, payments, etc.)
- Get financial guidance through **Prompts** (investment advice, budgeting help)
Think of MCP as a secure, standardized API that allows AI assistants to become your personal banking advisor.
## Banking Capabilities
### š§ Banking Tools
Execute secure banking operations and financial calculations with real-time data updates.
**Available Tools:**
- `get_account_balance` - Check account balances for checking, savings, and credit accounts
- `transfer_money` - Transfer funds between accounts with full transaction logging
- `get_transaction_history` - Retrieve detailed transaction history with filtering
- `get_interest_rates` - Access current rates for deposits, loans, and investments
- `calculate_loan_payment` - Calculate loan payments with Bancon rate comparisons
- `pay_bill` - Schedule and execute bill payments with confirmation
### š Banking Resources
Access comprehensive banking data including account information, rates, and transaction records.
**Available Resources:**
- `bank://config/settings` - Bancon Bank configuration and contact information
- `customer://profile/{customerId}` - Complete customer profile with account summaries
- `bank://customer/details` - Demo customer details (Leon van Zyl from Mossel Bay, SA)
- `bank://rates/current` - Real-time interest rates and exchange rates
- `bank://products/catalog` - Complete banking products and services catalog
- `bank://transactions/{accountId}` - Transaction history for specific accounts
- `bank://logs/operations` - Banking system operational logs
### š¬ Banking Prompts
Get personalized financial advice and guidance through structured banking consultations.
**Available Prompts:**
- `financial-advice` - Personalized financial advice based on goals and situation
- `loan-application` - Comprehensive loan application guidance and requirements
- `budgeting-help` - Personalized budgeting strategies and recommendations
- `investment-guidance` - Investment advice tailored to risk tolerance and goals
- `credit-consultation` - Credit improvement strategies and debt management
- `banking-consultation` - General banking advice and product recommendations
## Quick Start with Banking Features
### 1. Install and Test
```bash
# Install the banking MCP server
npm install -g leonvz-banking-mcp
# Test with MCP Inspector
npx @modelcontextprotocol/inspector leonvz-banking-mcp
```
The MCP Inspector opens an interactive web interface where you can test all banking tools, resources, and prompts.
### 2. Connect to Claude Desktop
Add the banking server to your Claude Desktop configuration and restart Claude:
```json
{
"mcpServers": {
"bancon-bank": {
"command": "npx",
"args": ["-y", "leonvz-banking-mcp"]
}
}
}
```
## Banking Usage Examples
### Banking Tools Examples
Try asking Claude (when connected):
- "Check my account balance for customer CUST001"
- "Transfer $500 from ACC001001 to ACC001002"
- "Show me transaction history for account ACC001001"
- "What are the current mortgage rates?"
- "Calculate monthly payment for a $25,000 auto loan at 5.5% for 60 months"
- "Pay my electric bill of $245.60 from my checking account"
### Banking Resources Examples
Try asking Claude:
- "Show me Bancon Bank's operating hours and contact information"
- "Get the complete profile for customer CUST001"
- "Show me the demo customer details for Leon van Zyl"
- "What are the current CD rates?"
- "Show me all available banking products"
- "Get recent transactions for account ACC002001"
### Financial Guidance Examples
Try asking Claude:
- "I want to save for retirement - give me financial advice using the financial-advice prompt"
- "Help me understand mortgage loan requirements using the loan-application prompt"
- "Create a budget for my $5,000 monthly income using the budgeting-help prompt"
- "I want to invest $10,000 for long-term growth - use the investment-guidance prompt"
- "I want to improve my credit score - use the credit-consultation prompt"
## Mock Banking Data
This server includes comprehensive mock data for demonstration:
### Sample Customers
- **CUST001** - Alice Johnson (Premium customer with checking, savings, and credit card)
- **CUST002** - Bob Smith (Standard customer with checking and savings)
- **CUST003** - Charlie Brown (Student customer with student accounts)
### Banking Products
- Multiple account types (checking, savings, money market, CDs)
- Various loan products (personal, auto, mortgage, home equity)
- Credit cards with different reward structures
- Investment products with competitive rates
### Interest Rates
- Competitive deposit rates from 0.05% to 4.75%
- Loan rates from 4.99% to 21.99% depending on product
- Real-time exchange rates for major currencies
- Treasury and investment rates
## Project Structure
```
banking-mcp/
āāā src/
ā āāā server.ts # Main banking MCP server implementation
āāā dist/ # Compiled JavaScript output
āāā mcp-data/ # Banking data directory
ā āāā config.json # Bancon Bank configuration
ā āāā users.json # Customer accounts and profiles
ā āāā transactions.json # Transaction history
ā āāā rates.json # Interest rates and exchange rates
ā āāā products.json # Banking products catalog
ā āāā app.log # Banking system logs
āāā package.json
āāā tsconfig.json
āāā README.md
```
## Key Banking Features
### Secure Account Management
- Multi-account balance checking
- Real-time transaction tracking
- Account-to-account transfers
- Credit card and loan management
### Financial Calculations
- Loan payment calculations with current rates
- Interest rate comparisons
- Budget planning assistance
- Investment return projections
### Bill Payment System
- Scheduled and immediate payments
- Multiple payment categories
- Transaction confirmation and tracking
- Balance verification before payment
### Comprehensive Financial Guidance
- Personalized investment advice
- Credit improvement strategies
- Budgeting and savings plans
- Loan application assistance
## Why MCP for Banking?
This project demonstrates how MCP can revolutionize banking customer service:
1. **Natural Interaction** - Customers can ask questions in plain English
2. **Real-time Data** - Access to live account balances and transaction history
3. **Secure Operations** - All banking operations maintain proper transaction logs
4. **Personalized Advice** - AI can provide tailored financial guidance
5. **Comprehensive Service** - One interface for all banking needs
## Development Setup (Optional)
If you want to contribute or modify the banking server:
### 1. Clone and Install Dependencies
```bash
git clone https://github.com/leonvanzyl/banking-mcp.git
cd banking-mcp
npm install
```
### 2. Build the Server
```bash
npm run build
```
### 3. Test Locally
```bash
npm run inspector
```
## Security Note
This is a **demonstration/proof-of-concept** banking MCP server using mock data. In a production environment, this would require:
- Proper authentication and authorization
- Encrypted data transmission
- Compliance with banking regulations (PCI DSS, SOX, etc.)
- Real-time fraud detection
- Audit logging and monitoring
- Integration with core banking systems
## Future Enhancements
Potential expansions for this banking MCP server:
- **Investment Management** - Portfolio tracking and rebalancing
- **Credit Monitoring** - Real-time credit score updates
- **Fraud Alerts** - Suspicious activity notifications
- **Financial Planning** - Long-term financial goal tracking
- **Tax Integration** - Tax document generation and planning
- **Insurance Products** - Insurance policy management
## License
MIT License - See LICENSE file for details.
---
**Bancon Bank MCP Server** - Bringing the future of AI-powered banking to your conversations.