Mono银行
STDIO尼日利亚银行业务MCP服务器
尼日利亚银行业务MCP服务器
A comprehensive Model Context Protocol (MCP) server for Nigerian banking operations using the Mono Open Banking API. Features integrated webhook support for real-time banking events and seamless deployment on FastMCP Cloud.
sequenceDiagram participant User as 👤 User participant AI as 🤖 AI Assistant<br/>(Claude/ChatGPT) participant MCP as ⚡ MCP Server<br/>(FastMCP + Webhooks) participant Client as 🔗 Mono Client<br/>(httpx) participant API as 🏦 Mono API<br/>(Nigerian Banks) participant Webhook as 📡 Webhook Events User->>AI: "Check my account balance" AI->>MCP: list_tools() MCP-->>AI: 12 banking tools + webhook monitoring AI->>MCP: get_account_balance(account_id) MCP->>Client: get_account_balance(account_id) Client->>API: GET /accounts/{id}/balance API-->>Client: {"balance": 50000, "currency": "NGN"} Client-->>MCP: Account balance data MCP-->>AI: {"success": true, "balance": "₦500.00"} AI-->>User: "Your account balance is ₦500.00" Note over Webhook,MCP: Real-time Events API->>MCP: POST /mono/webhook (account.updated) MCP->>MCP: Verify HMAC signature MCP->>MCP: Store event in database
mono-banking-mcp/
├── mono_banking_mcp/           # Main package
│   ├── server.py                 # FastMCP server with 12 tools + webhook endpoints
│   ├── mono_client.py            # Mono API client with async httpx
│   └── database.py               # SQLAlchemy database for webhook events storage
├── tests/                     # Comprehensive test suite with webhook integration tests
│   ├── conftest.py               # Test configuration and fixtures
│   └── test_mono_banking.py      # Unit and integration tests
├── pyproject.toml            # Modern Python project configuration (uv-based)
├── uv.lock                   # Dependency lock file with FastMCP 2.12+
├── pytest.ini               # Test configuration and markers
├── Makefile                  # Development workflow automation with webhook commands
├── README.md                 # This comprehensive documentation
└── .env.example              # Environment variables template
The server includes integrated webhook support for real-time banking events:
graph LR A[Mono API] -->|POST /mono/webhook| B[FastMCP Server] B -->|HMAC Verify| C[Signature Check] C -->|✅ Valid| D[Store Event] C -->|❌ Invalid| E[Reject] D --> F[SQLite Database] F --> G[get_webhook_events Tool] G --> H[AI Assistant]
/mono/webhook - Webhook endpoint for real-time Mono events/health - Health check endpoint for monitoringaccount.connected - New account linkedaccount.updated - Account information changedaccount.unlinked - Account disconnectedjob.completed - Data sync completedjob.failed - Data sync failedReady to use immediately! Connect your AI assistant to:
https://mono-banking-mcp.fastmcp.app/mcp
https://mono-banking-mcp.fastmcp.app/mcphttps://mono-banking-mcp.fastmcp.app/mono/webhookhttps://mono-banking-mcp.fastmcp.app/healthAdd to your Claude Desktop configuration (~/.config/claude-desktop/config.json):
{ "mcpServers": { "mono-banking": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-fetch", "https://mono-banking-mcp.fastmcp.app/mcp"] } } }
Once connected to an AI assistant (Claude, Gemini, etc.), you can use natural language commands:
The server provides these comprehensive banking tools (12 total):
| Tool | Description | Parameters | 
|---|---|---|
list_linked_accounts | List all linked bank accounts | None | 
get_account_balance | Get current account balance | account_id | 
get_account_info | Get basic account information | account_id | 
get_account_details | Get comprehensive account details including BVN | account_id | 
get_transaction_history | Retrieve transaction records with pagination | account_id, limit, page | 
verify_account_name | Verify recipient account details before payments | account_number, bank_code | 
initiate_payment | Start a payment via Mono DirectPay | amount, recipient_account_number, recipient_bank_code, customer info | 
verify_payment | Check payment status using reference | reference | 
get_nigerian_banks | List all supported Nigerian banks with codes | None | 
lookup_bvn | Perform BVN identity verification | bvn, scope | 
initiate_account_linking | Start account linking process for new customers | customer_name, customer_email | 
Contributions to the Mono Banking MCP Server are welcome! For questions or help getting started, please open an issue.
Quick Start for Contributors:
# Fork and clone the repository git clone https://github.com/YOUR_USERNAME/mono-banking-mcp.git cd mono-banking-mcp # Set up development environment uv sync uv pip install -e . # Verify installation with webhook support python -c "from mono_banking_mcp.server import mcp; print('✅ Package installed successfully')" # Run comprehensive tests make test-all # Create feature branch and start developing git checkout -b feature/your-feature-name # Test your changes make test-webhook # Test webhook functionality make tools # Verify all 12 tools are working