Banking MCP Server
Enables AI assistants to perform banking operations like creating customers and accounts, checking balances, transferring funds, and viewing transaction history through MCP tools.
README
Banking MCP Server
A Model Context Protocol (MCP) server that exposes banking operations as AI-accessible tools. This allows AI assistants like Claude to perform banking operations—creating customers and accounts, checking balances, transferring funds, and viewing transaction history—through a discoverable tool interface.
Architecture
The system consists of four main components:
┌─────────────────┐
│ MCP Host │ Claude Desktop, VS Code, or custom client
│ (AI Client) │
└────────┬────────┘
│ STDIO transport
↓
┌─────────────────┐
│ MCP Server │ Python server exposing 9 banking tools
│ │ + 5 resources + 3 prompts
└────────┬────────┘
│
↓
┌─────────────────┐
│ SQLite Database│ 4 tables: Customer, Account, Transaction, Transfer
└─────────────────┘
Components:
- MCP Server (Python): Exposes banking operations as MCP tools
- Database (SQLite): Stores customer, account, and transaction data
- MCP Client: Any MCP-compatible host (Claude Desktop, VS Code, custom implementations)
- Transport: STDIO (standard input/output) for local communication
Prerequisites
- Python 3.14+ (tested on 3.14.0)
- pip (Python package manager)
- Git (for cloning the repository)
Optional:
- Claude Desktop or VS Code with MCP support (for testing the server)
Installation
-
Clone the repository
cd path/to/your/projects git clone <repository-url> cd Banking_Assistant -
Create and activate a virtual environment
# Create virtual environment python -m venv venv # Activate (Windows) venv\Scripts\activate # Activate (macOS/Linux) source venv/bin/activate -
Install dependencies
pip install -r requirements.txt -
Initialize the database
# Create database with sample data (20 customers, 50 accounts) python src/database/init_db.py --seedExpected output:
[OK] Created CUSTOMER table [OK] Created ACCOUNT table [OK] Created TRANSACTION table [OK] Created FUND_TRANSFER table [OK] Created 20 customers (CUST001 - CUST020) [OK] Created 50 accounts (ACC000001 - ACC000050)
Configuration
Claude Desktop Setup
-
Locate your Claude Desktop config file:
- Windows:
%APPDATA%\Claude\claude_desktop_config.json - macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
- Windows:
-
Add the MCP server configuration:
{ "mcpServers": { "banking-assistant": { "command": "python", "args": [ "c:/path/to/Banking_Assistant/src/mcp_server/server.py" ] } } }Important: Use the absolute path to
server.pyon your system. -
Restart Claude Desktop to load the new server.
VS Code Setup
See docs/configuration.md for VS Code MCP extension setup.
Running the Server
The MCP server runs automatically when invoked by an MCP host (like Claude Desktop). You can also test it directly:
# Activate your virtual environment first
python src/mcp_server/server.py
Expected output:
Starting Banking MCP Server...
Server name: banking-assistant
Available tools: 9
Available resources: 5
Available prompts: 3
Transport: STDIO
Listening for MCP requests...
The server listens on stdin/stdout and waits for MCP protocol messages.
Testing
Quick Test in Claude Desktop
-
Verify the server is connected:
What banking tools do you have available?Expected: Claude lists 9 banking tools
-
Create a test customer:
Create a bank customer named John Doe with email john@example.com, phone +1234567890, and address 123 Main St, New York, NY 10001 -
Open an account and test a transfer:
For the customer just created: - Create a SAVINGS account with $5,000 - Create a CHECKING account with $2,000 - Transfer $500 from savings to checking - Show me the final balances
For comprehensive test scenarios and troubleshooting, see docs/testing.md.
Running Unit Tests
# Run all tests
python -m pytest tests/ -v
# Run specific test file
python -m pytest tests/test_tools.py -v
Manual Tool Testing
# Test individual tools
python test_tools.py
Project Structure
Banking_Assistant/
├── src/
│ ├── mcp_server/
│ │ ├── server.py # Main MCP server entry point
│ │ ├── tools.py # 9 banking tool implementations
│ │ ├── resources.py # 5 MCP resources (read-only data access)
│ │ └── prompts.py # 3 MCP prompt templates
│ ├── database/
│ │ ├── init_db.py # Database schema creation and seeding
│ │ ├── models.py # Data models (Customer, Account, etc.)
│ │ └── operations.py # CRUD operations
│ ├── client/
│ │ └── mcp_client.py # Example MCP client implementation
│ └── utils/
│ └── validators.py # Input validation functions
├── data/
│ └── banking.db # SQLite database (created by init_db.py)
├── tests/
│ ├── test_tools.py # Tool unit tests
│ ├── test_database.py # Database operation tests
│ └── test_integration.py # Integration tests
├── demo/
│ └── walkthrough.py # End-to-end demo script
├── docs/
│ ├── api-reference.md # Tool, resource, and prompt specifications
│ ├── testing.md # Testing guide and scenarios
│ └── configuration.md # Detailed configuration instructions
├── requirements.txt # Python dependencies
├── README.md # This file
└── CLAUDE.md # Context for AI assistants working on this repo
Key Files
src/mcp_server/server.py- Entry point that registers and exposes all toolssrc/mcp_server/tools.py- Implementation of the 9 banking operationssrc/database/init_db.py- Run this to create and populate the databasedata/banking.db- SQLite database (created automatically)
API Overview
Tools (9)
create_customer- Create a new customercreate_account- Open a bank accountget_balance- Check account balanceget_last_10_transactions- View transaction historytransfer_funds- Transfer money between accountsupdate_customer_address- Update customer addressupdate_customer_phone- Update customer phone numberget_customer_info- Retrieve customer detailsget_customer_accounts- List all accounts for a customer
Resources (5)
customers://all- List all customersaccounts://all- List all accountsaccounts://{id}- Get specific account detailstransactions://recent- View recent transactionstransfers://history- View transfer history
Prompts (3)
customer_summary- Generate customer profile summaryaccount_summary- Generate account overviewspending_pattern- Analyze spending patterns
For detailed specifications, see docs/api-reference.md.
Database Schema
The SQLite database contains 4 tables:
- CUSTOMER - Customer information (ID, name, email, phone, address)
- ACCOUNT - Bank accounts (account number, customer ID, type, balance, status)
- TRANSACTION - Transaction history (ID, account, date, amount, type, description)
- FUND_TRANSFER - Transfer records (ID, from/to accounts, amount, status, timestamp)
Sample data includes 20 customers and 50 accounts with realistic balances and transaction history.
Troubleshooting
Server not appearing in Claude Desktop:
- Verify the config file path is correct
- Check that the absolute path to
server.pyis correct - Restart Claude Desktop after config changes
- Check Claude Desktop logs for errors
Database errors:
- Ensure
data/banking.dbexists (runinit_db.pyif not) - Check file permissions on the database file
- Re-run
init_db.py --seedto recreate the database
Import errors:
- Verify virtual environment is activated
- Run
pip install -r requirements.txtagain - Check Python version is 3.14+
License
Educational project for the Claude Champion Program.
Additional Documentation
- API Reference - Complete tool, resource, and prompt specifications
- Testing Guide - Test scenarios and troubleshooting
- Configuration - Detailed MCP client setup instructions
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.