BankMCP
by RMAAPK
README.md
# š¦ BankMCP: Secure Model Context Protocol Banking Gateway
[](LICENSE)
[](https://github.com/RMAAPK)
[](https://github.com/punkpeye/fastmcp)
[](https://github.com/RMAAPK/dmcps)
**BankMCP** (engineered and maintained by **RMAA Holdings**) is an ultra-secure, Model Context Protocol (MCP) banking gateway built on TypeScript and `FastMCP`.
It enables AI Agents (Claude Desktop, ChatGPT, Gemini, ForgeAI) to query account balances, audit corporate ledgers, and prepare banking settlements **without the catastrophic risk of unauthorized fund drainage or prompt injection attacks**.
---
## š”ļø DMCPS-Grade Security Rails
Bank APIs are high-consequence tools for autonomous agents. BankMCP adapts the hardened sandbox and dashboard interception architecture pioneered in [DMCPS](https://github.com/RMAAPK/dmcps):
```
+---------------------------------------------------------------------------------------+
| BANKMCP INTERCEPTOR ARCHITECTURE |
+---------------------------------------------------------------------------------------+
| AI AGENT (Claude / GPT / Gemini) |
| ā |
| ā¼ JSON-RPC (FastMCP / Stdio / Stream) |
| [BANKMCP SECURITY INTERCEPTOR] āāāŗ Emergency Freeze Active? āāāŗ [INSTANT BLOCK] |
| ā |
| āāāāŗ Non-Whitelisted IBAN? āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāŗ [INSTANT BLOCK] |
| āāāāŗ Exceeds Transaction Cap ($500)? āāāāāāāāāāāāāāāāāāāāŗ [INSTANT BLOCK] |
| āāāāŗ Exceeds Daily Cumulative Cap ($2,000)? āāāāāāāāāāāāāŗ [INSTANT BLOCK] |
| ā |
| āāāāŗ Amount >= $100 (Human Gate)? āāāāāāāāāāāāāāāāāāāāāāāŗ [REQUIRES TOKEN] |
| ā ā |
| ā ā¼ |
| ā [DMCPS SECURED DASHBOARD] |
| ā Human Owner Approves Token |
| ā ā |
| ā¼ ā |
| [CORE BANKING / LEDGER EXECUTION] āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā |
+---------------------------------------------------------------------------------------+
```
### 1. Zero Direct Fund Drainage (Mathematical Whitelisting)
- The agent **cannot** transfer funds to arbitrary accounts or IBANs found in prompts.
- All recipients must pre-exist in the authorized Whitelist database, configured exclusively by a human administrator through the Web Dashboard.
### 2. Deterministic Velocity & Spending Caps
- **Single Transaction Cap:** Default `$500.00` maximum. Any single request above this is rejected at the schema level.
- **24-Hour Rolling Quota:** Cumulative daily transfers cannot exceed `$2,000.00`.
### 3. Human-In-The-Loop (HITL) Challenge Tokens
- Any transfer equal to or greater than `$100.00` generates a cryptographically signed challenge token (e.g. `AUTH_9B2A...`) with a 15-minute expiration.
- The transfer is held in a pending state until a human logs into the Dashboard to approve it, or provides the challenge token to the `submit_approval_token` tool.
### 4. Emergency Killswitch (DEFCON-1 Freeze)
- One-click freeze toggle on the dashboard immediately terminates all outbound transfer capabilities across all connected bank accounts.
---
## š ļø MCP Tools Exposed to AI
| Tool Name | Risk Level | Description |
| :--- | :--- | :--- |
| `list_accounts` | š¢ Safe (Read) | Lists authorized bank accounts with balances and masked IBANs. |
| `get_account_balance` | š¢ Safe (Read) | Real-time balance check for a specific corporate account ID. |
| `list_whitelisted_beneficiaries`| š¢ Safe (Read) | Lists pre-approved recipient IBANs and their daily limits. |
| `transfer_funds` | š“ High (Gated)| Drafts/executes transfer through whitelist, caps, and HITL gate. |
| `submit_approval_token` | š” Auth (Commit)| Submits human challenge token to finalize high-value transfer. |
| `get_security_status` | š¢ Safe (Read) | Audits active daily spent quotas, limits, and lockdown status. |
---
## š Quickstart & Dashboard
### 1. Install Dependencies & Build
```bash
npm install
npm run build
```
### 2. Configure Environment
```bash
cp .env.example .env
```
Edit `.env` to set your administrator credentials:
```env
PORT=8080
ADMIN_USERNAME=admin
ADMIN_PASSWORD=your_secure_password_here
MAX_TRANSACTION_LIMIT=500
MAX_DAILY_LIMIT=2000
REQUIRE_HUMAN_APPROVAL_ABOVE=100
```
### 3. Run the Security Gateway
```bash
npm start
```
The server will boot two coordinated services:
- **Admin Control Dashboard:** `http://localhost:8080/dashboard`
- **FastMCP Transport Gateway:** Stdio or Stream mode ready for MCP clients.
### 4. Run the Security Test Suite
```bash
npm test
```
```text
ā BankSecurityGuard: Blocks non-whitelisted IBANs (16.9ms)
ā BankSecurityGuard: Enforces Single Transfer Cap (7.0ms)
ā BankSecurityGuard: Demands Human-In-The-Loop Approval Above Threshold (13.1ms)
ā BankSecurityGuard: Emergency Freeze Kills All Transfers Instantly (7.4ms)
ā¹ tests 4 | pass 4 | fail 0
```
---
## š License
Released under the [MIT License](LICENSE) by **RMAA Holdings** & Contributors.
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo issues