nomba-mcp 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +983 -0
- package/build/client.d.ts +26 -0
- package/build/client.js +120 -0
- package/build/client.js.map +1 -0
- package/build/index.d.ts +2 -0
- package/build/index.js +53 -0
- package/build/index.js.map +1 -0
- package/build/resources/bank-list.d.ts +3 -0
- package/build/resources/bank-list.js +26 -0
- package/build/resources/bank-list.js.map +1 -0
- package/build/tools/accounts.d.ts +3 -0
- package/build/tools/accounts.js +88 -0
- package/build/tools/accounts.js.map +1 -0
- package/build/tools/airtime.d.ts +3 -0
- package/build/tools/airtime.js +80 -0
- package/build/tools/airtime.js.map +1 -0
- package/build/tools/bills/betting.d.ts +3 -0
- package/build/tools/bills/betting.js +45 -0
- package/build/tools/bills/betting.js.map +1 -0
- package/build/tools/bills/cable.d.ts +3 -0
- package/build/tools/bills/cable.js +68 -0
- package/build/tools/bills/cable.js.map +1 -0
- package/build/tools/bills/electricity.d.ts +3 -0
- package/build/tools/bills/electricity.js +69 -0
- package/build/tools/bills/electricity.js.map +1 -0
- package/build/tools/bills/index.d.ts +3 -0
- package/build/tools/bills/index.js +9 -0
- package/build/tools/bills/index.js.map +1 -0
- package/build/tools/bills.d.ts +3 -0
- package/build/tools/bills.js +246 -0
- package/build/tools/bills.js.map +1 -0
- package/build/tools/checkout.d.ts +3 -0
- package/build/tools/checkout.js +138 -0
- package/build/tools/checkout.js.map +1 -0
- package/build/tools/sub-accounts.d.ts +3 -0
- package/build/tools/sub-accounts.js +174 -0
- package/build/tools/sub-accounts.js.map +1 -0
- package/build/tools/transactions.d.ts +3 -0
- package/build/tools/transactions.js +115 -0
- package/build/tools/transactions.js.map +1 -0
- package/build/tools/transfers.d.ts +3 -0
- package/build/tools/transfers.js +97 -0
- package/build/tools/transfers.js.map +1 -0
- package/build/tools/virtual-accounts.d.ts +3 -0
- package/build/tools/virtual-accounts.js +131 -0
- package/build/tools/virtual-accounts.js.map +1 -0
- package/build/utils.d.ts +18 -0
- package/build/utils.js +35 -0
- package/build/utils.js.map +1 -0
- package/package.json +58 -0
package/README.md
ADDED
|
@@ -0,0 +1,983 @@
|
|
|
1
|
+
# Nomba MCP
|
|
2
|
+
|
|
3
|
+
A [Model Context Protocol (MCP)](https://modelcontextprotocol.io) server that connects Claude to the [Nomba](https://nomba.com) banking and payments API. This gives Claude the ability to check account balances, send money, generate payment links, manage virtual accounts, buy airtime, pay utility bills, and more -- all through natural language.
|
|
4
|
+
|
|
5
|
+
## Table of Contents
|
|
6
|
+
|
|
7
|
+
- [How It Works](#how-it-works)
|
|
8
|
+
- [Prerequisites](#prerequisites)
|
|
9
|
+
- [Installation](#installation)
|
|
10
|
+
- [Configuration](#configuration)
|
|
11
|
+
- [Environment Variables](#environment-variables)
|
|
12
|
+
- [Claude Desktop](#claude-desktop)
|
|
13
|
+
- [Claude Code](#claude-code)
|
|
14
|
+
- [Architecture](#architecture)
|
|
15
|
+
- [Tools Reference](#tools-reference)
|
|
16
|
+
- [Accounts & Terminals](#accounts--terminals)
|
|
17
|
+
- [Sub-Accounts](#sub-accounts)
|
|
18
|
+
- [Transfers](#transfers)
|
|
19
|
+
- [Online Checkout](#online-checkout)
|
|
20
|
+
- [Virtual Accounts](#virtual-accounts)
|
|
21
|
+
- [Transactions](#transactions)
|
|
22
|
+
- [Bills & Utilities](#bills--utilities)
|
|
23
|
+
- [Airtime & Data](#airtime--data)
|
|
24
|
+
- [Resources](#resources)
|
|
25
|
+
- [Example Prompts](#example-prompts)
|
|
26
|
+
- [Development](#development)
|
|
27
|
+
- [Troubleshooting](#troubleshooting)
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## How It Works
|
|
32
|
+
|
|
33
|
+
This server acts as a bridge between Claude and the Nomba API. It runs as a local process that communicates with Claude over stdio (standard input/output) using the MCP protocol. When you ask Claude something like "What's my Nomba balance?", Claude calls the appropriate tool on this server, which makes the authenticated API request to Nomba and returns the result.
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
You <-> Claude <-> MCP Server (this project) <-> Nomba API
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Authentication is handled automatically. The server obtains an OAuth2 access token on the first request and refreshes it transparently before expiry.
|
|
40
|
+
|
|
41
|
+
## Prerequisites
|
|
42
|
+
|
|
43
|
+
- **Node.js 18+** (uses native `fetch`)
|
|
44
|
+
- **Nomba API credentials** -- obtain these from your [Nomba Developer Dashboard](https://developer.nomba.com):
|
|
45
|
+
- Client ID
|
|
46
|
+
- Client Secret
|
|
47
|
+
- Parent Account ID (UUID)
|
|
48
|
+
|
|
49
|
+
## Installation
|
|
50
|
+
|
|
51
|
+
No build step required. Just configure your MCP client with `npx`:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
npx nomba-mcp
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Or install globally:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
npm install -g nomba-mcp
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## Configuration
|
|
64
|
+
|
|
65
|
+
### Environment Variables
|
|
66
|
+
|
|
67
|
+
| Variable | Required | Default | Description |
|
|
68
|
+
|----------|----------|---------|-------------|
|
|
69
|
+
| `NOMBA_CLIENT_ID` | Yes | -- | Your client ID from the Nomba developer dashboard |
|
|
70
|
+
| `NOMBA_CLIENT_SECRET` | Yes | -- | Your client secret from the Nomba developer dashboard |
|
|
71
|
+
| `NOMBA_ACCOUNT_ID` | Yes | -- | Your parent account ID (UUID format) |
|
|
72
|
+
| `NOMBA_BASE_URL` | No | `https://sandbox.nomba.com` | API base URL. Set to `https://api.nomba.com` for production |
|
|
73
|
+
|
|
74
|
+
> **Important:** The server defaults to the **sandbox** environment. All transactions in sandbox mode use test data and do not move real money. Set `NOMBA_BASE_URL=https://api.nomba.com` only when you are ready to go live.
|
|
75
|
+
|
|
76
|
+
### Claude Desktop
|
|
77
|
+
|
|
78
|
+
Add the following to your Claude Desktop configuration file:
|
|
79
|
+
|
|
80
|
+
- **macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
81
|
+
- **Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
|
|
82
|
+
|
|
83
|
+
```json
|
|
84
|
+
{
|
|
85
|
+
"mcpServers": {
|
|
86
|
+
"nomba": {
|
|
87
|
+
"command": "npx",
|
|
88
|
+
"args": ["-y", "nomba-mcp"],
|
|
89
|
+
"env": {
|
|
90
|
+
"NOMBA_CLIENT_ID": "your_client_id",
|
|
91
|
+
"NOMBA_CLIENT_SECRET": "your_client_secret",
|
|
92
|
+
"NOMBA_ACCOUNT_ID": "your_account_id",
|
|
93
|
+
"NOMBA_BASE_URL": "https://api.nomba.com"
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Restart Claude Desktop after saving. The Nomba tools will appear in the tools menu (hammer icon).
|
|
101
|
+
|
|
102
|
+
### Claude Code
|
|
103
|
+
|
|
104
|
+
Add a `.mcp.json` file to your project root (or use global settings):
|
|
105
|
+
|
|
106
|
+
```json
|
|
107
|
+
{
|
|
108
|
+
"mcpServers": {
|
|
109
|
+
"nomba": {
|
|
110
|
+
"command": "npx",
|
|
111
|
+
"args": ["-y", "nomba-mcp"],
|
|
112
|
+
"env": {
|
|
113
|
+
"NOMBA_CLIENT_ID": "your_client_id",
|
|
114
|
+
"NOMBA_CLIENT_SECRET": "your_client_secret",
|
|
115
|
+
"NOMBA_ACCOUNT_ID": "your_account_id",
|
|
116
|
+
"NOMBA_BASE_URL": "https://api.nomba.com"
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
## Architecture
|
|
126
|
+
|
|
127
|
+
```
|
|
128
|
+
src/
|
|
129
|
+
├── index.ts # Entry point: validates env vars, creates server, connects stdio
|
|
130
|
+
├── client.ts # NombaClient: OAuth2 token management + HTTP request wrapper
|
|
131
|
+
├── utils.ts # Shared helpers: jsonResponse, errorResponse, logToolCall, buildParams
|
|
132
|
+
├── tools/
|
|
133
|
+
│ ├── accounts.ts # Parent account details, balance, terminals, terminal assign/unassign
|
|
134
|
+
│ ├── sub-accounts.ts # Sub-account CRUD, balance, suspend, reactivate
|
|
135
|
+
│ ├── transfers.ts # Bank list, account lookup, bank/internal transfers
|
|
136
|
+
│ ├── checkout.ts # Payment links, tokenized cards, refunds
|
|
137
|
+
│ ├── virtual-accounts.ts # Virtual account CRUD + listing
|
|
138
|
+
│ ├── transactions.ts # Transaction history, details, filtering, status requery
|
|
139
|
+
│ ├── bills/
|
|
140
|
+
│ │ ├── index.ts # Re-exports all bill tool registrations
|
|
141
|
+
│ │ ├── electricity.ts # Electricity providers, meter lookup, token purchase
|
|
142
|
+
│ │ ├── betting.ts # Betting providers, account funding
|
|
143
|
+
│ │ └── cable.ts # Cable TV providers, smartcard lookup, subscription payment
|
|
144
|
+
│ └── airtime.ts # Airtime + data bundles
|
|
145
|
+
├── resources/
|
|
146
|
+
│ └── bank-list.ts # Cached bank code list (MCP resource, 24h TTL)
|
|
147
|
+
└── **/*.test.ts # 36 tests (Vitest) — co-located with source files
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
**Key design decisions:**
|
|
151
|
+
|
|
152
|
+
- **Automatic authentication** -- The `NombaClient` class handles the full OAuth2 lifecycle. Tokens are obtained on the first API call and refreshed 60 seconds before expiry. A promise lock prevents concurrent refresh requests when multiple tools execute in parallel.
|
|
153
|
+
- **401 auto-retry** -- If a request fails with a 401, the server clears the stale token, re-authenticates, and retries once. This handles token revocation gracefully without infinite loops.
|
|
154
|
+
- **Structured error handling** -- API errors are parsed into `NombaApiError` with status, code, and description. Every tool catches errors and returns them with `isError: true`, so Claude can report the failure and suggest next steps rather than crashing. Raw API bodies are never leaked.
|
|
155
|
+
- **Audit logging** -- Every tool invocation is logged to stderr via `logToolCall()` with timestamp, tool name, and parameters (long values are truncated).
|
|
156
|
+
- **Tool name prefixing** -- All tools are prefixed with `nomba_` to avoid collisions with other MCP servers that may be running simultaneously.
|
|
157
|
+
- **Stdio transport** -- The server communicates over stdin/stdout using JSON-RPC. All logging uses `console.error` to avoid corrupting the protocol stream.
|
|
158
|
+
|
|
159
|
+
---
|
|
160
|
+
|
|
161
|
+
## Tools Reference
|
|
162
|
+
|
|
163
|
+
### Accounts & Terminals
|
|
164
|
+
|
|
165
|
+
#### `nomba_get_parent_account`
|
|
166
|
+
|
|
167
|
+
Fetch the parent account details for the authenticated Nomba business.
|
|
168
|
+
|
|
169
|
+
| Parameter | Type | Required | Description |
|
|
170
|
+
|-----------|------|----------|-------------|
|
|
171
|
+
| *(none)* | -- | -- | No parameters required |
|
|
172
|
+
|
|
173
|
+
**Returns:** Account ID, name, type, status, BVN, and linked bank accounts.
|
|
174
|
+
|
|
175
|
+
**API Endpoint:** `GET /v1/accounts/parent`
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
#### `nomba_get_parent_balance`
|
|
180
|
+
|
|
181
|
+
Fetch the current balance of the parent Nomba business account.
|
|
182
|
+
|
|
183
|
+
| Parameter | Type | Required | Description |
|
|
184
|
+
|-----------|------|----------|-------------|
|
|
185
|
+
| *(none)* | -- | -- | No parameters required |
|
|
186
|
+
|
|
187
|
+
**Returns:** Available balance in NGN.
|
|
188
|
+
|
|
189
|
+
**API Endpoint:** `GET /v1/accounts/parent/balance`
|
|
190
|
+
|
|
191
|
+
---
|
|
192
|
+
|
|
193
|
+
#### `nomba_list_terminals`
|
|
194
|
+
|
|
195
|
+
List all POS terminals assigned to the parent Nomba account.
|
|
196
|
+
|
|
197
|
+
| Parameter | Type | Required | Description |
|
|
198
|
+
|-----------|------|----------|-------------|
|
|
199
|
+
| *(none)* | -- | -- | No parameters required |
|
|
200
|
+
|
|
201
|
+
**Returns:** Terminal IDs, serial numbers, and labels.
|
|
202
|
+
|
|
203
|
+
**API Endpoint:** `GET /v1/accounts/terminals`
|
|
204
|
+
|
|
205
|
+
---
|
|
206
|
+
|
|
207
|
+
#### `nomba_assign_terminal`
|
|
208
|
+
|
|
209
|
+
Assign a POS terminal to the parent Nomba account.
|
|
210
|
+
|
|
211
|
+
| Parameter | Type | Required | Description |
|
|
212
|
+
|-----------|------|----------|-------------|
|
|
213
|
+
| `terminalId` | string | Yes | The terminal ID to assign |
|
|
214
|
+
| `serialNumber` | string | Yes | The terminal serial number |
|
|
215
|
+
|
|
216
|
+
**Returns:** Assignment confirmation.
|
|
217
|
+
|
|
218
|
+
**API Endpoint:** `POST /v1/terminals/assign`
|
|
219
|
+
|
|
220
|
+
---
|
|
221
|
+
|
|
222
|
+
#### `nomba_unassign_terminal`
|
|
223
|
+
|
|
224
|
+
Unassign a POS terminal from the parent Nomba account.
|
|
225
|
+
|
|
226
|
+
| Parameter | Type | Required | Description |
|
|
227
|
+
|-----------|------|----------|-------------|
|
|
228
|
+
| `terminalId` | string | Yes | The terminal ID to unassign |
|
|
229
|
+
|
|
230
|
+
**Returns:** Unassignment confirmation.
|
|
231
|
+
|
|
232
|
+
**API Endpoint:** `POST /v1/terminals/unassign`
|
|
233
|
+
|
|
234
|
+
---
|
|
235
|
+
|
|
236
|
+
### Sub-Accounts
|
|
237
|
+
|
|
238
|
+
Sub-accounts are child accounts under your parent Nomba account. They can have their own balances and make transactions independently.
|
|
239
|
+
|
|
240
|
+
#### `nomba_create_sub_account`
|
|
241
|
+
|
|
242
|
+
Create a new sub-account under the parent Nomba account.
|
|
243
|
+
|
|
244
|
+
| Parameter | Type | Required | Description |
|
|
245
|
+
|-----------|------|----------|-------------|
|
|
246
|
+
| `accountName` | string | Yes | Name for the sub-account |
|
|
247
|
+
| `email` | string | No | Email address for the sub-account holder |
|
|
248
|
+
| `phoneNumber` | string | No | Phone number for the sub-account holder |
|
|
249
|
+
|
|
250
|
+
**Returns:** New sub-account details including account ID.
|
|
251
|
+
|
|
252
|
+
**API Endpoint:** `POST /v1/accounts`
|
|
253
|
+
|
|
254
|
+
---
|
|
255
|
+
|
|
256
|
+
#### `nomba_list_sub_accounts`
|
|
257
|
+
|
|
258
|
+
List all sub-accounts under the parent Nomba account.
|
|
259
|
+
|
|
260
|
+
| Parameter | Type | Required | Description |
|
|
261
|
+
|-----------|------|----------|-------------|
|
|
262
|
+
| `limit` | number | No | Results per page (max 50) |
|
|
263
|
+
| `cursor` | string | No | Pagination cursor from a previous response |
|
|
264
|
+
|
|
265
|
+
**Returns:** Array of sub-accounts with pagination cursor.
|
|
266
|
+
|
|
267
|
+
**API Endpoint:** `GET /v1/accounts`
|
|
268
|
+
|
|
269
|
+
---
|
|
270
|
+
|
|
271
|
+
#### `nomba_get_sub_account`
|
|
272
|
+
|
|
273
|
+
Fetch details of a specific sub-account.
|
|
274
|
+
|
|
275
|
+
| Parameter | Type | Required | Description |
|
|
276
|
+
|-----------|------|----------|-------------|
|
|
277
|
+
| `accountId` | string | Yes | The sub-account ID |
|
|
278
|
+
|
|
279
|
+
**Returns:** Sub-account details including name, status, and metadata.
|
|
280
|
+
|
|
281
|
+
**API Endpoint:** `GET /v1/accounts/{accountId}`
|
|
282
|
+
|
|
283
|
+
---
|
|
284
|
+
|
|
285
|
+
#### `nomba_get_sub_account_balance`
|
|
286
|
+
|
|
287
|
+
Fetch the current balance of a specific sub-account.
|
|
288
|
+
|
|
289
|
+
| Parameter | Type | Required | Description |
|
|
290
|
+
|-----------|------|----------|-------------|
|
|
291
|
+
| `accountId` | string | Yes | The sub-account ID |
|
|
292
|
+
|
|
293
|
+
**Returns:** Available balance in NGN.
|
|
294
|
+
|
|
295
|
+
**API Endpoint:** `GET /v1/accounts/{accountId}/balance`
|
|
296
|
+
|
|
297
|
+
---
|
|
298
|
+
|
|
299
|
+
#### `nomba_update_sub_account`
|
|
300
|
+
|
|
301
|
+
Update the details of an existing sub-account.
|
|
302
|
+
|
|
303
|
+
| Parameter | Type | Required | Description |
|
|
304
|
+
|-----------|------|----------|-------------|
|
|
305
|
+
| `accountId` | string | Yes | The sub-account ID to update |
|
|
306
|
+
| `accountName` | string | No | New account name |
|
|
307
|
+
| `email` | string | No | New email address |
|
|
308
|
+
| `phoneNumber` | string | No | New phone number |
|
|
309
|
+
|
|
310
|
+
**Returns:** Updated sub-account details.
|
|
311
|
+
|
|
312
|
+
**API Endpoint:** `PUT /v1/accounts/{accountId}`
|
|
313
|
+
|
|
314
|
+
---
|
|
315
|
+
|
|
316
|
+
#### `nomba_suspend_sub_account`
|
|
317
|
+
|
|
318
|
+
Suspend a sub-account. Suspended accounts cannot make or receive transactions.
|
|
319
|
+
|
|
320
|
+
| Parameter | Type | Required | Description |
|
|
321
|
+
|-----------|------|----------|-------------|
|
|
322
|
+
| `accountId` | string | Yes | The sub-account ID to suspend |
|
|
323
|
+
|
|
324
|
+
**Returns:** Suspension confirmation.
|
|
325
|
+
|
|
326
|
+
**API Endpoint:** `PUT /v1/accounts/{accountId}/suspend`
|
|
327
|
+
|
|
328
|
+
> **Warning:** Suspended accounts are blocked from all transactions until reactivated.
|
|
329
|
+
|
|
330
|
+
---
|
|
331
|
+
|
|
332
|
+
#### `nomba_reactivate_sub_account`
|
|
333
|
+
|
|
334
|
+
Reactivate a previously suspended sub-account.
|
|
335
|
+
|
|
336
|
+
| Parameter | Type | Required | Description |
|
|
337
|
+
|-----------|------|----------|-------------|
|
|
338
|
+
| `accountId` | string | Yes | The sub-account ID to reactivate |
|
|
339
|
+
|
|
340
|
+
**Returns:** Reactivation confirmation.
|
|
341
|
+
|
|
342
|
+
**API Endpoint:** `PUT /v1/accounts/{accountId}/reactivate`
|
|
343
|
+
|
|
344
|
+
---
|
|
345
|
+
|
|
346
|
+
### Transfers
|
|
347
|
+
|
|
348
|
+
#### `nomba_list_banks`
|
|
349
|
+
|
|
350
|
+
Fetch the list of all Nigerian bank codes and names. Call this first to get the correct `bankCode` before making transfers.
|
|
351
|
+
|
|
352
|
+
| Parameter | Type | Required | Description |
|
|
353
|
+
|-----------|------|----------|-------------|
|
|
354
|
+
| *(none)* | -- | -- | No parameters required |
|
|
355
|
+
|
|
356
|
+
**Returns:** Array of `{ code, name }` objects for all Nigerian banks.
|
|
357
|
+
|
|
358
|
+
**API Endpoint:** `GET /v1/transfers/banks`
|
|
359
|
+
|
|
360
|
+
---
|
|
361
|
+
|
|
362
|
+
#### `nomba_lookup_bank_account`
|
|
363
|
+
|
|
364
|
+
Validate a bank account by looking up the account holder's name. Always call this before initiating a transfer to confirm the recipient.
|
|
365
|
+
|
|
366
|
+
| Parameter | Type | Required | Description |
|
|
367
|
+
|-----------|------|----------|-------------|
|
|
368
|
+
| `accountNumber` | string | Yes | 10-digit Nigerian bank account number |
|
|
369
|
+
| `bankCode` | string | Yes | Bank code from `nomba_list_banks` |
|
|
370
|
+
|
|
371
|
+
**Returns:** Account holder name, account number, and bank details.
|
|
372
|
+
|
|
373
|
+
**API Endpoint:** `POST /v1/transfers/bank-account-lookup`
|
|
374
|
+
|
|
375
|
+
---
|
|
376
|
+
|
|
377
|
+
#### `nomba_transfer_to_bank`
|
|
378
|
+
|
|
379
|
+
Transfer funds from the Nomba account to an external Nigerian bank account.
|
|
380
|
+
|
|
381
|
+
| Parameter | Type | Required | Description |
|
|
382
|
+
|-----------|------|----------|-------------|
|
|
383
|
+
| `amount` | number | Yes | Amount in Naira (must be positive) |
|
|
384
|
+
| `accountNumber` | string | Yes | Recipient 10-digit bank account number |
|
|
385
|
+
| `bankCode` | string | Yes | Recipient bank code |
|
|
386
|
+
| `narration` | string | No | Transfer description/narration |
|
|
387
|
+
|
|
388
|
+
**Returns:** Transaction ID, status, and transfer details.
|
|
389
|
+
|
|
390
|
+
**API Endpoint:** `POST /v1/transfers/to-banks`
|
|
391
|
+
|
|
392
|
+
> **Tip:** Always call `nomba_lookup_bank_account` first to verify the recipient before transferring.
|
|
393
|
+
|
|
394
|
+
---
|
|
395
|
+
|
|
396
|
+
#### `nomba_transfer_between_accounts`
|
|
397
|
+
|
|
398
|
+
Transfer funds between two Nomba accounts (e.g., parent to sub-account).
|
|
399
|
+
|
|
400
|
+
| Parameter | Type | Required | Description |
|
|
401
|
+
|-----------|------|----------|-------------|
|
|
402
|
+
| `amount` | number | Yes | Amount in Naira (must be positive) |
|
|
403
|
+
| `destinationAccountId` | string | Yes | Destination Nomba account ID (UUID) |
|
|
404
|
+
| `narration` | string | No | Transfer description/narration |
|
|
405
|
+
|
|
406
|
+
**Returns:** Transaction ID and transfer status.
|
|
407
|
+
|
|
408
|
+
**API Endpoint:** `POST /v1/transfers/between-accounts`
|
|
409
|
+
|
|
410
|
+
---
|
|
411
|
+
|
|
412
|
+
### Online Checkout
|
|
413
|
+
|
|
414
|
+
#### `nomba_create_checkout_order`
|
|
415
|
+
|
|
416
|
+
Create a checkout payment order and get a hosted payment link. The customer can pay via card, bank transfer, or USSD.
|
|
417
|
+
|
|
418
|
+
| Parameter | Type | Required | Description |
|
|
419
|
+
|-----------|------|----------|-------------|
|
|
420
|
+
| `amount` | number | Yes | Payment amount in Naira |
|
|
421
|
+
| `customerEmail` | string | Yes | Customer's email address |
|
|
422
|
+
| `callbackUrl` | string | Yes | URL to redirect the customer to after payment |
|
|
423
|
+
| `orderReference` | string | No | Your unique order reference/ID |
|
|
424
|
+
| `customerId` | string | No | Your internal customer identifier |
|
|
425
|
+
| `tokenizeCard` | boolean | No | Save the customer's card for future charges |
|
|
426
|
+
|
|
427
|
+
**Returns:** A `checkoutLink` URL for the customer and an `orderReference`.
|
|
428
|
+
|
|
429
|
+
**API Endpoint:** `POST /v1/checkout/order`
|
|
430
|
+
|
|
431
|
+
---
|
|
432
|
+
|
|
433
|
+
#### `nomba_charge_tokenized_card`
|
|
434
|
+
|
|
435
|
+
Charge a previously saved/tokenized card. Use this for recurring payments or returning customers.
|
|
436
|
+
|
|
437
|
+
| Parameter | Type | Required | Description |
|
|
438
|
+
|-----------|------|----------|-------------|
|
|
439
|
+
| `amount` | number | Yes | Amount in Naira to charge |
|
|
440
|
+
| `tokenizedCardId` | string | Yes | Tokenized card ID from a previous checkout |
|
|
441
|
+
| `customerEmail` | string | Yes | Customer's email address |
|
|
442
|
+
|
|
443
|
+
**Returns:** Transaction details and charge status.
|
|
444
|
+
|
|
445
|
+
**API Endpoint:** `POST /v1/checkout/charge-tokenized-card`
|
|
446
|
+
|
|
447
|
+
---
|
|
448
|
+
|
|
449
|
+
#### `nomba_refund_transaction`
|
|
450
|
+
|
|
451
|
+
Process a full or partial refund for a completed checkout transaction.
|
|
452
|
+
|
|
453
|
+
| Parameter | Type | Required | Description |
|
|
454
|
+
|-----------|------|----------|-------------|
|
|
455
|
+
| `transactionId` | string | Yes | The transaction ID to refund |
|
|
456
|
+
| `amount` | number | No | Amount to refund in Naira. Omit for full refund |
|
|
457
|
+
|
|
458
|
+
**Returns:** Refund confirmation and status.
|
|
459
|
+
|
|
460
|
+
**API Endpoint:** `POST /v1/checkout/refund`
|
|
461
|
+
|
|
462
|
+
---
|
|
463
|
+
|
|
464
|
+
#### `nomba_get_checkout_transaction`
|
|
465
|
+
|
|
466
|
+
Retrieve the details and status of a checkout transaction.
|
|
467
|
+
|
|
468
|
+
| Parameter | Type | Required | Description |
|
|
469
|
+
|-----------|------|----------|-------------|
|
|
470
|
+
| `orderReference` | string | Yes | The order reference from checkout creation |
|
|
471
|
+
|
|
472
|
+
**Returns:** Full transaction details including payment status, amount, and timestamps.
|
|
473
|
+
|
|
474
|
+
**API Endpoint:** `GET /v1/checkout/order/{orderReference}`
|
|
475
|
+
|
|
476
|
+
---
|
|
477
|
+
|
|
478
|
+
#### `nomba_cancel_transaction`
|
|
479
|
+
|
|
480
|
+
Cancel an incomplete/pending checkout transaction. Only works for transactions that have not been completed.
|
|
481
|
+
|
|
482
|
+
| Parameter | Type | Required | Description |
|
|
483
|
+
|-----------|------|----------|-------------|
|
|
484
|
+
| `orderReference` | string | Yes | The order reference of the transaction to cancel |
|
|
485
|
+
|
|
486
|
+
**Returns:** Cancellation confirmation.
|
|
487
|
+
|
|
488
|
+
**API Endpoint:** `POST /v1/checkout/cancel-transaction`
|
|
489
|
+
|
|
490
|
+
---
|
|
491
|
+
|
|
492
|
+
### Virtual Accounts
|
|
493
|
+
|
|
494
|
+
Virtual accounts are temporary or permanent bank accounts created under your parent Nomba account. They are useful for receiving payments from specific customers or for specific purposes.
|
|
495
|
+
|
|
496
|
+
#### `nomba_create_virtual_account`
|
|
497
|
+
|
|
498
|
+
Create a new virtual bank account.
|
|
499
|
+
|
|
500
|
+
| Parameter | Type | Required | Description |
|
|
501
|
+
|-----------|------|----------|-------------|
|
|
502
|
+
| `accountName` | string | Yes | Name for the account holder (8-64 characters) |
|
|
503
|
+
| `accountRef` | string | No | Your unique reference for this account (16-64 characters) |
|
|
504
|
+
|
|
505
|
+
**Returns:** Account details including bank name, account number, and account name.
|
|
506
|
+
|
|
507
|
+
**API Endpoint:** `POST /v1/accounts/virtual`
|
|
508
|
+
|
|
509
|
+
---
|
|
510
|
+
|
|
511
|
+
#### `nomba_get_virtual_account`
|
|
512
|
+
|
|
513
|
+
Fetch details of a specific virtual account.
|
|
514
|
+
|
|
515
|
+
| Parameter | Type | Required | Description |
|
|
516
|
+
|-----------|------|----------|-------------|
|
|
517
|
+
| `accountId` | string | Yes | The virtual account ID (UUID) |
|
|
518
|
+
|
|
519
|
+
**Returns:** Account name, bank details, status, and balance.
|
|
520
|
+
|
|
521
|
+
**API Endpoint:** `GET /v1/accounts/virtual/{accountId}`
|
|
522
|
+
|
|
523
|
+
---
|
|
524
|
+
|
|
525
|
+
#### `nomba_update_virtual_account`
|
|
526
|
+
|
|
527
|
+
Update an existing virtual account's details.
|
|
528
|
+
|
|
529
|
+
| Parameter | Type | Required | Description |
|
|
530
|
+
|-----------|------|----------|-------------|
|
|
531
|
+
| `accountId` | string | Yes | The virtual account ID (UUID) to update |
|
|
532
|
+
| `accountName` | string | No | New account name (8-64 characters) |
|
|
533
|
+
| `callbackUrl` | string | No | Webhook URL for payment notifications |
|
|
534
|
+
|
|
535
|
+
**Returns:** Updated account details.
|
|
536
|
+
|
|
537
|
+
**API Endpoint:** `PATCH /v1/accounts/virtual/{accountId}`
|
|
538
|
+
|
|
539
|
+
---
|
|
540
|
+
|
|
541
|
+
#### `nomba_expire_virtual_account`
|
|
542
|
+
|
|
543
|
+
Expire/deactivate a virtual account so it can no longer receive payments.
|
|
544
|
+
|
|
545
|
+
| Parameter | Type | Required | Description |
|
|
546
|
+
|-----------|------|----------|-------------|
|
|
547
|
+
| `accountId` | string | Yes | The virtual account ID (UUID) to expire |
|
|
548
|
+
|
|
549
|
+
**Returns:** Expiration confirmation.
|
|
550
|
+
|
|
551
|
+
**API Endpoint:** `POST /v1/accounts/virtual/{accountId}/expire`
|
|
552
|
+
|
|
553
|
+
> **Warning:** This action cannot be undone. The account will permanently stop accepting payments.
|
|
554
|
+
|
|
555
|
+
---
|
|
556
|
+
|
|
557
|
+
#### `nomba_list_virtual_accounts`
|
|
558
|
+
|
|
559
|
+
List all virtual accounts under the parent Nomba account.
|
|
560
|
+
|
|
561
|
+
| Parameter | Type | Required | Description |
|
|
562
|
+
|-----------|------|----------|-------------|
|
|
563
|
+
| `limit` | number | No | Results per page (max 50) |
|
|
564
|
+
| `cursor` | string | No | Pagination cursor from a previous response |
|
|
565
|
+
|
|
566
|
+
**Returns:** Array of virtual accounts with a pagination cursor for the next page.
|
|
567
|
+
|
|
568
|
+
**API Endpoint:** `GET /v1/accounts/virtual`
|
|
569
|
+
|
|
570
|
+
---
|
|
571
|
+
|
|
572
|
+
### Transactions
|
|
573
|
+
|
|
574
|
+
#### `nomba_list_bank_transactions`
|
|
575
|
+
|
|
576
|
+
Fetch bank transaction history for the parent account with optional date filtering and pagination.
|
|
577
|
+
|
|
578
|
+
| Parameter | Type | Required | Description |
|
|
579
|
+
|-----------|------|----------|-------------|
|
|
580
|
+
| `limit` | number | No | Results per page (max 50) |
|
|
581
|
+
| `cursor` | string | No | Pagination cursor from a previous response |
|
|
582
|
+
| `dateFrom` | string | No | Start date in UTC (e.g., `2024-01-01T00:00:00Z`) |
|
|
583
|
+
| `dateTo` | string | No | End date in UTC (e.g., `2024-12-31T23:59:59Z`) |
|
|
584
|
+
|
|
585
|
+
**Returns:** Array of transactions with amounts, types (CREDIT/DEBIT), statuses, wallet balances, and metadata.
|
|
586
|
+
|
|
587
|
+
**API Endpoint:** `GET /v1/transactions/bank`
|
|
588
|
+
|
|
589
|
+
---
|
|
590
|
+
|
|
591
|
+
#### `nomba_requery_transaction`
|
|
592
|
+
|
|
593
|
+
Check the status of a specific transaction using its session ID. Useful for verifying if a transfer or payment was successful.
|
|
594
|
+
|
|
595
|
+
| Parameter | Type | Required | Description |
|
|
596
|
+
|-----------|------|----------|-------------|
|
|
597
|
+
| `sessionId` | string | Yes | The session ID of the transaction |
|
|
598
|
+
|
|
599
|
+
**Returns:** Transaction status and details.
|
|
600
|
+
|
|
601
|
+
**API Endpoint:** `POST /v1/transactions/accounts`
|
|
602
|
+
|
|
603
|
+
---
|
|
604
|
+
|
|
605
|
+
#### `nomba_get_transaction`
|
|
606
|
+
|
|
607
|
+
Fetch details of a single transaction by its transaction ID.
|
|
608
|
+
|
|
609
|
+
| Parameter | Type | Required | Description |
|
|
610
|
+
|-----------|------|----------|-------------|
|
|
611
|
+
| `transactionId` | string | Yes | The transaction ID to look up |
|
|
612
|
+
|
|
613
|
+
**Returns:** Full transaction details including amount, type, status, and metadata.
|
|
614
|
+
|
|
615
|
+
**API Endpoint:** `GET /v1/transactions/{transactionId}`
|
|
616
|
+
|
|
617
|
+
---
|
|
618
|
+
|
|
619
|
+
#### `nomba_filter_transactions`
|
|
620
|
+
|
|
621
|
+
Filter transactions on the parent account with advanced filters. Supports filtering by type, date range, and pagination.
|
|
622
|
+
|
|
623
|
+
| Parameter | Type | Required | Description |
|
|
624
|
+
|-----------|------|----------|-------------|
|
|
625
|
+
| `type` | string | No | Filter by transaction type: `CREDIT` or `DEBIT` |
|
|
626
|
+
| `limit` | number | No | Results per page (max 50) |
|
|
627
|
+
| `cursor` | string | No | Pagination cursor from a previous response |
|
|
628
|
+
| `dateFrom` | string | No | Start date in UTC (e.g., `2024-01-01T00:00:00Z`) |
|
|
629
|
+
| `dateTo` | string | No | End date in UTC (e.g., `2024-12-31T23:59:59Z`) |
|
|
630
|
+
|
|
631
|
+
**Returns:** Filtered array of transactions with pagination cursor.
|
|
632
|
+
|
|
633
|
+
**API Endpoint:** `GET /v1/transactions/filter`
|
|
634
|
+
|
|
635
|
+
---
|
|
636
|
+
|
|
637
|
+
### Bills & Utilities
|
|
638
|
+
|
|
639
|
+
#### Electricity
|
|
640
|
+
|
|
641
|
+
##### `nomba_get_electricity_providers`
|
|
642
|
+
|
|
643
|
+
Fetch available electricity distribution companies (DisCos).
|
|
644
|
+
|
|
645
|
+
| Parameter | Type | Required | Description |
|
|
646
|
+
|-----------|------|----------|-------------|
|
|
647
|
+
| *(none)* | -- | -- | No parameters required |
|
|
648
|
+
|
|
649
|
+
**Returns:** List of providers with codes and names.
|
|
650
|
+
|
|
651
|
+
**API Endpoint:** `GET /v1/bills/electricity/providers`
|
|
652
|
+
|
|
653
|
+
---
|
|
654
|
+
|
|
655
|
+
##### `nomba_lookup_electricity_customer`
|
|
656
|
+
|
|
657
|
+
Validate an electricity meter number and get the customer's name.
|
|
658
|
+
|
|
659
|
+
| Parameter | Type | Required | Description |
|
|
660
|
+
|-----------|------|----------|-------------|
|
|
661
|
+
| `meterNumber` | string | Yes | The electricity meter number |
|
|
662
|
+
| `providerCode` | string | Yes | Provider code from `nomba_get_electricity_providers` |
|
|
663
|
+
| `meterType` | string | Yes | `"prepaid"` or `"postpaid"` |
|
|
664
|
+
|
|
665
|
+
**Returns:** Customer name and meter validation details.
|
|
666
|
+
|
|
667
|
+
**API Endpoint:** `POST /v1/bills/electricity/customer-lookup`
|
|
668
|
+
|
|
669
|
+
---
|
|
670
|
+
|
|
671
|
+
##### `nomba_buy_electricity`
|
|
672
|
+
|
|
673
|
+
Purchase electricity tokens (prepaid) or pay an electricity bill (postpaid).
|
|
674
|
+
|
|
675
|
+
| Parameter | Type | Required | Description |
|
|
676
|
+
|-----------|------|----------|-------------|
|
|
677
|
+
| `meterNumber` | string | Yes | The electricity meter number |
|
|
678
|
+
| `providerCode` | string | Yes | Electricity provider code |
|
|
679
|
+
| `meterType` | string | Yes | `"prepaid"` or `"postpaid"` |
|
|
680
|
+
| `amount` | number | Yes | Amount in Naira |
|
|
681
|
+
|
|
682
|
+
**Returns:** Purchase confirmation and token details (for prepaid).
|
|
683
|
+
|
|
684
|
+
**API Endpoint:** `POST /v1/bills/electricity/pay`
|
|
685
|
+
|
|
686
|
+
> **Tip:** Always call `nomba_lookup_electricity_customer` first to verify the meter details.
|
|
687
|
+
|
|
688
|
+
---
|
|
689
|
+
|
|
690
|
+
#### Betting
|
|
691
|
+
|
|
692
|
+
##### `nomba_get_betting_providers`
|
|
693
|
+
|
|
694
|
+
Fetch available betting platforms.
|
|
695
|
+
|
|
696
|
+
| Parameter | Type | Required | Description |
|
|
697
|
+
|-----------|------|----------|-------------|
|
|
698
|
+
| *(none)* | -- | -- | No parameters required |
|
|
699
|
+
|
|
700
|
+
**Returns:** List of betting providers with codes.
|
|
701
|
+
|
|
702
|
+
**API Endpoint:** `GET /v1/bills/betting/providers`
|
|
703
|
+
|
|
704
|
+
---
|
|
705
|
+
|
|
706
|
+
##### `nomba_fund_betting_account`
|
|
707
|
+
|
|
708
|
+
Fund a customer's betting account.
|
|
709
|
+
|
|
710
|
+
| Parameter | Type | Required | Description |
|
|
711
|
+
|-----------|------|----------|-------------|
|
|
712
|
+
| `customerId` | string | Yes | Customer's betting account ID/username |
|
|
713
|
+
| `providerCode` | string | Yes | Betting provider code |
|
|
714
|
+
| `amount` | number | Yes | Amount in Naira |
|
|
715
|
+
|
|
716
|
+
**Returns:** Funding confirmation and transaction details.
|
|
717
|
+
|
|
718
|
+
**API Endpoint:** `POST /v1/bills/betting/pay`
|
|
719
|
+
|
|
720
|
+
---
|
|
721
|
+
|
|
722
|
+
#### Cable TV
|
|
723
|
+
|
|
724
|
+
##### `nomba_get_cable_providers`
|
|
725
|
+
|
|
726
|
+
Fetch available cable TV providers (DSTV, GOtv, Startimes, etc.).
|
|
727
|
+
|
|
728
|
+
| Parameter | Type | Required | Description |
|
|
729
|
+
|-----------|------|----------|-------------|
|
|
730
|
+
| *(none)* | -- | -- | No parameters required |
|
|
731
|
+
|
|
732
|
+
**Returns:** List of cable TV providers with codes.
|
|
733
|
+
|
|
734
|
+
**API Endpoint:** `GET /v1/bills/cabletv/providers`
|
|
735
|
+
|
|
736
|
+
---
|
|
737
|
+
|
|
738
|
+
##### `nomba_lookup_cable_customer`
|
|
739
|
+
|
|
740
|
+
Validate a cable TV smartcard/IUC number and get the customer's name.
|
|
741
|
+
|
|
742
|
+
| Parameter | Type | Required | Description |
|
|
743
|
+
|-----------|------|----------|-------------|
|
|
744
|
+
| `smartcardNumber` | string | Yes | The smartcard or IUC number |
|
|
745
|
+
| `providerCode` | string | Yes | Cable TV provider code |
|
|
746
|
+
|
|
747
|
+
**Returns:** Customer name and smartcard validation details.
|
|
748
|
+
|
|
749
|
+
**API Endpoint:** `POST /v1/bills/cabletv/customer-lookup`
|
|
750
|
+
|
|
751
|
+
---
|
|
752
|
+
|
|
753
|
+
##### `nomba_pay_cable_subscription`
|
|
754
|
+
|
|
755
|
+
Pay for a cable TV subscription.
|
|
756
|
+
|
|
757
|
+
| Parameter | Type | Required | Description |
|
|
758
|
+
|-----------|------|----------|-------------|
|
|
759
|
+
| `smartcardNumber` | string | Yes | The smartcard or IUC number |
|
|
760
|
+
| `providerCode` | string | Yes | Cable TV provider code |
|
|
761
|
+
| `productCode` | string | Yes | Subscription plan/bouquet code |
|
|
762
|
+
| `amount` | number | Yes | Amount in Naira |
|
|
763
|
+
|
|
764
|
+
**Returns:** Payment confirmation and subscription details.
|
|
765
|
+
|
|
766
|
+
**API Endpoint:** `POST /v1/bills/cabletv/pay`
|
|
767
|
+
|
|
768
|
+
> **Tip:** Always call `nomba_lookup_cable_customer` first to verify the smartcard number.
|
|
769
|
+
|
|
770
|
+
---
|
|
771
|
+
|
|
772
|
+
### Airtime & Data
|
|
773
|
+
|
|
774
|
+
#### `nomba_buy_airtime`
|
|
775
|
+
|
|
776
|
+
Purchase airtime/credit for a Nigerian phone number. Supports MTN, Airtel, Glo, and 9mobile.
|
|
777
|
+
|
|
778
|
+
| Parameter | Type | Required | Description |
|
|
779
|
+
|-----------|------|----------|-------------|
|
|
780
|
+
| `phoneNumber` | string | Yes | Nigerian phone number (e.g., `08012345678` or `2348012345678`) |
|
|
781
|
+
| `amount` | number | Yes | Amount of airtime in Naira |
|
|
782
|
+
| `network` | string | No | Network provider (`MTN`, `AIRTEL`, `GLO`, `9MOBILE`). Auto-detected if omitted |
|
|
783
|
+
|
|
784
|
+
**Returns:** Airtime purchase confirmation.
|
|
785
|
+
|
|
786
|
+
**API Endpoint:** `POST /v1/bills/airtime/pay`
|
|
787
|
+
|
|
788
|
+
---
|
|
789
|
+
|
|
790
|
+
#### `nomba_list_data_plans`
|
|
791
|
+
|
|
792
|
+
Fetch available data bundle plans for a network provider.
|
|
793
|
+
|
|
794
|
+
| Parameter | Type | Required | Description |
|
|
795
|
+
|-----------|------|----------|-------------|
|
|
796
|
+
| `network` | string | Yes | Network provider (`MTN`, `AIRTEL`, `GLO`, `9MOBILE`) |
|
|
797
|
+
|
|
798
|
+
**Returns:** List of plans with names, data amounts, prices, and plan codes.
|
|
799
|
+
|
|
800
|
+
**API Endpoint:** `GET /v1/bills/data/plans`
|
|
801
|
+
|
|
802
|
+
---
|
|
803
|
+
|
|
804
|
+
#### `nomba_buy_data`
|
|
805
|
+
|
|
806
|
+
Purchase a data bundle for a Nigerian phone number.
|
|
807
|
+
|
|
808
|
+
| Parameter | Type | Required | Description |
|
|
809
|
+
|-----------|------|----------|-------------|
|
|
810
|
+
| `phoneNumber` | string | Yes | Nigerian phone number (e.g., `08012345678` or `2348012345678`) |
|
|
811
|
+
| `dataPlanCode` | string | Yes | Data plan code from `nomba_list_data_plans` |
|
|
812
|
+
| `network` | string | Yes | Network provider (`MTN`, `AIRTEL`, `GLO`, `9MOBILE`) |
|
|
813
|
+
|
|
814
|
+
**Returns:** Data purchase confirmation.
|
|
815
|
+
|
|
816
|
+
**API Endpoint:** `POST /v1/bills/data/pay`
|
|
817
|
+
|
|
818
|
+
> **Tip:** Always call `nomba_list_data_plans` first to get available plans and their codes.
|
|
819
|
+
|
|
820
|
+
---
|
|
821
|
+
|
|
822
|
+
## Resources
|
|
823
|
+
|
|
824
|
+
The server exposes one MCP resource:
|
|
825
|
+
|
|
826
|
+
### `nomba://banks`
|
|
827
|
+
|
|
828
|
+
A cached list of all Nigerian bank codes and names in JSON format. This data changes infrequently, so the server fetches it once and caches it in memory for 24 hours before re-fetching.
|
|
829
|
+
|
|
830
|
+
Clients can read this resource instead of calling the `nomba_list_banks` tool when they need to reference bank codes without making an API call each time.
|
|
831
|
+
|
|
832
|
+
---
|
|
833
|
+
|
|
834
|
+
## Example Prompts
|
|
835
|
+
|
|
836
|
+
Here are example prompts you can use with Claude once the server is connected:
|
|
837
|
+
|
|
838
|
+
**Account Management:**
|
|
839
|
+
- "What's my Nomba account balance?"
|
|
840
|
+
- "Show me my account details"
|
|
841
|
+
- "List all my POS terminals"
|
|
842
|
+
|
|
843
|
+
**Sub-Accounts:**
|
|
844
|
+
- "Create a sub-account called 'Lagos Branch'"
|
|
845
|
+
- "List all my sub-accounts"
|
|
846
|
+
- "What's the balance on sub-account abc-123?"
|
|
847
|
+
- "Suspend sub-account abc-123"
|
|
848
|
+
|
|
849
|
+
**Terminals:**
|
|
850
|
+
- "Assign terminal TID123 with serial number SN456"
|
|
851
|
+
- "Unassign terminal TID123"
|
|
852
|
+
|
|
853
|
+
**Transfers:**
|
|
854
|
+
- "What's the bank code for GTBank?"
|
|
855
|
+
- "Look up account 0123456789 at GTBank"
|
|
856
|
+
- "Transfer 5000 Naira to account 0123456789 at Access Bank with narration 'Payment for services'"
|
|
857
|
+
|
|
858
|
+
**Payments:**
|
|
859
|
+
- "Create a payment link for 10,000 Naira for customer@email.com"
|
|
860
|
+
- "Check the status of order reference ABC123"
|
|
861
|
+
- "Refund transaction XYZ456"
|
|
862
|
+
|
|
863
|
+
**Virtual Accounts:**
|
|
864
|
+
- "Create a virtual account named 'John Doe Payments'"
|
|
865
|
+
- "List all my virtual accounts"
|
|
866
|
+
- "Expire virtual account abc-def-123"
|
|
867
|
+
|
|
868
|
+
**Transactions:**
|
|
869
|
+
- "Show me my last 10 transactions"
|
|
870
|
+
- "Show me all credit transactions from January 2024"
|
|
871
|
+
- "Get the details of transaction TXN123"
|
|
872
|
+
- "Check the status of transaction session ABC123"
|
|
873
|
+
|
|
874
|
+
**Bills:**
|
|
875
|
+
- "List electricity providers"
|
|
876
|
+
- "Buy 5000 Naira electricity for meter 12345678 on Ikeja Electric prepaid"
|
|
877
|
+
- "List cable TV providers"
|
|
878
|
+
- "Pay DSTV subscription for smartcard 10234567890"
|
|
879
|
+
|
|
880
|
+
**Airtime & Data:**
|
|
881
|
+
- "Buy 1000 Naira airtime for 08012345678"
|
|
882
|
+
- "What MTN data plans are available?"
|
|
883
|
+
- "Buy the 1GB MTN data plan for 08012345678"
|
|
884
|
+
|
|
885
|
+
---
|
|
886
|
+
|
|
887
|
+
## Development
|
|
888
|
+
|
|
889
|
+
```bash
|
|
890
|
+
git clone <repo-url>
|
|
891
|
+
cd nomba-mcp
|
|
892
|
+
npm install
|
|
893
|
+
npm run build
|
|
894
|
+
```
|
|
895
|
+
|
|
896
|
+
### Scripts
|
|
897
|
+
|
|
898
|
+
| Command | Description |
|
|
899
|
+
|---------|-------------|
|
|
900
|
+
| `npm run build` | Compile TypeScript to `build/` and make entry point executable |
|
|
901
|
+
| `npm run dev` | Watch mode -- recompile on file changes |
|
|
902
|
+
| `npm start` | Run the compiled server |
|
|
903
|
+
| `npm test` | Run all tests (Vitest) |
|
|
904
|
+
| `npm run test:watch` | Run tests in watch mode |
|
|
905
|
+
| `npm run lint` | Lint source files (ESLint) |
|
|
906
|
+
| `npm run format` | Format source files (Prettier) |
|
|
907
|
+
| `npm run type-check` | Type-check without emitting files |
|
|
908
|
+
|
|
909
|
+
### Testing
|
|
910
|
+
|
|
911
|
+
The project includes 36 tests covering:
|
|
912
|
+
|
|
913
|
+
- **`src/utils.test.ts`** -- Utility functions (jsonResponse, errorResponse, buildParams, logToolCall)
|
|
914
|
+
- **`src/client.test.ts`** -- OAuth2 token lifecycle, 401 auto-retry, error parsing, HTTP methods
|
|
915
|
+
- **`src/tools/tools.test.ts`** -- Representative tool handler tests, registration counts, cache TTL
|
|
916
|
+
|
|
917
|
+
```bash
|
|
918
|
+
npm test
|
|
919
|
+
```
|
|
920
|
+
|
|
921
|
+
### CI
|
|
922
|
+
|
|
923
|
+
GitHub Actions runs lint, type-check, tests, and build on every push/PR across Node 18, 20, and 22.
|
|
924
|
+
|
|
925
|
+
### Testing with MCP Inspector
|
|
926
|
+
|
|
927
|
+
The [MCP Inspector](https://github.com/modelcontextprotocol/inspector) provides a browser-based UI for testing tools interactively:
|
|
928
|
+
|
|
929
|
+
```bash
|
|
930
|
+
NOMBA_CLIENT_ID=your_id \
|
|
931
|
+
NOMBA_CLIENT_SECRET=your_secret \
|
|
932
|
+
NOMBA_ACCOUNT_ID=your_account_id \
|
|
933
|
+
npx @modelcontextprotocol/inspector node build/index.js
|
|
934
|
+
```
|
|
935
|
+
|
|
936
|
+
This opens a browser where you can see all registered tools, invoke them with parameters, and inspect the responses.
|
|
937
|
+
|
|
938
|
+
### Adding New Tools
|
|
939
|
+
|
|
940
|
+
1. Create or edit a file in `src/tools/`
|
|
941
|
+
2. Follow the existing pattern using `server.registerTool()`
|
|
942
|
+
3. Import and call the registration function in `src/index.ts`
|
|
943
|
+
4. Run `npm run build` to compile
|
|
944
|
+
|
|
945
|
+
---
|
|
946
|
+
|
|
947
|
+
## Troubleshooting
|
|
948
|
+
|
|
949
|
+
### "Missing required environment variables"
|
|
950
|
+
|
|
951
|
+
The server exits with this message if `NOMBA_CLIENT_ID`, `NOMBA_CLIENT_SECRET`, or `NOMBA_ACCOUNT_ID` are not set. Make sure they are configured in your Claude Desktop/Code MCP server config under the `env` key.
|
|
952
|
+
|
|
953
|
+
### "Token issue failed (401)"
|
|
954
|
+
|
|
955
|
+
Your client credentials are invalid. Verify your `NOMBA_CLIENT_ID` and `NOMBA_CLIENT_SECRET` on the [Nomba Developer Dashboard](https://developer.nomba.com). Also ensure your `NOMBA_ACCOUNT_ID` matches the parent account associated with those credentials.
|
|
956
|
+
|
|
957
|
+
### "Token issue failed (403)"
|
|
958
|
+
|
|
959
|
+
Your account may not have the required permissions. Check your Nomba dashboard for API access settings.
|
|
960
|
+
|
|
961
|
+
### Tools not appearing in Claude
|
|
962
|
+
|
|
963
|
+
- **Claude Desktop:** Restart the application after updating `claude_desktop_config.json`
|
|
964
|
+
- **Claude Code:** Restart the MCP server or reload your settings
|
|
965
|
+
- Verify your config uses `"command": "npx"` with `"args": ["-y", "nomba-mcp"]`
|
|
966
|
+
|
|
967
|
+
### "Nomba API ... failed (429)"
|
|
968
|
+
|
|
969
|
+
You've hit the rate limit. The Nomba API uses a fixed-window rate limit strategy (default 75 requests/second). Wait a moment and retry.
|
|
970
|
+
|
|
971
|
+
### Sandbox vs Production
|
|
972
|
+
|
|
973
|
+
The server defaults to the sandbox environment (`https://sandbox.nomba.com`). Sandbox transactions use test data and do not affect real accounts or move real money. To switch to production:
|
|
974
|
+
|
|
975
|
+
```json
|
|
976
|
+
"NOMBA_BASE_URL": "https://api.nomba.com"
|
|
977
|
+
```
|
|
978
|
+
|
|
979
|
+
---
|
|
980
|
+
|
|
981
|
+
## License
|
|
982
|
+
|
|
983
|
+
[MIT](LICENSE)
|