Prerequisites and Requirements
Relevant source files
The following files were used as context for generating this wiki page:
This page outlines the necessary environment, credentials, and software dependencies required to deploy and operate the MBBank Model Context Protocol (MCP) server. The project serves as a bridge between the MBBank API and MCP-compatible clients, enabling automated monitoring and analytics of financial transactions and balances.
Understanding these requirements is critical for ensuring a secure and stable connection to MBBank services. The system relies on a combination of Python-based libraries, specific authentication credentials, and either local or containerized execution environments to facilitate its core functions.
Sources: README.md:1-5, pyproject.toml:1-5
System Software Requirements
The MBBank MCP server is built using the Python ecosystem and requires specific runtimes and package managers for installation and execution.
- Python Runtime: The project requires Python version 3.10 or higher.
- Package Management: The project recommends using
uvfor dependency management and execution viauvx. - Operating Modes: The server can run in standard I/O (
stdio) mode or Server-Sent Events (SSE) mode usinguvicorn.
Sources: README.md:7-10, pyproject.toml:7
Core Dependencies
The following table summarizes the primary libraries defined in the project configuration:
| Dependency | Purpose |
|---|---|
mcp | Core Model Context Protocol implementation |
mbbank-lib | Underlying API wrapper for MBBank services |
uvicorn / starlette | ASGI server and framework for SSE mode |
qrcode[pil] / pillow | Generation and processing of QR codes for transfer verification |
click | Command-line interface handling |
Sources: pyproject.toml:13-21
Authentication and Credentials
To interface with the MBBank API, the server requires valid user credentials. These can be provided via command-line arguments or environment variables.
Required Credentials
- Username: Your MBBank account username.
- Password: Your MBBank account password.
Sources: README.md:16-18, mbbank_mcp/main.py:31-34
Credential Configuration Methods
The server supports two primary ways to ingest credentials during startup:
- Command Line Flags: Using
--usernameand--password. - Environment Variables: Using
MBBANK_USERNAMEandMBBANK_PASSWORD.
Warning: When configuring for Claude Desktop, environment variables for username and password should not be set in the env block of the config as it may error the Python runtime; they should be passed as arguments instead.
Sources: README.md:18-19, mbbank_mcp/main.py:36-37
Architecture and Initialization Flow
The application initializes by authenticating the provided credentials before starting the MCP server.
The diagram above shows the initialization logic where the MBBankAsync client must successfully authenticate before the MCP server starts in either Stdio or SSE mode.
Sources: mbbank_mcp/main.py:36-71
Execution Requirements
The server can be executed in three distinct environments, each with specific configuration requirements.
1. Claude Desktop Configuration
To integrate with Claude Desktop, the MCP configuration must point to the uvx executable and pass credentials as arguments.
Sources: README.md:16-30
2. Docker Execution
When running via Docker, environment variables are preferred for passing credentials into the container.
Sources: README.md:32-52
3. Standalone SSE Server
For standalone operation with a web-based interface, specific network flags are required.
| Flag | Description | Default |
|---|---|---|
--sse | Enables SSE and Streamable HTTP mode | Disabled (Stdio) |
--host | The network address to bind the server to | localhost |
--port | The port for the SSE server | 3000 |
Sources: README.md:54-61, mbbank_mcp/main.py:31-35
Functional Restrictions and Security
While the server provides extensive access to account data, there are specific functional requirements and limitations designed for security.
- Read-Only Focus: The server is primarily designed for monitoring and analytics (balances and transactions).
- Transfer Restrictions: The server does not support direct money withdrawal.
- Manual Verification: Transfers require a multi-step process involving a QR code and a D-OTP (Digital OTP) generated within the MBBank mobile app.
- Session Expiry: Transfer sessions (SIDs) created by
start_transferhave a strict 120-second (2-minute) expiration period.
The sequence diagram illustrates the requirement for external user interaction (scanning a QR code in the official app) to fulfill the security prerequisites for sensitive operations.
Sources: README.md:68-80, mbbank_mcp/core.py:46-111
Conclusion
The MBBank MCP server requires a modern Python environment (3.10+), valid MBBank credentials, and the mbbank-lib dependency. It offers flexibility in deployment through Stdio or SSE modes, provided that the user can facilitate the necessary D-OTP verification for sensitive tasks like initiating transfers. Success in deployment depends on the correct provision of credentials and the alignment of the chosen execution mode with the client application's requirements.