Banking MCP Server
A comprehensive banking system with MCP server capabilities and REST API, enabling account management, deposits, withdrawals, transfers, and transaction history through natural language or HTTP endpoints.
README
Pure Banking System# Pure Banking System# Banking MCP Server - Implementation Complete! π¦
A complete banking system with both console and GUI interfaces, implemented in pure Python with no external dependencies.
Quick StartA simple, standalone banking system implementation in Python with no external dependencies.A comprehensive Banking System with full Model Context Protocol (MCP) support, providing both MCP server capabilities and REST API endpoints.
Windows Launcher Menu:
banking_mcp.bat## Quick Start## π Project Structure
Choose from:
-
Console Interface (Interactive CLI)
-
GUI Interface (Graphical)Run the system using the Windows batch file:```
-
Run Tests
### Direct Python Execution:
```cmdbanking_mcp.batβββ banking_mcp_server.py # Main server implementation
python banking_ui.py # GUI Interface
python banking_mcp_server.py # Console Interface```βββ requirements.txt # Python dependencies
python test_banking_system.py # Test Suite
```βββ banking_mcp.bat # Windows launch script
## FeaturesOr run directly with Python:βββ claude_desktop_config.json # Claude Desktop configuration
- **Multiple User Interfaces**: Both GUI and console modes```cmdβββ test_banking_server.py # Comprehensive test suite
- **Complete Banking Operations**: Accounts, deposits, withdrawals, transfers
- **Transaction History**: Full audit trail with detailed reportingpython banking_mcp_server.pyβββ BANKING_NewMCP_README.md # Original requirements
- **Input Validation**: Comprehensive error checking
- **Data Persistence**: JSON-based storagepython test_banking_system.py # To run testsβββ README.md # This file
- **Zero Dependencies**: Uses only Python standard library
User Interfaces
π₯οΈ GUI Interface (banking_ui.py)
-
Tabbed interface with dedicated sections for each operation## Features## π Quick Start
-
Real-time account balance updates
-
Transaction history viewer
-
System information dashboard
-
User-friendly forms and validation- Complete banking operations (accounts, deposits, withdrawals, transfers)### 1. Install Dependencies
π» Console Interface (banking_mcp_server.py)- Transaction history and reporting
-
Interactive menu-driven CLI
-
All banking operations available- Input validation and error handling```powershell
-
Formatted output with emojis and colors
-
Keyboard shortcuts and error handling- JSON-based data persistencepip install -r requirements.txt
For detailed documentation, see BANKING_README.md.- Comprehensive test suite```
For detailed documentation, see BANKING_README.md.### 2. Run Tests
python test_banking_server.py
3. Start the Server
MCP Server Only (for Claude Desktop):
python banking_mcp_server.py --mode mcp
REST API Only:
python banking_mcp_server.py --mode rest --port 3003
Both MCP + REST:
python banking_mcp_server.py --mode both --port 3003
Using Windows Batch File:
banking_mcp.bat --mode both --port 3003
π§ Claude Desktop Integration
- Copy the configuration from
claude_desktop_config.json - Add it to your Claude Desktop MCP settings
- Restart Claude Desktop
- The banking tools will be available in Claude!
π οΈ Available MCP Tools
| Tool | Description | Parameters |
|---|---|---|
create_account |
Create new banking account | userName, initialDeposit, accountType, bankName |
get_account |
Get account details | accountNumber |
deposit |
Deposit money | accountNumber, amount, description |
withdraw |
Withdraw money | accountNumber, amount, description |
transfer |
Transfer between accounts | fromAccountNumber, toAccountNumber, amount, description |
list_accounts |
List all accounts | - |
get_transactions |
Get transaction history | accountNumber |
close_account |
Close account (zero balance) | accountNumber |
π MCP Resources
Access system information through these resources:
banking://system/info- System information and capabilitiesbanking://accounts/summary- Accounts summary with totalsbanking://api/endpoints- Available REST API endpoints
π‘ MCP Prompts
Get help with these built-in prompts:
banking_guide- Comprehensive banking operations guidetransaction_help- Transaction-specific help (with optional transaction_type)account_setup- Account setup guide (with optional account_type)
π REST API Endpoints
When running in REST mode, these endpoints are available:
Account Management
POST /api/accounts- Create accountGET /api/accounts- List all accountsGET /api/accounts/{account_number}- Get account detailsDELETE /api/accounts/{account_number}- Close account
Transactions
POST /api/accounts/{account_number}/deposit- Deposit moneyPOST /api/accounts/{account_number}/withdraw- Withdraw moneyPOST /api/transfer- Transfer between accountsGET /api/accounts/{account_number}/transactions- Get transaction history
System
GET /api/health- Health checkGET /api/system/info- System information
π» Usage Examples
MCP Tool Usage (in Claude Desktop)
// Create a new savings account
create_account(userName="Alice Smith", initialDeposit=1500.00, accountType="savings")
// Make a deposit
deposit(accountNumber="ACC000001", amount=500.00, description="Monthly salary")
// Transfer money
transfer(fromAccountNumber="ACC000001", toAccountNumber="ACC000002", amount=250.00, description="Payment")
// Get account information
get_account(accountNumber="ACC000001")
// View transaction history
get_transactions(accountNumber="ACC000001")
REST API Usage
# Create account
curl -X POST http://localhost:3003/api/accounts \
-H "Content-Type: application/json" \
-d '{"userName":"John Doe", "initialDeposit":1000, "accountType":"checking"}'
# Make deposit
curl -X POST http://localhost:3003/api/accounts/ACC000001/deposit \
-H "Content-Type: application/json" \
-d '{"amount":500, "description":"Salary deposit"}'
# Get account details
curl http://localhost:3003/api/accounts/ACC000001
# List all accounts
curl http://localhost:3003/api/accounts
β¨ Key Features Implemented
β MCP Protocol Support
- Full MCP 2024-11-05 specification compliance
- Stdio transport for MCP client communication
- 8 comprehensive banking tools
- 3 system information resources
- 3 interactive prompts with help
β Banking Operations
- Account creation (checking, savings, business)
- Deposits and withdrawals with validation
- Inter-account transfers
- Transaction history tracking
- Account closure (with zero balance requirement)
- Comprehensive error handling
β Data Validation
- Amount validation (positive, reasonable limits)
- Account state checking (active/closed)
- Sufficient balance verification
- Input sanitization and validation
β REST API Wrapper
- Complete REST endpoints matching MCP tools
- CORS support for web applications
- JSON request/response format
- Health monitoring endpoints
β Windows Integration
- PowerShell-compatible batch file
- Windows path handling
- Claude Desktop configuration ready
π§ͺ Testing
Run the comprehensive test suite:
python test_banking_server.py
Tests cover:
- All banking operations
- MCP tool definitions
- Data validation and edge cases
- Error handling scenarios
ποΈ Architecture
The system follows a clean architecture:
-
Core Banking System (
BankingSystemclass)- Pure business logic
- No external dependencies
- Comprehensive validation
-
MCP Server Layer (
BankingMCPServerclass)- MCP protocol implementation
- Tool/resource/prompt handlers
- Async communication
-
REST API Layer (Flask app)
- HTTP endpoint wrapper
- JSON serialization
- CORS support
-
Data Models
AccountdataclassTransactiondataclass- Type safety with proper validation
π Security & Validation
- Input validation on all operations
- Amount range checking (prevents overflow)
- Account state verification
- Transaction atomicity
- Error boundary handling
π Future Enhancements
Potential improvements:
- Persistent data storage (SQLite/PostgreSQL)
- Authentication and authorization
- Interest calculation for savings accounts
- Transaction limits and daily caps
- Multi-currency support
- Audit logging
π€ Usage Tips
- For MCP Development: Use
--mode mcpfor Claude Desktop integration - For Web Development: Use
--mode bothto test REST APIs while having MCP access - For Testing: Run test suite before deployment
- For Production: Consider adding persistent storage and authentication
β Troubleshooting
MCP Server Won't Start:
- Check Python version (3.8+)
- Verify MCP dependencies:
pip install mcp - Check file paths in Claude Desktop config
REST API Issues:
- Install Flask:
pip install flask flask-cors - Check port availability
- Verify firewall settings
Tool Not Working in Claude:
- Restart Claude Desktop after config changes
- Check MCP server logs in Claude Desktop
- Verify file paths are absolute
π Your Banking MCP Server is ready! Start with the test suite, then try it in Claude Desktop or via REST API.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.