@moneygraph/mcp-server 1.1.2 → 2.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.
Files changed (115) hide show
  1. package/README.md +74 -224
  2. package/bin/mcp-http.js +6 -8
  3. package/bin/mcp-server.js +3 -4
  4. package/package.json +23 -52
  5. package/src/config.js +50 -0
  6. package/src/http.js +32 -0
  7. package/src/index.js +20 -0
  8. package/src/prompts.js +80 -0
  9. package/src/resources.js +54 -0
  10. package/src/server.js +36 -0
  11. package/src/tools.js +250 -0
  12. package/dist/config.d.ts +0 -28
  13. package/dist/config.d.ts.map +0 -1
  14. package/dist/config.js +0 -52
  15. package/dist/config.js.map +0 -1
  16. package/dist/http.d.ts +0 -15
  17. package/dist/http.d.ts.map +0 -1
  18. package/dist/http.js +0 -104
  19. package/dist/http.js.map +0 -1
  20. package/dist/index.d.ts +0 -18
  21. package/dist/index.d.ts.map +0 -1
  22. package/dist/index.js +0 -164
  23. package/dist/index.js.map +0 -1
  24. package/dist/prompts/check-rates.d.ts +0 -6
  25. package/dist/prompts/check-rates.d.ts.map +0 -1
  26. package/dist/prompts/check-rates.js +0 -29
  27. package/dist/prompts/check-rates.js.map +0 -1
  28. package/dist/prompts/crypto-deposit.d.ts +0 -6
  29. package/dist/prompts/crypto-deposit.d.ts.map +0 -1
  30. package/dist/prompts/crypto-deposit.js +0 -36
  31. package/dist/prompts/crypto-deposit.js.map +0 -1
  32. package/dist/prompts/issue-card.d.ts +0 -6
  33. package/dist/prompts/issue-card.d.ts.map +0 -1
  34. package/dist/prompts/issue-card.js +0 -33
  35. package/dist/prompts/issue-card.js.map +0 -1
  36. package/dist/prompts/onboard-customer.d.ts +0 -6
  37. package/dist/prompts/onboard-customer.d.ts.map +0 -1
  38. package/dist/prompts/onboard-customer.js +0 -31
  39. package/dist/prompts/onboard-customer.js.map +0 -1
  40. package/dist/prompts/payout-status.d.ts +0 -6
  41. package/dist/prompts/payout-status.d.ts.map +0 -1
  42. package/dist/prompts/payout-status.js +0 -29
  43. package/dist/prompts/payout-status.js.map +0 -1
  44. package/dist/prompts/send-money.d.ts +0 -6
  45. package/dist/prompts/send-money.d.ts.map +0 -1
  46. package/dist/prompts/send-money.js +0 -34
  47. package/dist/prompts/send-money.js.map +0 -1
  48. package/dist/resources/corridors.d.ts +0 -8
  49. package/dist/resources/corridors.d.ts.map +0 -1
  50. package/dist/resources/corridors.js +0 -137
  51. package/dist/resources/corridors.js.map +0 -1
  52. package/dist/resources/status.d.ts +0 -7
  53. package/dist/resources/status.d.ts.map +0 -1
  54. package/dist/resources/status.js +0 -32
  55. package/dist/resources/status.js.map +0 -1
  56. package/dist/resources/wallets.d.ts +0 -7
  57. package/dist/resources/wallets.d.ts.map +0 -1
  58. package/dist/resources/wallets.js +0 -37
  59. package/dist/resources/wallets.js.map +0 -1
  60. package/dist/tools/cards.d.ts +0 -10
  61. package/dist/tools/cards.d.ts.map +0 -1
  62. package/dist/tools/cards.js +0 -229
  63. package/dist/tools/cards.js.map +0 -1
  64. package/dist/tools/crypto.d.ts +0 -10
  65. package/dist/tools/crypto.d.ts.map +0 -1
  66. package/dist/tools/crypto.js +0 -265
  67. package/dist/tools/crypto.js.map +0 -1
  68. package/dist/tools/currencies.d.ts +0 -10
  69. package/dist/tools/currencies.d.ts.map +0 -1
  70. package/dist/tools/currencies.js +0 -137
  71. package/dist/tools/currencies.js.map +0 -1
  72. package/dist/tools/customers.d.ts +0 -7
  73. package/dist/tools/customers.d.ts.map +0 -1
  74. package/dist/tools/customers.js +0 -311
  75. package/dist/tools/customers.js.map +0 -1
  76. package/dist/tools/directors.d.ts +0 -7
  77. package/dist/tools/directors.d.ts.map +0 -1
  78. package/dist/tools/directors.js +0 -148
  79. package/dist/tools/directors.js.map +0 -1
  80. package/dist/tools/fx.d.ts +0 -10
  81. package/dist/tools/fx.d.ts.map +0 -1
  82. package/dist/tools/fx.js +0 -193
  83. package/dist/tools/fx.js.map +0 -1
  84. package/dist/tools/ledger.d.ts +0 -7
  85. package/dist/tools/ledger.d.ts.map +0 -1
  86. package/dist/tools/ledger.js +0 -101
  87. package/dist/tools/ledger.js.map +0 -1
  88. package/dist/tools/payments.d.ts +0 -7
  89. package/dist/tools/payments.d.ts.map +0 -1
  90. package/dist/tools/payments.js +0 -93
  91. package/dist/tools/payments.js.map +0 -1
  92. package/dist/tools/payouts.d.ts +0 -10
  93. package/dist/tools/payouts.d.ts.map +0 -1
  94. package/dist/tools/payouts.js +0 -352
  95. package/dist/tools/payouts.js.map +0 -1
  96. package/dist/tools/recipients.d.ts +0 -7
  97. package/dist/tools/recipients.d.ts.map +0 -1
  98. package/dist/tools/recipients.js +0 -150
  99. package/dist/tools/recipients.js.map +0 -1
  100. package/dist/tools/recurring.d.ts +0 -7
  101. package/dist/tools/recurring.d.ts.map +0 -1
  102. package/dist/tools/recurring.js +0 -94
  103. package/dist/tools/recurring.js.map +0 -1
  104. package/dist/tools/reference.d.ts +0 -7
  105. package/dist/tools/reference.d.ts.map +0 -1
  106. package/dist/tools/reference.js +0 -83
  107. package/dist/tools/reference.js.map +0 -1
  108. package/dist/tools/transactions.d.ts +0 -7
  109. package/dist/tools/transactions.d.ts.map +0 -1
  110. package/dist/tools/transactions.js +0 -88
  111. package/dist/tools/transactions.js.map +0 -1
  112. package/dist/tools/wallets.d.ts +0 -7
  113. package/dist/tools/wallets.d.ts.map +0 -1
  114. package/dist/tools/wallets.js +0 -129
  115. package/dist/tools/wallets.js.map +0 -1
