Banking MCP Server

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.

Category
Visit Server

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:

  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

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.

Recommended Servers

playwright-mcp

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.

Official
Featured
TypeScript
Magic Component Platform (MCP)

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.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

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.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

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.

Official
Featured
TypeScript
Kagi MCP Server

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.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

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.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured