@ktmcp-cli/nordigen 1.0.0 → 1.0.1
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 +1 -1
- package/README.md +6 -164
- package/banner.svg +25 -0
- package/bin/nordigen.js +3 -0
- package/package.json +1 -1
- package/src/lib/welcome.js +47 -0
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
<p align="center">
|
|
4
|
-
<img src="banner.png" alt="KTMCP Banner" width="100%">
|
|
5
|
-
</p>
|
|
1
|
+

|
|
6
2
|
|
|
3
|
+
# Nordigen CLI
|
|
7
4
|
|
|
8
5
|
Production-ready command-line interface for the Nordigen Account Information Services API (Open Banking).
|
|
9
6
|
|
|
7
|
+
> **⚠️ Unofficial CLI** - This tool is not officially sponsored, endorsed, or maintained by Nordigen (GoCardless). It is an independent project built on the public Nordigen API. Official site: https://nordigen.com | API docs: https://nordigen.com/en/account_information_documenation/integration/
|
|
8
|
+
|
|
10
9
|
## Features
|
|
11
10
|
|
|
12
11
|
- Complete coverage of Nordigen API v2
|
|
@@ -263,162 +262,5 @@ nordigen institutions list --country GB --json | jq '.[].name'
|
|
|
263
262
|
Configuration is stored securely in:
|
|
264
263
|
|
|
265
264
|
- **Linux/macOS**: `~/.config/nordigen-cli/config.json`
|
|
266
|
-
- **Windows**: `%APPDATA
|
|
267
|
-
|
|
268
|
-
The config file has permissions set to `0600` (read/write for owner only).
|
|
269
|
-
|
|
270
|
-
## Error Handling
|
|
271
|
-
|
|
272
|
-
The CLI provides detailed error messages with exit codes:
|
|
273
|
-
|
|
274
|
-
- `0` - Success
|
|
275
|
-
- `1` - General error
|
|
276
|
-
- `400` - Bad request / validation error
|
|
277
|
-
- `401` - Authentication error
|
|
278
|
-
- `403` - Permission denied
|
|
279
|
-
- `404` - Resource not found
|
|
280
|
-
- `429` - Rate limit exceeded
|
|
281
|
-
- `500` - Server error
|
|
282
|
-
|
|
283
|
-
Enable debug output for detailed stack traces:
|
|
284
|
-
|
|
285
|
-
```bash
|
|
286
|
-
DEBUG=1 nordigen accounts get <ACCOUNT_ID>
|
|
287
|
-
```
|
|
288
|
-
|
|
289
|
-
## Common Workflows
|
|
290
|
-
|
|
291
|
-
### Complete Bank Connection Flow
|
|
292
|
-
|
|
293
|
-
```bash
|
|
294
|
-
# 1. Find the institution
|
|
295
|
-
nordigen institutions search "Your Bank" --country GB
|
|
296
|
-
|
|
297
|
-
# 2. Create end user agreement
|
|
298
|
-
nordigen agreements create --institution-id <INST_ID> --max-days 90
|
|
299
|
-
|
|
300
|
-
# 3. Create requisition
|
|
301
|
-
nordigen requisitions create \
|
|
302
|
-
--institution-id <INST_ID> \
|
|
303
|
-
--redirect https://yourapp.com/callback \
|
|
304
|
-
--agreement <AGREEMENT_ID>
|
|
305
|
-
|
|
306
|
-
# 4. Send the returned link to your user for authentication
|
|
307
|
-
|
|
308
|
-
# 5. After user authenticates, retrieve accounts
|
|
309
|
-
nordigen requisitions get <REQUISITION_ID>
|
|
310
|
-
|
|
311
|
-
# 6. Access account data
|
|
312
|
-
nordigen accounts balances <ACCOUNT_ID>
|
|
313
|
-
nordigen accounts transactions <ACCOUNT_ID>
|
|
314
|
-
```
|
|
315
|
-
|
|
316
|
-
### Batch Processing Accounts
|
|
317
|
-
|
|
318
|
-
```bash
|
|
319
|
-
# Get all requisitions as JSON
|
|
320
|
-
nordigen requisitions list --json > requisitions.json
|
|
321
|
-
|
|
322
|
-
# Extract account IDs and fetch transactions
|
|
323
|
-
cat requisitions.json | jq -r '.results[].accounts[]' | while read account; do
|
|
324
|
-
echo "Fetching transactions for $account"
|
|
325
|
-
nordigen accounts transactions $account --json > "transactions_${account}.json"
|
|
326
|
-
done
|
|
327
|
-
```
|
|
328
|
-
|
|
329
|
-
## Why CLI > MCP?
|
|
330
|
-
|
|
331
|
-
### Performance
|
|
332
|
-
- **CLI**: Direct execution, no protocol overhead, instant responses
|
|
333
|
-
- **MCP**: Additional network/IPC layer, serialization overhead, slower responses
|
|
334
|
-
|
|
335
|
-
### Simplicity
|
|
336
|
-
- **CLI**: Simple command invocation, standard UNIX patterns, easy to compose
|
|
337
|
-
- **MCP**: Requires server setup, protocol understanding, more moving parts
|
|
338
|
-
|
|
339
|
-
### Debugging
|
|
340
|
-
- **CLI**: Standard stdout/stderr, easy to debug with DEBUG flag
|
|
341
|
-
- **MCP**: Protocol messages, requires MCP-specific debugging tools
|
|
342
|
-
|
|
343
|
-
### Integration
|
|
344
|
-
- **CLI**: Works with any language via subprocess, easy shell scripting
|
|
345
|
-
- **MCP**: Requires MCP client library, limited language support
|
|
346
|
-
|
|
347
|
-
### Portability
|
|
348
|
-
- **CLI**: Single binary/script, runs anywhere with Node.js
|
|
349
|
-
- **MCP**: Requires MCP server runtime, more dependencies
|
|
350
|
-
|
|
351
|
-
### Use Cases
|
|
352
|
-
|
|
353
|
-
**Use CLI when:**
|
|
354
|
-
- Building scripts and automation
|
|
355
|
-
- One-off data retrieval tasks
|
|
356
|
-
- Integrating with existing shell workflows
|
|
357
|
-
- Debugging API responses
|
|
358
|
-
- Human interaction needed
|
|
359
|
-
|
|
360
|
-
**Use MCP when:**
|
|
361
|
-
- Building persistent AI agent applications
|
|
362
|
-
- Need stateful server connections
|
|
363
|
-
- Multiple AI tools need shared context
|
|
364
|
-
- Protocol-level features required
|
|
365
|
-
|
|
366
|
-
## Troubleshooting
|
|
367
|
-
|
|
368
|
-
### Token Expired
|
|
369
|
-
|
|
370
|
-
```bash
|
|
371
|
-
# Check authentication status
|
|
372
|
-
nordigen auth status
|
|
373
|
-
|
|
374
|
-
# Re-login if needed
|
|
375
|
-
nordigen auth login --secret-id <id> --secret-key <key>
|
|
376
|
-
```
|
|
377
|
-
|
|
378
|
-
### Rate Limiting
|
|
379
|
-
|
|
380
|
-
If you hit rate limits, the API will return a 429 error. Wait and retry, or implement exponential backoff in your scripts.
|
|
381
|
-
|
|
382
|
-
### Account Access Errors
|
|
383
|
-
|
|
384
|
-
Ensure:
|
|
385
|
-
1. Valid End User Agreement exists
|
|
386
|
-
2. Agreement has correct access scope
|
|
387
|
-
3. User has completed authentication flow
|
|
388
|
-
4. Access period hasn't expired
|
|
389
|
-
|
|
390
|
-
## API Documentation
|
|
391
|
-
|
|
392
|
-
For complete API reference, see:
|
|
393
|
-
- Official Nordigen Docs: https://nordigen.com/en/docs/
|
|
394
|
-
- OpenAPI Spec: https://ob.nordigen.com/api/swagger/
|
|
395
|
-
|
|
396
|
-
## Development
|
|
397
|
-
|
|
398
|
-
```bash
|
|
399
|
-
# Install dependencies
|
|
400
|
-
npm install
|
|
401
|
-
|
|
402
|
-
# Run tests
|
|
403
|
-
npm test
|
|
404
|
-
|
|
405
|
-
# Lint code
|
|
406
|
-
npm run lint
|
|
407
|
-
|
|
408
|
-
# Make executable
|
|
409
|
-
chmod +x bin/nordigen.js
|
|
410
|
-
```
|
|
411
|
-
|
|
412
|
-
## License
|
|
413
|
-
|
|
414
|
-
MIT
|
|
415
|
-
|
|
416
|
-
## Support
|
|
417
|
-
|
|
418
|
-
- GitHub Issues: https://github.com/ktmcp/nordigen-cli/issues
|
|
419
|
-
- Email: support@ktmcp.com
|
|
420
|
-
|
|
421
|
-
## Related Documentation
|
|
422
|
-
|
|
423
|
-
- [AGENT.md](./AGENT.md) - AI agent integration patterns
|
|
424
|
-
- [OPENCLAW.md](./OPENCLAW.md) - OpenClaw integration guide
|
|
265
|
+
- **Windows**: `%APPDATA%
|
|
266
|
+
ordigen-cli
|
package/banner.svg
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<svg width="1200" height="300" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<defs>
|
|
3
|
+
<linearGradient id="bg" x1="0%" y1="0%" x2="100%" y2="100%">
|
|
4
|
+
<stop offset="0%" style="stop-color:#0a0a0a;stop-opacity:1" />
|
|
5
|
+
<stop offset="100%" style="stop-color:#1a1a1a;stop-opacity:1" />
|
|
6
|
+
</linearGradient>
|
|
7
|
+
</defs>
|
|
8
|
+
|
|
9
|
+
<rect width="1200" height="300" fill="url(#bg)"/>
|
|
10
|
+
<rect x="0" y="0" width="8" height="300" fill="#00ff7f"/>
|
|
11
|
+
|
|
12
|
+
<text x="60" y="100" font-family="system-ui, -apple-system, sans-serif" font-size="72" font-weight="800" fill="#ffffff">Nordigen CLI</text>
|
|
13
|
+
<text x="60" y="150" font-family="system-ui, -apple-system, sans-serif" font-size="28" fill="#888888">Open banking & financial data</text>
|
|
14
|
+
|
|
15
|
+
<rect x="60" y="190" width="600" height="60" rx="8" fill="#1e1e1e"/>
|
|
16
|
+
<text x="90" y="230" font-family="monospace" font-size="20" fill="#00ff7f">npm install -g @ktmcp-cli/nordigen</text>
|
|
17
|
+
|
|
18
|
+
<!-- Terminal window badge -->
|
|
19
|
+
<rect x="980" y="100" width="180" height="100" rx="4" fill="#0a0e0f" stroke="#0ff7f" stroke-width="2"/>
|
|
20
|
+
<circle cx="995" cy="115" r="3" fill="#ff5f56"/>
|
|
21
|
+
<circle cx="1010" cy="115" r="3" fill="#ffbd2e"/>
|
|
22
|
+
<circle cx="1025" cy="115" r="3" fill="#27c93f"/>
|
|
23
|
+
<text x="1070" y="150" font-family="monospace" font-size="14" fill="#8b9d9f" text-anchor="middle">$ kill -9</text>
|
|
24
|
+
<text x="1070" y="180" font-family="monospace" font-size="24" font-weight="900" fill="#00ff7f" text-anchor="middle">MCP</text>
|
|
25
|
+
</svg>
|
package/bin/nordigen.js
CHANGED
package/package.json
CHANGED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
const os = require('os');
|
|
4
|
+
|
|
5
|
+
function showWelcomeMessage(cliName) {
|
|
6
|
+
const configDir = path.join(os.homedir(), `.${cliName}`);
|
|
7
|
+
const welcomeFile = path.join(configDir, '.welcome-shown');
|
|
8
|
+
|
|
9
|
+
// Check if welcome was already shown
|
|
10
|
+
if (fs.existsSync(welcomeFile)) {
|
|
11
|
+
return; // Already shown
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
// Show welcome message
|
|
15
|
+
console.log('\n╔════════════════════════════════════════════════════════════╗');
|
|
16
|
+
console.log('║ ║');
|
|
17
|
+
console.log('║ 👋 Welcome to the Kill The MCP Project! ║');
|
|
18
|
+
console.log('║ ║');
|
|
19
|
+
console.log('║ This CLI is part of KTMCP - a project that generates ║');
|
|
20
|
+
console.log('║ production-ready command-line tools for APIs. ║');
|
|
21
|
+
console.log('║ ║');
|
|
22
|
+
console.log('║ 🎯 Why CLI over MCP? ║');
|
|
23
|
+
console.log('║ • Faster: Direct API calls, no server overhead ║');
|
|
24
|
+
console.log('║ • Cheaper: No tokens, no server costs ║');
|
|
25
|
+
console.log('║ • Simpler: Standard Unix tools, pipe & compose ║');
|
|
26
|
+
console.log('║ • Deterministic: Same input = same output ║');
|
|
27
|
+
console.log('║ ║');
|
|
28
|
+
console.log('║ 🤖 Perfect for AI Agents! ║');
|
|
29
|
+
console.log('║ Agents can use these CLIs directly via bash commands ║');
|
|
30
|
+
console.log('║ without needing MCP server setup. ║');
|
|
31
|
+
console.log('║ ║');
|
|
32
|
+
console.log('║ 📚 Learn more: https://killthemcp.com ║');
|
|
33
|
+
console.log('║ ║');
|
|
34
|
+
console.log('╚════════════════════════════════════════════════════════════╝\n');
|
|
35
|
+
|
|
36
|
+
// Create config dir and mark as shown
|
|
37
|
+
try {
|
|
38
|
+
if (!fs.existsSync(configDir)) {
|
|
39
|
+
fs.mkdirSync(configDir, { recursive: true });
|
|
40
|
+
}
|
|
41
|
+
fs.writeFileSync(welcomeFile, new Date().toISOString());
|
|
42
|
+
} catch (err) {
|
|
43
|
+
// Silently fail if can't create file
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
module.exports = { showWelcomeMessage };
|