package/dist/index.js DELETED
@@ -1,164 +0,0 @@
1
- /**
2
- * MoneyGraph MCP Server — Main Entry Point
3
- *
4
- * The first MCP server for real cross-border money movement.
5
- * 77 tools, 6 resources, 6 prompts.
6
- * 82+ countries, 328 FX pairs, bank transfers, mobile money, SWIFT,
7
- * virtual/physical cards, crypto on-ramp/off-ramp.
8
- *
9
- * Supports two transport modes:
10
- * - stdio (default): For Claude Desktop, Cursor, VS Code
11
- * - http: For web clients (moneygraph-chat, Claude connector)
12
- * Set MONEYGRAPH_TRANSPORT=http to enable
13
- */
14
- import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
15
- import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
16
- import { loadConfig } from './config.js';
17
- // Tools
18
- import { registerCustomerTools } from './tools/customers.js';
19
- import { registerDirectorTools } from './tools/directors.js';
20
- import { registerCurrencyTools } from './tools/currencies.js';
21
- import { registerRecipientTools } from './tools/recipients.js';
22
- import { registerPayoutTools } from './tools/payouts.js';
23
- import { registerWalletTools } from './tools/wallets.js';
24
- import { registerPaymentTools } from './tools/payments.js';
25
- import { registerRecurringTools } from './tools/recurring.js';
26
- import { registerTransactionTools } from './tools/transactions.js';
27
- import { registerReferenceTools } from './tools/reference.js';
28
- import { registerLedgerTools } from './tools/ledger.js';
29
- import { registerCardTools } from './tools/cards.js';
30
- import { registerCryptoTools } from './tools/crypto.js';
31
- import { registerFXTools } from './tools/fx.js';
32
- // Resources
33
- import { registerStatusResource } from './resources/status.js';
34
- import { registerWalletsResource } from './resources/wallets.js';
35
- import { registerCorridorsResource } from './resources/corridors.js';
36
- // Prompts
37
- import { registerSendMoneyPrompt } from './prompts/send-money.js';
38
- import { registerOnboardCustomerPrompt } from './prompts/onboard-customer.js';
39
- import { registerCheckRatesPrompt } from './prompts/check-rates.js';
40
- import { registerTrackPayoutPrompt } from './prompts/payout-status.js';
41
- import { registerIssueCardPrompt } from './prompts/issue-card.js';
42
- import { registerCryptoDepositPrompt } from './prompts/crypto-deposit.js';
43
- // ── Server Instructions ───────────────────────────────────────────
44
- function getServerInstructions(mode) {
45
- return `MoneyGraph MCP Server — Cross-Border Payment Infrastructure
46
-
47
- IMPORTANT CONCEPTS:
48
- - DATE FORMAT: DD-MM-YYYY (e.g., "15-06-1990") — required for all dates
49
- - FX EXPIRY: Quotes expire in 2 minutes — call confirm_fx_quote promptly
50
- - IDEMPOTENCY: Always include unique idempotency_key for payouts to prevent duplicates
51
- - TWO-STEP PAYOUT FLOW: (1) create recipient → (2) create payout. Or use convenience tools: send_bank_payout, send_mobile_money_payout, smart_payout.
52
- - AMOUNTS IN MINOR UNITS: All monetary amounts are in minor units. $500.00 = 50000. Always multiply by 100.
53
- - GET_CURRENCIES IS KEY: Before any payout, call get_currencies with the destination country code. Returns corridor UUIDs, delivery window UUIDs, rates, fees, and limits.
54
- - CUSTOMER IDS: Numeric strings like "0605399" (not UUIDs)
55
- - ALL OTHER IDS: UUIDs (wallet_id, recipient_id, corridor_id, delivery_window_id)
56
- - KYC REQUIRED: Only APPROVED customers can send payouts or get cards. In sandbox, submit_kyc auto-approves.
57
-
58
- RECOMMENDED FLOW FOR SENDING MONEY:
59
- 1. get_currencies (destination country) → corridor ID, delivery window ID, rate, fees
60
- 2. list_wallets → find source wallet (USD, GBP, EUR, or CAD)
61
- 3. Create or find customer → create_customer + submit_kyc (if new)
62
- 4. get_fx_quote → get live rate and fee → confirm_fx_quote → lock the rate
63
- 5. send_bank_payout / send_mobile_money_payout / smart_payout → execute transfer
64
- 6. Report confirmation with transaction ID, rate, fees, and estimated delivery
65
-
66
- FX QUOTE FLOW (CRITICAL — 2 MIN EXPIRY):
67
- 1. get_fx_quote with source/destination currencies + amount
68
- 2. confirm_fx_quote with quote_id (MUST call within 2 minutes)
69
- 3. Use confirmed quote_id when creating payouts
70
-
71
- CARD ISSUANCE FLOW:
72
- 1. Ensure customer has APPROVED KYC (check_kyc_status)
73
- 2. create_card with customer_id, type (virtual/physical), currency
74
- 3. fund_card to load balance from a wallet
75
- 4. Virtual cards are instant; physical cards are shipped
76
-
77
- CRYPTO FLOW:
78
- 1. create_crypto_address → get deposit address + QR code
79
- 2. Track deposits with list_crypto_deposits
80
- 3. Convert crypto to fiat with crypto_convert_quote → crypto_convert_execute
81
- 4. Send crypto payouts with send_crypto_payout
82
-
83
- PAYOUT RAILS:
84
- - Bank: ACH (US), SEPA (EU), Faster Payments (UK), SWIFT (global)
85
- - Mobile Money: M-Pesa, MTN, Airtel, Vodafone, Orange
86
- - Crypto: USDC, USDT, BTC, ETH on Ethereum, Tron, Polygon, Base, Solana
87
- - Cards: Virtual + Physical debit cards in USD, GBP, EUR
88
-
89
- BASE CURRENCIES: USD, GBP, EUR, CAD
90
- DELIVERY METHODS: bank, mobile_money, cash_pickup, crypto
91
- CORRIDORS: 82+ countries per base currency, 328 total FX pairs
92
-
93
- CURRENT MODE: ${mode}
94
- ${mode === 'sandbox' ? 'SANDBOX: All data is in-memory. KYC auto-approves. Use simulate_payout_success/decline to test. Use create_mock_customer for instant test personas.' : 'PRODUCTION: Real money movement. Real KYC. Real compliance. Rate limit: 30 req/min.'}`;
95
- }
96
- // ── Create Server (shared setup) ──────────────────────────────────
97
- export function createServer(config) {
98
- const server = new McpServer({
99
- name: 'moneygraph',
100
- version: '1.1.2',
101
- }, {
102
- capabilities: {
103
- tools: {},
104
- resources: {},
105
- prompts: {},
106
- },
107
- instructions: getServerInstructions(config.mode),
108
- });
109
- // Register all tools (15 domains, 78 total)
110
- registerCustomerTools(server, config);
111
- registerDirectorTools(server, config);
112
- registerCurrencyTools(server, config);
113
- registerRecipientTools(server, config);
114
- registerPayoutTools(server, config);
115
- registerWalletTools(server, config);
116
- registerPaymentTools(server, config);
117
- registerRecurringTools(server, config);
118
- registerTransactionTools(server, config);
119
- registerReferenceTools(server, config);
120
- registerLedgerTools(server, config);
121
- registerCardTools(server, config);
122
- registerCryptoTools(server, config);
123
- registerFXTools(server, config);
124
- // Register all 6 resources
125
- registerStatusResource(server, config);
126
- registerWalletsResource(server, config);
127
- registerCorridorsResource(server, config);
128
- // Register all 6 prompts
129
- registerSendMoneyPrompt(server);
130
- registerOnboardCustomerPrompt(server);
131
- registerCheckRatesPrompt(server);
132
- registerTrackPayoutPrompt(server);
133
- registerIssueCardPrompt(server);
134
- registerCryptoDepositPrompt(server);
135
- return server;
136
- }
137
- // ── Start Server ──────────────────────────────────────────────────
138
- export async function startServer() {
139
- const config = loadConfig();
140
- const transportMode = process.env.MONEYGRAPH_TRANSPORT || 'stdio';
141
- if (transportMode === 'http') {
142
- // Dynamic import to avoid loading http module when using stdio
143
- const { startHTTPServer } = await import('./http.js');
144
- await startHTTPServer(config);
145
- }
146
- else {
147
- // Default: stdio transport for CLI / IDE integrations
148
- const server = createServer(config);
149
- const transport = new StdioServerTransport();
150
- await server.connect(transport);
151
- console.error(`MoneyGraph MCP Server v1.1.2 — ${config.mode} mode — stdio transport — 77 tools, 6 resources, 6 prompts`);
152
- }
153
- }
154
- // Auto-start when run directly
155
- const isDirectRun = process.argv[1]?.endsWith('index.js') ||
156
- process.argv[1]?.endsWith('mcp-server.js') ||
157
- process.argv[1]?.endsWith('mcp-http.js');
158
- if (isDirectRun) {
159
- startServer().catch((err) => {
160
- console.error('Fatal:', err);
161
- process.exit(1);
162
- });
163
- }
164
- //# sourceMappingURL=index.js.map
package/dist/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AAEjF,OAAO,EAAE,UAAU,EAAqB,MAAM,aAAa,CAAC;AAE5D,QAAQ;AACR,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAC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@
1
- /**
2
- * Check Rates Prompt — FX rate comparison
3
- */
4
- import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
5
- export declare function registerCheckRatesPrompt(server: McpServer): void;
6
- //# sourceMappingURL=check-rates.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"check-rates.d.ts","sourceRoot":"","sources":["../../src/prompts/check-rates.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAGpE,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,SAAS,QA4BzD"}
@@ -1,29 +0,0 @@
1
- /**
2
- * Check Rates Prompt — FX rate comparison
3
- */
4
- import { z } from 'zod';
5
- export function registerCheckRatesPrompt(server) {
6
- server.prompt('check-rates', 'Compare FX rates and fees across corridors', {
7
- from_currency: z.string().describe('Source currency (e.g. "USD", "GBP", "EUR")'),
8
- to_country: z.string().optional().describe('Specific destination country, or leave empty to show all'),
9
- }, async (args) => ({
10
- messages: [
11
- {
12
- role: 'user',
13
- content: {
14
- type: 'text',
15
- text: `Show me the exchange rates from ${args.from_currency}${args.to_country ? ` to ${args.to_country}` : ' to all available countries'}.
16
-
17
- Please call get_currencies and present the rates clearly showing:
18
- - Destination country and currency
19
- - Exchange rate
20
- - Fee percentage
21
- - Min/max transfer limits
22
- - Available delivery methods and their speeds
23
- ${args.to_country ? '\nAlso show delivery window options with fees for this specific corridor.' : ''}`,
24
- },
25
- },
26
- ],
27
- }));
28
- }
29
- //# sourceMappingURL=check-rates.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"check-rates.js","sourceRoot":"","sources":["../../src/prompts/check-rates.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,UAAU,wBAAwB,CAAC,MAAiB;IACxD,MAAM,CAAC,MAAM,CACX,aAAa,EACb,4CAA4C,EAC5C;QACE,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,4CAA4C,CAAC;QAChF,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,0DAA0D,CAAC;KACvG,EACD,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC;QACf,QAAQ,EAAE;YACR;gBACE,IAAI,EAAE,MAAe;gBACrB,OAAO,EAAE;oBACP,IAAI,EAAE,MAAe;oBACrB,IAAI,EAAE,mCAAmC,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,OAAO,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,6BAA6B;;;;;;;;EAQlJ,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,2EAA2E,CAAC,CAAC,CAAC,EAAE,EAAE;iBAC3F;aACF;SACF;KACF,CAAC,CACH,CAAC;AACJ,CAAC"}
@@ -1,6 +0,0 @@
1
- /**
2
- * Crypto Deposit Prompt — guided crypto address creation and deposit tracking
3
- */
4
- import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
5
- export declare function registerCryptoDepositPrompt(server: McpServer): void;
6
- //# sourceMappingURL=crypto-deposit.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"crypto-deposit.d.ts","sourceRoot":"","sources":["../../src/prompts/crypto-deposit.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAGpE,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,SAAS,QAmC5D"}
@@ -1,36 +0,0 @@
1
- /**
2
- * Crypto Deposit Prompt — guided crypto address creation and deposit tracking
3
- */
4
- import { z } from 'zod';
5
- export function registerCryptoDepositPrompt(server) {
6
- server.prompt('crypto-deposit', 'Set up a crypto deposit address and track incoming deposits — guided step-by-step', {
7
- customer_id: z.string().optional().describe('Customer ID (if known)'),
8
- currency: z
9
- .string()
10
- .optional()
11
- .describe('Crypto currency: "USDC", "USDT", "BTC", "ETH"'),
12
- network: z
13
- .string()
14
- .optional()
15
- .describe('Blockchain network: "ethereum", "tron", "polygon", "base", "solana", "bitcoin"'),
16
- }, async (args) => ({
17
- messages: [
18
- {
19
- role: 'user',
20
- content: {
21
- type: 'text',
22
- text: `I want to receive ${args.currency || 'USDC'} deposits${args.network ? ` on ${args.network}` : ''}${args.customer_id ? ` for customer ${args.customer_id}` : ''}.
23
-
24
- Please follow these steps:
25
- 1. ${args.customer_id ? `Verify customer "${args.customer_id}" has APPROVED KYC` : 'Create a customer and submit KYC'}
26
- 2. Call create_crypto_address with currency="${args.currency || 'USDC'}" and network="${args.network || 'ethereum'}"
27
- 3. Show me the deposit address and QR code URL
28
- 4. Ask about auto-convert settings (convert crypto to fiat on receipt)
29
- 5. If auto-convert desired, call update_crypto_settings
30
- 6. Explain how to track incoming deposits with list_crypto_deposits`,
31
- },
32
- },
33
- ],
34
- }));
35
- }
36
- //# sourceMappingURL=crypto-deposit.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"crypto-deposit.js","sourceRoot":"","sources":["../../src/prompts/crypto-deposit.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,UAAU,2BAA2B,CAAC,MAAiB;IAC3D,MAAM,CAAC,MAAM,CACX,gBAAgB,EAChB,mFAAmF,EACnF;QACE,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,wBAAwB,CAAC;QACrE,QAAQ,EAAE,CAAC;aACR,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CAAC,+CAA+C,CAAC;QAC5D,OAAO,EAAE,CAAC;aACP,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CAAC,gFAAgF,CAAC;KAC9F,EACD,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC;QACf,QAAQ,EAAE;YACR;gBACE,IAAI,EAAE,MAAe;gBACrB,OAAO,EAAE;oBACP,IAAI,EAAE,MAAe;oBACrB,IAAI,EAAE,qBAAqB,IAAI,CAAC,QAAQ,IAAI,MAAM,YAAY,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,iBAAiB,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE;;;KAG5K,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,oBAAoB,IAAI,CAAC,WAAW,oBAAoB,CAAC,CAAC,CAAC,kCAAkC;+CACtE,IAAI,CAAC,QAAQ,IAAI,MAAM,kBAAkB,IAAI,CAAC,OAAO,IAAI,UAAU;;;;oEAI9C;iBACzD;aACF;SACF;KACF,CAAC,CACH,CAAC;AACJ,CAAC"}
@@ -1,6 +0,0 @@
1
- /**
2
- * Issue Card Prompt — guided virtual/physical card issuance flow
3
- */
4
- import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
5
- export declare function registerIssueCardPrompt(server: McpServer): void;
6
- //# sourceMappingURL=issue-card.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"issue-card.d.ts","sourceRoot":"","sources":["../../src/prompts/issue-card.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAGpE,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,SAAS,QAgCxD"}
@@ -1,33 +0,0 @@
1
- /**
2
- * Issue Card Prompt — guided virtual/physical card issuance flow
3
- */
4
- import { z } from 'zod';
5
- export function registerIssueCardPrompt(server) {
6
- server.prompt('issue-card', 'Issue a virtual or physical debit card for a customer — guided step-by-step', {
7
- customer_id: z.string().optional().describe('Customer ID (if known)'),
8
- card_type: z
9
- .string()
10
- .optional()
11
- .describe('Card type: "virtual" (instant) or "physical" (shipped)'),
12
- currency: z.string().optional().describe('Card currency (e.g. "USD", "GBP", "EUR")'),
13
- }, async (args) => ({
14
- messages: [
15
- {
16
- role: 'user',
17
- content: {
18
- type: 'text',
19
- text: `I want to issue a ${args.card_type || 'virtual'} card${args.customer_id ? ` for customer ${args.customer_id}` : ''} in ${args.currency || 'USD'}.
20
-
21
- Please follow these steps:
22
- 1. ${args.customer_id ? `Check KYC status with check_kyc_status for customer "${args.customer_id}"` : 'Create a customer with create_customer and submit KYC'}
23
- 2. If KYC is not APPROVED, submit KYC first
24
- 3. Call create_card with the customer_id, type="${args.card_type || 'virtual'}", and currency="${args.currency || 'USD'}"
25
- 4. If virtual, show the card details (number, expiry, CVV)
26
- 5. Ask if I want to fund the card, and if so, call fund_card
27
- 6. Report the card ID, masked PAN, balance, and status`,
28
- },
29
- },
30
- ],
31
- }));
32
- }
33
- //# sourceMappingURL=issue-card.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"issue-card.js","sourceRoot":"","sources":["../../src/prompts/issue-card.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,UAAU,uBAAuB,CAAC,MAAiB;IACvD,MAAM,CAAC,MAAM,CACX,YAAY,EACZ,6EAA6E,EAC7E;QACE,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,wBAAwB,CAAC;QACrE,SAAS,EAAE,CAAC;aACT,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CAAC,wDAAwD,CAAC;QACrE,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,0CAA0C,CAAC;KACrF,EACD,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC;QACf,QAAQ,EAAE;YACR;gBACE,IAAI,EAAE,MAAe;gBACrB,OAAO,EAAE;oBACP,IAAI,EAAE,MAAe;oBACrB,IAAI,EAAE,qBAAqB,IAAI,CAAC,SAAS,IAAI,SAAS,QAAQ,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,iBAAiB,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,OAAO,IAAI,CAAC,QAAQ,IAAI,KAAK;;;KAG7J,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,wDAAwD,IAAI,CAAC,WAAW,GAAG,CAAC,CAAC,CAAC,uDAAuD;;kDAE3G,IAAI,CAAC,SAAS,IAAI,SAAS,oBAAoB,IAAI,CAAC,QAAQ,IAAI,KAAK;;;uDAGhE;iBAC5C;aACF;SACF;KACF,CAAC,CACH,CAAC;AACJ,CAAC"}
@@ -1,6 +0,0 @@
1
- /**
2
- * Onboard Customer Prompt — guided customer creation + KYC
3
- */
4
- import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
5
- export declare function registerOnboardCustomerPrompt(server: McpServer): void;
6
- //# sourceMappingURL=onboard-customer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"onboard-customer.d.ts","sourceRoot":"","sources":["../../src/prompts/onboard-customer.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAGpE,wBAAgB,6BAA6B,CAAC,MAAM,EAAE,SAAS,QA+B9D"}
@@ -1,31 +0,0 @@
1
- /**
2
- * Onboard Customer Prompt — guided customer creation + KYC
3
- */
4
- import { z } from 'zod';
5
- export function registerOnboardCustomerPrompt(server) {
6
- server.prompt('onboard-customer', 'Create and verify a new customer — guided step-by-step', {
7
- customer_type: z.string().describe('"personal" or "business"'),
8
- country: z.string().describe('Customer country (e.g. "US", "United Kingdom")'),
9
- }, async (args) => ({
10
- messages: [
11
- {
12
- role: 'user',
13
- content: {
14
- type: 'text',
15
- text: `I need to onboard a new ${args.customer_type} customer based in ${args.country}.
16
-
17
- Please guide me through:
18
- ${args.customer_type === 'business'
19
- ? `1. Create a business customer (need: contact name, email, phone, business name, business address)
20
- 2. Add directors with create_director (need: name, email, ownership %, position)
21
- 3. Submit KYC with submit_kyc`
22
- : `1. Create a personal customer (need: first name, last name, email, phone, country)
23
- 2. Submit KYC with submit_kyc`}
24
-
25
- Ask me for any missing information. In sandbox mode, KYC auto-approves.`,
26
- },
27
- },
28
- ],
29
- }));
30
- }
31
- //# sourceMappingURL=onboard-customer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"onboard-customer.js","sourceRoot":"","sources":["../../src/prompts/onboard-customer.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,UAAU,6BAA6B,CAAC,MAAiB;IAC7D,MAAM,CAAC,MAAM,CACX,kBAAkB,EAClB,wDAAwD,EACxD;QACE,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,0BAA0B,CAAC;QAC9D,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,gDAAgD,CAAC;KAC/E,EACD,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC;QACf,QAAQ,EAAE;YACR;gBACE,IAAI,EAAE,MAAe;gBACrB,OAAO,EAAE;oBACP,IAAI,EAAE,MAAe;oBACrB,IAAI,EAAE,2BAA2B,IAAI,CAAC,aAAa,sBAAsB,IAAI,CAAC,OAAO;;;EAG/F,IAAI,CAAC,aAAa,KAAK,UAAU;wBACjC,CAAC,CAAC;;8BAE0B;wBAC5B,CAAC,CAAC;8BAEJ;;wEAEwE;iBAC7D;aACF;SACF;KACF,CAAC,CACH,CAAC;AACJ,CAAC"}
@@ -1,6 +0,0 @@
1
- /**
2
- * Track Payout Prompt — check payout status
3
- */
4
- import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
5
- export declare function registerTrackPayoutPrompt(server: McpServer): void;
6
- //# sourceMappingURL=payout-status.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"payout-status.d.ts","sourceRoot":"","sources":["../../src/prompts/payout-status.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAGpE,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,SAAS,QA4B1D"}
@@ -1,29 +0,0 @@
1
- /**
2
- * Track Payout Prompt — check payout status
3
- */
4
- import { z } from 'zod';
5
- export function registerTrackPayoutPrompt(server) {
6
- server.prompt('track-payout', 'Check the status of a payout transaction', {
7
- transaction_id: z.string().describe('The transaction/payout ID to track'),
8
- }, async (args) => ({
9
- messages: [
10
- {
11
- role: 'user',
12
- content: {
13
- type: 'text',
14
- text: `What's the status of transaction ${args.transaction_id}?
15
-
16
- Please call get_transaction and report:
17
- - Current status
18
- - Amount and currency
19
- - Recipient details
20
- - Creation date
21
- - Any decline reason if applicable
22
-
23
- If we're in sandbox and the payout is still processing, mention that simulate_payout_success or simulate_payout_decline can be used to test outcomes.`,
24
- },
25
- },
26
- ],
27
- }));
28
- }
29
- //# sourceMappingURL=payout-status.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"payout-status.js","sourceRoot":"","sources":["../../src/prompts/payout-status.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,UAAU,yBAAyB,CAAC,MAAiB;IACzD,MAAM,CAAC,MAAM,CACX,cAAc,EACd,0CAA0C,EAC1C;QACE,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,oCAAoC,CAAC;KAC1E,EACD,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC;QACf,QAAQ,EAAE;YACR;gBACE,IAAI,EAAE,MAAe;gBACrB,OAAO,EAAE;oBACP,IAAI,EAAE,MAAe;oBACrB,IAAI,EAAE,oCAAoC,IAAI,CAAC,cAAc;;;;;;;;;sJAS6E;iBAC3I;aACF;SACF;KACF,CAAC,CACH,CAAC;AACJ,CAAC"}
@@ -1,6 +0,0 @@
1
- /**
2
- * Send Money Prompt — guided cross-border payment flow
3
- */
4
- import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
5
- export declare function registerSendMoneyPrompt(server: McpServer): void;
6
- //# sourceMappingURL=send-money.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"send-money.d.ts","sourceRoot":"","sources":["../../src/prompts/send-money.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAGpE,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,SAAS,QAiCxD"}
@@ -1,34 +0,0 @@
1
- /**
2
- * Send Money Prompt — guided cross-border payment flow
3
- */
4
- import { z } from 'zod';
5
- export function registerSendMoneyPrompt(server) {
6
- server.prompt('send-money', 'Send money to someone in another country — guided step-by-step', {
7
- amount: z.string().describe('How much to send (e.g. "500")'),
8
- currency: z.string().describe('Source currency (e.g. "USD", "GBP", "EUR")'),
9
- destination_country: z.string().describe('Where to send (e.g. "Nigeria", "Kenya", "Ghana")'),
10
- delivery_method: z
11
- .string()
12
- .optional()
13
- .describe('Delivery method: "bank", "mobile_money", or "cash_pickup" (default: bank)'),
14
- }, async (args) => ({
15
- messages: [
16
- {
17
- role: 'user',
18
- content: {
19
- type: 'text',
20
- text: `I want to send ${args.amount} ${args.currency} to ${args.destination_country} via ${args.delivery_method || 'bank'}.
21
-
22
- Please follow these steps:
23
- 1. Call get_currencies with the destination country ISO2 code to get corridor rates and delivery windows
24
- 2. Call list_wallets to find the ${args.currency} wallet
25
- 3. Show me the exchange rate, fees, and estimated delivery time and ask me to confirm
26
- 4. If I don't have a customer yet, create one and submit KYC
27
- 5. Call send_bank_payout or send_mobile_money_payout with all required IDs
28
- 6. Report the transaction ID, FX rate applied, fees, and estimated delivery`,
29
- },
30
- },
31
- ],
32
- }));
33
- }
34
- //# sourceMappingURL=send-money.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"send-money.js","sourceRoot":"","sources":["../../src/prompts/send-money.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,UAAU,uBAAuB,CAAC,MAAiB;IACvD,MAAM,CAAC,MAAM,CACX,YAAY,EACZ,gEAAgE,EAChE;QACE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,+BAA+B,CAAC;QAC5D,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,4CAA4C,CAAC;QAC3E,mBAAmB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,kDAAkD,CAAC;QAC5F,eAAe,EAAE,CAAC;aACf,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CAAC,2EAA2E,CAAC;KACzF,EACD,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC;QACf,QAAQ,EAAE;YACR;gBACE,IAAI,EAAE,MAAe;gBACrB,OAAO,EAAE;oBACP,IAAI,EAAE,MAAe;oBACrB,IAAI,EAAE,kBAAkB,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,QAAQ,OAAO,IAAI,CAAC,mBAAmB,QAAQ,IAAI,CAAC,eAAe,IAAI,MAAM;;;;mCAIlG,IAAI,CAAC,QAAQ;;;;4EAI4B;iBACjE;aACF;SACF;KACF,CAAC,CACH,CAAC;AACJ,CAAC"}
@@ -1,8 +0,0 @@
1
- /**
2
- * Corridors Resource — FX rates, delivery windows, corridor data
3
- * Supports browsable URIs: rates/{base}, rates/{from}/{to}, corridors/{base}, delivery-windows/{currency}
4
- */
5
- import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
6
- import type { ServerConfig } from '../config.js';
7
- export declare function registerCorridorsResource(server: McpServer, config: ServerConfig): void;
8
- //# sourceMappingURL=corridors.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"corridors.d.ts","sourceRoot":"","sources":["../../src/resources/corridors.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,SAAS,EAAoB,MAAM,yCAAyC,CAAC;AACtF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAGjD,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,YAAY,QAoLhF"}
@@ -1,137 +0,0 @@
1
- /**
2
- * Corridors Resource — FX rates, delivery windows, corridor data
3
- * Supports browsable URIs: rates/{base}, rates/{from}/{to}, corridors/{base}, delivery-windows/{currency}
4
- */
5
- import { ResourceTemplate } from '@modelcontextprotocol/sdk/server/mcp.js';
6
- import { safeCall } from '../config.js';
7
- export function registerCorridorsResource(server, config) {
8
- const { client } = config;
9
- // ── FX Rates by base currency ───────────────────────────────────
10
- server.resource('FX Rates', new ResourceTemplate('moneygraph://rates/{base}', { list: undefined }), {
11
- description: 'All payout rates from a base currency (e.g. rates/USD shows all corridor rates from USD)',
12
- mimeType: 'application/json',
13
- }, async (uri, params) => {
14
- const base = (params.base || 'USD').toUpperCase();
15
- const ratesResult = await safeCall(() => client.fx.rates(), 'resource_rates');
16
- let rates = {};
17
- if (ratesResult.success) {
18
- for (const [pair, rate] of Object.entries(ratesResult.data)) {
19
- if (pair.startsWith(`${base}_`)) {
20
- rates[pair] = rate;
21
- }
22
- }
23
- }
24
- return {
25
- contents: [
26
- {
27
- uri: uri.href,
28
- mimeType: 'application/json',
29
- text: JSON.stringify({
30
- base_currency: base,
31
- pair_count: Object.keys(rates).length,
32
- rates,
33
- }, null, 2),
34
- },
35
- ],
36
- };
37
- });
38
- // ── Specific corridor rate ──────────────────────────────────────
39
- server.resource('Corridor Rate', new ResourceTemplate('moneygraph://rates/{from}/{to}', { list: undefined }), {
40
- description: 'Get the exchange rate, fees, and delivery options for a specific corridor (e.g. rates/USD/NGN)',
41
- mimeType: 'application/json',
42
- }, async (uri, params) => {
43
- const from = (params.from || 'USD').toUpperCase();
44
- const to = (params.to || 'NGN').toUpperCase();
45
- const pair = `${from}_${to}`;
46
- const ratesResult = await safeCall(() => client.fx.rates(), 'resource_corridor_rate');
47
- const rate = ratesResult.success ? ratesResult.data[pair] || null : null;
48
- return {
49
- contents: [
50
- {
51
- uri: uri.href,
52
- mimeType: 'application/json',
53
- text: JSON.stringify({
54
- from: from,
55
- to: to,
56
- pair,
57
- rate: rate || 'N/A',
58
- note: rate ? `1 ${from} = ${rate} ${to}` : `Rate not found for ${pair}`,
59
- }, null, 2),
60
- },
61
- ],
62
- };
63
- });
64
- // ── Corridors by base currency ──────────────────────────────────
65
- server.resource('Remittance Corridors', new ResourceTemplate('moneygraph://corridors/{base}', { list: undefined }), {
66
- description: 'All international remittance corridors from a base currency with rates, fees, and limits',
67
- mimeType: 'application/json',
68
- }, async (uri, params) => {
69
- const base = (params.base || 'USD').toUpperCase();
70
- const ratesResult = await safeCall(() => client.fx.rates(), 'resource_corridors');
71
- const corridors = [];
72
- if (ratesResult.success) {
73
- for (const [pair, rate] of Object.entries(ratesResult.data)) {
74
- if (pair.startsWith(`${base}_`)) {
75
- corridors.push({
76
- pair,
77
- destination: pair.split('_')[1],
78
- rate,
79
- });
80
- }
81
- }
82
- }
83
- return {
84
- contents: [
85
- {
86
- uri: uri.href,
87
- mimeType: 'application/json',
88
- text: JSON.stringify({
89
- base_currency: base,
90
- corridor_count: corridors.length,
91
- corridors,
92
- }, null, 2),
93
- },
94
- ],
95
- };
96
- });
97
- // ── Delivery Windows ────────────────────────────────────────────
98
- server.resource('Delivery Windows', new ResourceTemplate('moneygraph://delivery-windows/{currency}', { list: undefined }), {
99
- description: 'Available delivery windows (ACH, Wire, SWIFT, SEPA, Faster Payments) for a base currency',
100
- mimeType: 'application/json',
101
- }, async (uri, params) => {
102
- const currency = (params.currency || 'USD').toUpperCase();
103
- const windows = {
104
- USD: [
105
- { method: 'ACH', speed: '1-3 business days', fee_note: 'Low fee' },
106
- { method: 'Wire', speed: 'Same day', fee_note: 'Higher fee' },
107
- { method: 'SWIFT', speed: '1-5 business days', fee_note: 'Standard international' },
108
- ],
109
- GBP: [
110
- { method: 'Faster Payments', speed: 'Instant to 2 hours', fee_note: 'Low fee' },
111
- { method: 'SWIFT', speed: '1-5 business days', fee_note: 'Standard international' },
112
- ],
113
- EUR: [
114
- { method: 'SEPA', speed: '1 business day', fee_note: 'Low fee' },
115
- { method: 'BACS', speed: '2-3 business days', fee_note: 'Low fee' },
116
- { method: 'SWIFT', speed: '1-5 business days', fee_note: 'Standard international' },
117
- ],
118
- CAD: [
119
- { method: 'SWIFT', speed: '1-5 business days', fee_note: 'Standard international' },
120
- ],
121
- };
122
- return {
123
- contents: [
124
- {
125
- uri: uri.href,
126
- mimeType: 'application/json',
127
- text: JSON.stringify({
128
- currency,
129
- delivery_windows: windows[currency] || windows['USD'],
130
- note: 'Use delivery window IDs from get_currencies for actual payout creation.',
131
- }, null, 2),
132
- },
133
- ],
134
- };
135
- });
136
- }
137
- //# sourceMappingURL=corridors.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"corridors.js","sourceRoot":"","sources":["../../src/resources/corridors.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAa,gBAAgB,EAAE,MAAM,yCAAyC,CAAC;AAEtF,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,MAAM,UAAU,yBAAyB,CAAC,MAAiB,EAAE,MAAoB;IAC/E,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;IAE1B,mEAAmE;IACnE,MAAM,CAAC,QAAQ,CACb,UAAU,EACV,IAAI,gBAAgB,CAAC,2BAA2B,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,EACtE;QACE,WAAW,EAAE,0FAA0F;QACvG,QAAQ,EAAE,kBAAkB;KAC7B,EACD,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE;QACpB,MAAM,IAAI,GAAG,CAAC,MAAM,CAAC,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