Skip to main content
Glama
srinivasks1974

Banking MCP Server

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:

  1. Console Interface (Interactive CLI)

  2. GUI Interface (Graphical)Run the system using the Windows batch file:```

  3. 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

Related MCP server: MCP Banking Server

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

  1. Copy the configuration from claude_desktop_config.json

  2. Add it to your Claude Desktop MCP settings

  3. Restart Claude Desktop

  4. 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 capabilities

  • banking://accounts/summary - Accounts summary with totals

  • banking://api/endpoints - Available REST API endpoints

πŸ’‘ MCP Prompts

Get help with these built-in prompts:

  • banking_guide - Comprehensive banking operations guide

  • transaction_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 account

  • GET /api/accounts - List all accounts

  • GET /api/accounts/{account_number} - Get account details

  • DELETE /api/accounts/{account_number} - Close account

Transactions

  • POST /api/accounts/{account_number}/deposit - Deposit money

  • POST /api/accounts/{account_number}/withdraw - Withdraw money

  • POST /api/transfer - Transfer between accounts

  • GET /api/accounts/{account_number}/transactions - Get transaction history

System

  • GET /api/health - Health check

  • GET /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:

  1. Core Banking System (BankingSystem class)

    • Pure business logic

    • No external dependencies

    • Comprehensive validation

  2. MCP Server Layer (BankingMCPServer class)

    • MCP protocol implementation

    • Tool/resource/prompt handlers

    • Async communication

  3. REST API Layer (Flask app)

    • HTTP endpoint wrapper

    • JSON serialization

    • CORS support

  4. Data Models

    • Account dataclass

    • Transaction dataclass

    • 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

  1. For MCP Development: Use --mode mcp for Claude Desktop integration

  2. For Web Development: Use --mode both to test REST APIs while having MCP access

  3. For Testing: Run test suite before deployment

  4. 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.

F
license - not found
-
quality - not tested
C
maintenance

Maintenance

–Maintainers
–Response time
–Release cycle
–Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/srinivasks1974/MCP-server-python'

If you have feedback or need assistance with the MCP directory API, please join our Discord server