@moneygraph/mcp-server 1.1.1 → 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.
- package/README.md +74 -181
- package/bin/mcp-http.js +6 -8
- package/bin/mcp-server.js +3 -4
- package/package.json +23 -58
- package/src/config.js +50 -0
- package/src/http.js +32 -0
- package/src/index.js +20 -0
- package/src/prompts.js +80 -0
- package/src/resources.js +54 -0
- package/src/server.js +36 -0
- package/src/tools.js +250 -0
- package/dist/config.d.ts +0 -28
- package/dist/config.d.ts.map +0 -1
- package/dist/config.js +0 -52
- package/dist/config.js.map +0 -1
- package/dist/http.d.ts +0 -15
- package/dist/http.d.ts.map +0 -1
- package/dist/http.js +0 -104
- package/dist/http.js.map +0 -1
- package/dist/index.d.ts +0 -18
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -164
- package/dist/index.js.map +0 -1
- package/dist/prompts/check-rates.d.ts +0 -6
- package/dist/prompts/check-rates.d.ts.map +0 -1
- package/dist/prompts/check-rates.js +0 -29
- package/dist/prompts/check-rates.js.map +0 -1
- package/dist/prompts/crypto-deposit.d.ts +0 -6
- package/dist/prompts/crypto-deposit.d.ts.map +0 -1
- package/dist/prompts/crypto-deposit.js +0 -36
- package/dist/prompts/crypto-deposit.js.map +0 -1
- package/dist/prompts/issue-card.d.ts +0 -6
- package/dist/prompts/issue-card.d.ts.map +0 -1
- package/dist/prompts/issue-card.js +0 -33
- package/dist/prompts/issue-card.js.map +0 -1
- package/dist/prompts/onboard-customer.d.ts +0 -6
- package/dist/prompts/onboard-customer.d.ts.map +0 -1
- package/dist/prompts/onboard-customer.js +0 -31
- package/dist/prompts/onboard-customer.js.map +0 -1
- package/dist/prompts/payout-status.d.ts +0 -6
- package/dist/prompts/payout-status.d.ts.map +0 -1
- package/dist/prompts/payout-status.js +0 -29
- package/dist/prompts/payout-status.js.map +0 -1
- package/dist/prompts/send-money.d.ts +0 -6
- package/dist/prompts/send-money.d.ts.map +0 -1
- package/dist/prompts/send-money.js +0 -34
- package/dist/prompts/send-money.js.map +0 -1
- package/dist/resources/corridors.d.ts +0 -8
- package/dist/resources/corridors.d.ts.map +0 -1
- package/dist/resources/corridors.js +0 -137
- package/dist/resources/corridors.js.map +0 -1
- package/dist/resources/status.d.ts +0 -7
- package/dist/resources/status.d.ts.map +0 -1
- package/dist/resources/status.js +0 -32
- package/dist/resources/status.js.map +0 -1
- package/dist/resources/wallets.d.ts +0 -7
- package/dist/resources/wallets.d.ts.map +0 -1
- package/dist/resources/wallets.js +0 -37
- package/dist/resources/wallets.js.map +0 -1
- package/dist/tools/cards.d.ts +0 -10
- package/dist/tools/cards.d.ts.map +0 -1
- package/dist/tools/cards.js +0 -229
- package/dist/tools/cards.js.map +0 -1
- package/dist/tools/crypto.d.ts +0 -10
- package/dist/tools/crypto.d.ts.map +0 -1
- package/dist/tools/crypto.js +0 -265
- package/dist/tools/crypto.js.map +0 -1
- package/dist/tools/currencies.d.ts +0 -10
- package/dist/tools/currencies.d.ts.map +0 -1
- package/dist/tools/currencies.js +0 -137
- package/dist/tools/currencies.js.map +0 -1
- package/dist/tools/customers.d.ts +0 -7
- package/dist/tools/customers.d.ts.map +0 -1
- package/dist/tools/customers.js +0 -311
- package/dist/tools/customers.js.map +0 -1
- package/dist/tools/directors.d.ts +0 -7
- package/dist/tools/directors.d.ts.map +0 -1
- package/dist/tools/directors.js +0 -148
- package/dist/tools/directors.js.map +0 -1
- package/dist/tools/fx.d.ts +0 -10
- package/dist/tools/fx.d.ts.map +0 -1
- package/dist/tools/fx.js +0 -193
- package/dist/tools/fx.js.map +0 -1
- package/dist/tools/ledger.d.ts +0 -7
- package/dist/tools/ledger.d.ts.map +0 -1
- package/dist/tools/ledger.js +0 -101
- package/dist/tools/ledger.js.map +0 -1
- package/dist/tools/payments.d.ts +0 -7
- package/dist/tools/payments.d.ts.map +0 -1
- package/dist/tools/payments.js +0 -93
- package/dist/tools/payments.js.map +0 -1
- package/dist/tools/payouts.d.ts +0 -10
- package/dist/tools/payouts.d.ts.map +0 -1
- package/dist/tools/payouts.js +0 -352
- package/dist/tools/payouts.js.map +0 -1
- package/dist/tools/recipients.d.ts +0 -7
- package/dist/tools/recipients.d.ts.map +0 -1
- package/dist/tools/recipients.js +0 -150
- package/dist/tools/recipients.js.map +0 -1
- package/dist/tools/recurring.d.ts +0 -7
- package/dist/tools/recurring.d.ts.map +0 -1
- package/dist/tools/recurring.js +0 -94
- package/dist/tools/recurring.js.map +0 -1
- package/dist/tools/reference.d.ts +0 -7
- package/dist/tools/reference.d.ts.map +0 -1
- package/dist/tools/reference.js +0 -83
- package/dist/tools/reference.js.map +0 -1
- package/dist/tools/transactions.d.ts +0 -7
- package/dist/tools/transactions.d.ts.map +0 -1
- package/dist/tools/transactions.js +0 -88
- package/dist/tools/transactions.js.map +0 -1
- package/dist/tools/wallets.d.ts +0 -7
- package/dist/tools/wallets.d.ts.map +0 -1
- package/dist/tools/wallets.js +0 -129
- package/dist/tools/wallets.js.map +0 -1
- package/scripts/patch-sdk.mjs +0 -32
package/src/server.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// Builds the McpServer instance. Transport-agnostic.
|
|
2
|
+
|
|
3
|
+
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
4
|
+
import { loadConfig, MCP_VERSION } from './config.js';
|
|
5
|
+
import { registerTools } from './tools.js';
|
|
6
|
+
import { registerResources } from './resources.js';
|
|
7
|
+
import { registerPrompts } from './prompts.js';
|
|
8
|
+
|
|
9
|
+
const INSTRUCTIONS = `MoneyGraph MCP server — cross-border payments, cards, invoicing, crypto.
|
|
10
|
+
|
|
11
|
+
API: https://app.moneygraph.ai/api/v1 (one base URL; the key ID decides test vs live).
|
|
12
|
+
Full docs: https://app.moneygraph.ai/docs/guide/introduction
|
|
13
|
+
|
|
14
|
+
Key facts an agent should know:
|
|
15
|
+
- Amounts are plain numbers in the source currency (NOT minor units × 100).
|
|
16
|
+
- Payouts are two-step: mg_create_quote → mg_fund_quote. Quotes expire in 10 minutes.
|
|
17
|
+
- Dates are DD-MM-YYYY (e.g. "15-06-1990") in customer bodies.
|
|
18
|
+
- IDs: customer account_id is an opaque string. Everything else (wallet_id, rail_id, counterparty_id, quote_id, file_id) is a UUID.
|
|
19
|
+
- To find a rail or wallet, call mg_list_assets first.
|
|
20
|
+
- Errors come back with {ok:false, code, http_status, field_errors}. Branch on code, not message.
|
|
21
|
+
- Test mode has simulators: mg_test_approve_kyc, mg_test_payout_success, etc.
|
|
22
|
+
- Any endpoint the dedicated tools don't cover can be reached via mg_request.
|
|
23
|
+
|
|
24
|
+
Recommended flows: use the send_money, onboard_customer, check_corridor, track_payout, issue_card, and collect_payment prompts.`;
|
|
25
|
+
|
|
26
|
+
export function buildServer() {
|
|
27
|
+
const { client, keyId } = loadConfig();
|
|
28
|
+
const server = new McpServer(
|
|
29
|
+
{ name: '@moneygraph/mcp-server', version: MCP_VERSION },
|
|
30
|
+
{ instructions: INSTRUCTIONS, capabilities: { tools: {}, resources: {}, prompts: {} } },
|
|
31
|
+
);
|
|
32
|
+
registerTools(server, client);
|
|
33
|
+
registerResources(server, client);
|
|
34
|
+
registerPrompts(server);
|
|
35
|
+
return { server, client, keyId };
|
|
36
|
+
}
|
package/src/tools.js
ADDED
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
// Tool registrations for the MoneyGraph MCP server.
|
|
2
|
+
// Every tool forwards to one SDK method; the SDK handles HMAC signing + idempotency.
|
|
3
|
+
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
import { safeCall, toMcpResult } from './config.js';
|
|
6
|
+
|
|
7
|
+
const Pagination = {
|
|
8
|
+
page: z.union([z.number().int().positive(), z.literal('all')]).optional().describe('Page number or "all" for everything'),
|
|
9
|
+
limit: z.number().int().min(1).max(100).optional().describe('Items per page (1-100, default 20)'),
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
function wrap(client, fn) {
|
|
13
|
+
return async (args) => toMcpResult(await safeCall(() => fn(client, args)));
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export function registerTools(server, client) {
|
|
17
|
+
const T = (name, description, schema, fn) =>
|
|
18
|
+
server.registerTool(name, { description, inputSchema: schema }, wrap(client, fn));
|
|
19
|
+
|
|
20
|
+
// ── Lookups ────────────────────────────────────────────────────────────
|
|
21
|
+
T('mg_list_countries',
|
|
22
|
+
'List supported customer onboarding countries with ISO2 codes and per-account-type support flags.',
|
|
23
|
+
{ ...Pagination },
|
|
24
|
+
(c, a) => c.listCountries(a));
|
|
25
|
+
|
|
26
|
+
T('mg_list_assets',
|
|
27
|
+
'List the merchant account\'s wallets with balances and per-asset payout rails, fees, limits, and settings. ' +
|
|
28
|
+
'Use this to find the swap/payout rail IDs you need for mg_create_quote.',
|
|
29
|
+
{},
|
|
30
|
+
(c) => c.listAssets());
|
|
31
|
+
|
|
32
|
+
T('mg_list_mccs',
|
|
33
|
+
'List merchant category codes (MCCs) with UUIDs needed for business KYC.',
|
|
34
|
+
{ ...Pagination },
|
|
35
|
+
(c, a) => c.listMccs(a));
|
|
36
|
+
|
|
37
|
+
T('mg_list_source_of_funds',
|
|
38
|
+
'List acceptable "source of funds" UUIDs for personal customer creation.',
|
|
39
|
+
{},
|
|
40
|
+
(c) => c.listSourceOfFunds());
|
|
41
|
+
|
|
42
|
+
T('mg_list_business_registration_types',
|
|
43
|
+
'List business registration types (LLC, corporation, sole prop, etc.) with UUIDs and whether directors are required.',
|
|
44
|
+
{},
|
|
45
|
+
(c) => c.listBusinessRegistrationTypes());
|
|
46
|
+
|
|
47
|
+
T('mg_list_transfer_purposes',
|
|
48
|
+
'List valid transfer purpose codes for mg_fund_quote, and any documents required per currency.',
|
|
49
|
+
{},
|
|
50
|
+
(c) => c.listTransferPurposes());
|
|
51
|
+
|
|
52
|
+
// ── Customers ─────────────────────────────────────────────────────────
|
|
53
|
+
T('mg_create_customer',
|
|
54
|
+
'Create a personal or business customer. Pass account_type="personal" or "business". ' +
|
|
55
|
+
'For personal, include source_of_fund_id (from mg_list_source_of_funds). For business, include business_details with directors[].',
|
|
56
|
+
{ body: z.record(z.any()).describe('Full customer body — see /docs/guide/onboarding') },
|
|
57
|
+
(c, a) => c.createCustomer(a.body));
|
|
58
|
+
|
|
59
|
+
T('mg_list_customers',
|
|
60
|
+
'List customers created under this account, newest first.',
|
|
61
|
+
{ day: z.string().optional().describe('YYYY-MM-DD filter'), ...Pagination },
|
|
62
|
+
(c, a) => c.listCustomers(a));
|
|
63
|
+
|
|
64
|
+
T('mg_get_customer',
|
|
65
|
+
'Retrieve a customer by account_id. The account_id may also be an MCP key.',
|
|
66
|
+
{ account_id: z.string() },
|
|
67
|
+
(c, a) => c.getCustomer(a.account_id));
|
|
68
|
+
|
|
69
|
+
T('mg_get_customer_assets',
|
|
70
|
+
'List a customer\'s fiat and crypto wallets with balances.',
|
|
71
|
+
{ account_id: z.string() },
|
|
72
|
+
(c, a) => c.getCustomerAssets(a.account_id));
|
|
73
|
+
|
|
74
|
+
T('mg_generate_kyc_link',
|
|
75
|
+
'Generate a hosted KYC link for a customer to complete verification themselves.',
|
|
76
|
+
{ account_id: z.string(), theme: z.enum(['light','dark']).optional(), logo: z.string().url().optional() },
|
|
77
|
+
(c, a) => c.generateKycLink(a.account_id, { theme: a.theme, logo: a.logo }));
|
|
78
|
+
|
|
79
|
+
T('mg_submit_kyc',
|
|
80
|
+
'Submit KYC documents directly (base64 data URIs). For personal: doc_type, doc_number, issue_date (d-m-Y), doc_front, selfie. ' +
|
|
81
|
+
'For business: add a business_details object with registration_type_id, mcc_id, directors[], proof_of_registration, proof_of_address.',
|
|
82
|
+
{ body: z.record(z.any()) },
|
|
83
|
+
(c, a) => c.submitKyc(a.body));
|
|
84
|
+
|
|
85
|
+
// ── Counterparties (saved payout recipients) ──────────────────────────
|
|
86
|
+
T('mg_create_counterparty',
|
|
87
|
+
'Save a payout recipient (bank, mobile money, crypto). Required: account_id, rail_id (from mg_list_assets), country, entity_type, plus rail-specific fields.',
|
|
88
|
+
{ body: z.record(z.any()) },
|
|
89
|
+
(c, a) => c.createCounterparty(a.body));
|
|
90
|
+
|
|
91
|
+
T('mg_list_counterparties',
|
|
92
|
+
'List a customer\'s saved payout recipients.',
|
|
93
|
+
{ account_id: z.string(), ...Pagination },
|
|
94
|
+
(c, a) => { const { account_id, ...q } = a; return c.listCounterparties(account_id, q); });
|
|
95
|
+
|
|
96
|
+
T('mg_get_counterparty',
|
|
97
|
+
'Retrieve one saved payout recipient.',
|
|
98
|
+
{ account_id: z.string(), counterparty_id: z.string().uuid() },
|
|
99
|
+
(c, a) => c.getCounterparty(a.account_id, a.counterparty_id));
|
|
100
|
+
|
|
101
|
+
T('mg_delete_counterparty',
|
|
102
|
+
'Delete a saved payout recipient.',
|
|
103
|
+
{ counterparty_id: z.string().uuid() },
|
|
104
|
+
(c, a) => c.deleteCounterparty(a.counterparty_id));
|
|
105
|
+
|
|
106
|
+
// ── Files ─────────────────────────────────────────────────────────────
|
|
107
|
+
T('mg_create_file',
|
|
108
|
+
'Upload a file (base64 data URI) for attaching to a payout/quote funding step.',
|
|
109
|
+
{
|
|
110
|
+
account_id: z.string(),
|
|
111
|
+
type: z.string().describe('e.g. "invoice", "purchase_order"'),
|
|
112
|
+
file: z.string().describe('base64 data URI, e.g. "data:application/pdf;base64,JVBERi0..."'),
|
|
113
|
+
},
|
|
114
|
+
(c, a) => c.createFile(a));
|
|
115
|
+
|
|
116
|
+
T('mg_list_files', 'List uploaded files.', { ...Pagination }, (c, a) => c.listFiles(a));
|
|
117
|
+
T('mg_get_file', 'Retrieve a file with its download URL.', { file_id: z.string().uuid() }, (c, a) => c.getFile(a.file_id));
|
|
118
|
+
|
|
119
|
+
// ── Quotes & payouts ──────────────────────────────────────────────────
|
|
120
|
+
T('mg_create_quote',
|
|
121
|
+
'Create a payout or swap quote. Quotes expire after 10 minutes. ' +
|
|
122
|
+
'Types: ' +
|
|
123
|
+
' "swap" — {rail_id, amount}, converts one asset to another in the merchant account. ' +
|
|
124
|
+
' "fiat_payout" — {counterparty_id, asset_id (source), amount}. ' +
|
|
125
|
+
' "crypto_payout" — {asset_id (source crypto), wallet_address, amount}. ' +
|
|
126
|
+
'amount is a plain number in the source currency (NOT minor units). Returns quote.id + fees + rate.',
|
|
127
|
+
{ body: z.record(z.any()) },
|
|
128
|
+
(c, a) => c.createQuote(a.body));
|
|
129
|
+
|
|
130
|
+
T('mg_fund_quote',
|
|
131
|
+
'Fund a previously created quote. This is the irreversible step — it debits the source wallet and starts the payout/swap. ' +
|
|
132
|
+
'Required: quote_id, external_id (your idempotency ref). Optional: transfer_purpose (code from mg_list_transfer_purposes), files (array of file IDs).',
|
|
133
|
+
{
|
|
134
|
+
quote_id: z.string().uuid(),
|
|
135
|
+
external_id: z.string().max(80).describe('Your own idempotency reference — unique per quote'),
|
|
136
|
+
transfer_purpose: z.string().optional(),
|
|
137
|
+
files: z.array(z.string().uuid()).optional(),
|
|
138
|
+
},
|
|
139
|
+
(c, a) => c.fundQuote(a));
|
|
140
|
+
|
|
141
|
+
T('mg_list_quotes', 'List quotes (funded and unfunded).', { ...Pagination }, (c, a) => c.listQuotes(a));
|
|
142
|
+
T('mg_get_quote', 'Retrieve one quote by ID.', { quote_id: z.string().uuid() }, (c, a) => c.getQuote(a.quote_id));
|
|
143
|
+
|
|
144
|
+
// ── Transfers ─────────────────────────────────────────────────────────
|
|
145
|
+
T('mg_transfer_asset',
|
|
146
|
+
'Transfer a same-asset amount between two wallets (no FX, no fee). Useful for moving funds between the merchant account and a customer wallet.',
|
|
147
|
+
{
|
|
148
|
+
source_wallet_id: z.string().uuid(),
|
|
149
|
+
destination_wallet_id: z.string().uuid(),
|
|
150
|
+
asset_type: z.enum(['fiat','crypto']),
|
|
151
|
+
amount: z.number().positive(),
|
|
152
|
+
external_id: z.string().max(80),
|
|
153
|
+
},
|
|
154
|
+
(c, a) => c.transferAsset(a));
|
|
155
|
+
|
|
156
|
+
// ── Transactions ──────────────────────────────────────────────────────
|
|
157
|
+
T('mg_list_transactions', 'List transactions (debits and credits).', { ...Pagination }, (c, a) => c.listTransactions(a));
|
|
158
|
+
T('mg_get_transaction', 'Retrieve one transaction by reference.', { reference: z.string() }, (c, a) => c.getTransaction(a.reference));
|
|
159
|
+
|
|
160
|
+
// ── Virtual accounts (fiat deposit) ───────────────────────────────────
|
|
161
|
+
T('mg_create_virtual_account',
|
|
162
|
+
'Create a virtual bank account on a customer wallet so they can receive fiat deposits.',
|
|
163
|
+
{ account_id: z.string(), wallet_id: z.string().uuid() },
|
|
164
|
+
(c, a) => c.createVirtualAccount(a));
|
|
165
|
+
T('mg_list_virtual_accounts', 'List a customer\'s virtual accounts.', { account_id: z.string() }, (c, a) => c.listVirtualAccounts(a.account_id));
|
|
166
|
+
T('mg_get_virtual_account', 'Retrieve one virtual account.', { account_id: z.string(), virtual_account_id: z.string().uuid() }, (c, a) => c.getVirtualAccount(a.account_id, a.virtual_account_id));
|
|
167
|
+
|
|
168
|
+
// ── Crypto deposit wallets ────────────────────────────────────────────
|
|
169
|
+
T('mg_create_crypto_wallet',
|
|
170
|
+
'Create a crypto deposit wallet on a customer wallet so they can receive on-chain deposits.',
|
|
171
|
+
{ account_id: z.string(), wallet_id: z.string().uuid() },
|
|
172
|
+
(c, a) => c.createCryptoWallet(a));
|
|
173
|
+
T('mg_list_crypto_wallets', 'List a customer\'s crypto deposit wallets.', { account_id: z.string() }, (c, a) => c.listCryptoWallets(a.account_id));
|
|
174
|
+
T('mg_get_crypto_wallet', 'Retrieve one crypto deposit wallet.', { account_id: z.string(), crypto_wallet_id: z.string().uuid() }, (c, a) => c.getCryptoWallet(a.account_id, a.crypto_wallet_id));
|
|
175
|
+
|
|
176
|
+
// ── Cards ─────────────────────────────────────────────────────────────
|
|
177
|
+
T('mg_create_cardholder',
|
|
178
|
+
'Create a cardholder record for a customer. Cardholder must be approved before a card can be issued; in test mode call mg_test_approve_cardholder.',
|
|
179
|
+
{ account_id: z.string() },
|
|
180
|
+
(c, a) => c.createCardholder(a));
|
|
181
|
+
T('mg_create_card',
|
|
182
|
+
'Issue a USD virtual card to an approved cardholder. Details arrive asynchronously via the card_issued webhook.',
|
|
183
|
+
{ account_id: z.string() },
|
|
184
|
+
(c, a) => c.createCard(a));
|
|
185
|
+
T('mg_list_cards', 'List a customer\'s cards.', { account_id: z.string(), ...Pagination }, (c, a) => { const { account_id, ...q } = a; return c.listCards(account_id, q); });
|
|
186
|
+
T('mg_get_card', 'Retrieve one card.', { account_id: z.string(), card_id: z.string().uuid() }, (c, a) => c.getCard(a.account_id, a.card_id));
|
|
187
|
+
T('mg_fund_card', 'Move funds from a customer wallet onto a card.',
|
|
188
|
+
{ account_id: z.string(), card_id: z.string().uuid(), amount: z.number().positive(), external_id: z.string().max(80) },
|
|
189
|
+
(c, a) => c.fundCard(a));
|
|
190
|
+
T('mg_withdraw_card', 'Move funds from a card back to a customer wallet.',
|
|
191
|
+
{ account_id: z.string(), card_id: z.string().uuid(), amount: z.number().positive(), external_id: z.string().max(80) },
|
|
192
|
+
(c, a) => c.withdrawCard(a));
|
|
193
|
+
T('mg_activate_card', 'Unfreeze a previously deactivated card.', { account_id: z.string(), card_id: z.string().uuid() }, (c, a) => c.activateCard(a));
|
|
194
|
+
T('mg_deactivate_card', 'Freeze a card.', { account_id: z.string(), card_id: z.string().uuid() }, (c, a) => c.deactivateCard(a));
|
|
195
|
+
T('mg_fetch_card_balance', 'Fetch a card\'s balance from the issuer.', { account_id: z.string(), card_id: z.string().uuid() }, (c, a) => c.fetchCardBalance(a));
|
|
196
|
+
|
|
197
|
+
// ── Payment collection ────────────────────────────────────────────────
|
|
198
|
+
T('mg_create_payment_session',
|
|
199
|
+
'Create a hosted/embeddable payment session for collecting a payment from an end-user.',
|
|
200
|
+
{ body: z.record(z.any()) },
|
|
201
|
+
(c, a) => c.createPaymentSession(a.body));
|
|
202
|
+
T('mg_verify_payment', 'Check the status of a payment by external_reference.',
|
|
203
|
+
{ external_reference: z.string() }, (c, a) => c.verifyPayment(a.external_reference));
|
|
204
|
+
|
|
205
|
+
// ── Invoices ──────────────────────────────────────────────────────────
|
|
206
|
+
T('mg_create_invoice', 'Create an invoice to send to a saved invoice recipient.', { body: z.record(z.any()) }, (c, a) => c.createInvoice(a.body));
|
|
207
|
+
T('mg_list_invoices', 'List invoices. Filter by currency if desired.',
|
|
208
|
+
{ currency: z.string().length(3).optional(), ...Pagination }, (c, a) => c.listInvoices(a));
|
|
209
|
+
T('mg_get_invoice', 'Retrieve one invoice.', { invoice_id: z.string().uuid() }, (c, a) => c.getInvoice(a.invoice_id));
|
|
210
|
+
T('mg_create_invoice_recipient', 'Create an invoice recipient (customer who gets billed).', { body: z.record(z.any()) }, (c, a) => c.createInvoiceRecipient(a.body));
|
|
211
|
+
T('mg_list_invoice_recipients', 'List invoice recipients.',
|
|
212
|
+
{ currency: z.string().length(3).optional(), ...Pagination }, (c, a) => c.listInvoiceRecipients(a));
|
|
213
|
+
|
|
214
|
+
// ── Test-mode simulators (test keys only) ─────────────────────────────
|
|
215
|
+
T('mg_test_approve_kyc',
|
|
216
|
+
'TEST MODE ONLY — approve a customer\'s KYC instantly. Returns 403 test_mode_only on live keys.',
|
|
217
|
+
{ account_id: z.string() }, (c, a) => c.testApproveKyc(a.account_id));
|
|
218
|
+
T('mg_test_approve_cardholder', 'TEST MODE ONLY — approve a cardholder.',
|
|
219
|
+
{ account_id: z.string() }, (c, a) => c.testApproveCardholder(a.account_id));
|
|
220
|
+
T('mg_test_approve_virtual_account_holder', 'TEST MODE ONLY — approve virtual account holder.',
|
|
221
|
+
{ account_id: z.string() }, (c, a) => c.testApproveVirtualAccountHolder(a.account_id));
|
|
222
|
+
T('mg_test_payout_success', 'TEST MODE ONLY — complete a pending payout.',
|
|
223
|
+
{ reference: z.string() }, (c, a) => c.testPayoutSuccess(a.reference));
|
|
224
|
+
T('mg_test_payout_decline', 'TEST MODE ONLY — decline a pending payout.',
|
|
225
|
+
{ reference: z.string() }, (c, a) => c.testPayoutDecline(a.reference));
|
|
226
|
+
T('mg_test_swap_success', 'TEST MODE ONLY — complete a pending swap.',
|
|
227
|
+
{ reference: z.string() }, (c, a) => c.testSwapSuccess(a.reference));
|
|
228
|
+
T('mg_test_swap_decline', 'TEST MODE ONLY — decline a pending swap.',
|
|
229
|
+
{ reference: z.string() }, (c, a) => c.testSwapDecline(a.reference));
|
|
230
|
+
T('mg_test_virtual_account', 'TEST MODE ONLY — simulate an inbound virtual-account deposit.',
|
|
231
|
+
{ account_id: z.string(), virtual_account_id: z.string().uuid() }, (c, a) => c.testVirtualAccount(a));
|
|
232
|
+
T('mg_test_crypto_wallet', 'TEST MODE ONLY — simulate an inbound crypto deposit.',
|
|
233
|
+
{ account_id: z.string(), crypto_account_id: z.string().uuid() }, (c, a) => c.testCryptoWallet(a));
|
|
234
|
+
T('mg_test_online_card_transaction', 'TEST MODE ONLY — simulate an online card purchase.',
|
|
235
|
+
{ account_id: z.string(), virtual_card_id: z.string().uuid() }, (c, a) => c.testOnlineCardTransaction(a));
|
|
236
|
+
|
|
237
|
+
// ── Escape hatch ──────────────────────────────────────────────────────
|
|
238
|
+
T('mg_request',
|
|
239
|
+
'Raw request to any MoneyGraph endpoint the dedicated tools don\'t cover. ' +
|
|
240
|
+
'See https://app.moneygraph.ai/docs/guide/introduction for the full list. ' +
|
|
241
|
+
'path is the URL part after /api/v1 (e.g. "/invoice/headers/create"). ' +
|
|
242
|
+
'The SDK handles HMAC signing + idempotency automatically.',
|
|
243
|
+
{
|
|
244
|
+
method: z.enum(['GET','POST','PUT','PATCH','DELETE']),
|
|
245
|
+
path: z.string().regex(/^\//, 'path must start with /'),
|
|
246
|
+
body: z.record(z.any()).optional(),
|
|
247
|
+
query: z.record(z.any()).optional(),
|
|
248
|
+
},
|
|
249
|
+
(c, a) => c.request(a.method, a.path, { body: a.body, query: a.query }));
|
|
250
|
+
}
|
package/dist/config.d.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* MoneyGraph MCP Server — Configuration
|
|
3
|
-
*/
|
|
4
|
-
export type ServerMode = 'sandbox' | 'production';
|
|
5
|
-
export interface ServerConfig {
|
|
6
|
-
mode: ServerMode;
|
|
7
|
-
apiKey: string;
|
|
8
|
-
client: any;
|
|
9
|
-
}
|
|
10
|
-
export declare function loadConfig(): ServerConfig;
|
|
11
|
-
/** Format minor units to human-readable */
|
|
12
|
-
export declare function formatAmount(minorUnits: number, currency?: string): string;
|
|
13
|
-
/** Build _next_steps hint */
|
|
14
|
-
export declare function nextSteps(...steps: string[]): string;
|
|
15
|
-
/** Result type for safeCall */
|
|
16
|
-
export type SafeResult<T> = {
|
|
17
|
-
success: true;
|
|
18
|
-
data: T;
|
|
19
|
-
error?: undefined;
|
|
20
|
-
} | {
|
|
21
|
-
success: false;
|
|
22
|
-
error: string;
|
|
23
|
-
context: string;
|
|
24
|
-
data?: undefined;
|
|
25
|
-
};
|
|
26
|
-
/** Wrap an SDK call with error handling */
|
|
27
|
-
export declare function safeCall<T = any>(fn: () => Promise<T>, context: string): Promise<SafeResult<T>>;
|
|
28
|
-
//# sourceMappingURL=config.d.ts.map
|
package/dist/config.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;GAEG;AAOH,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,YAAY,CAAC;AAElD,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,UAAU,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,GAAG,CAAC;CACb;AAQD,wBAAgB,UAAU,IAAI,YAAY,CAYzC;AAED,2CAA2C;AAC3C,wBAAgB,YAAY,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,GAAE,MAAc,GAAG,MAAM,CAEjF;AAED,6BAA6B;AAC7B,wBAAgB,SAAS,CAAC,GAAG,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,CAEpD;AAED,+BAA+B;AAC/B,MAAM,MAAM,UAAU,CAAC,CAAC,IACpB;IAAE,OAAO,EAAE,IAAI,CAAC;IAAC,IAAI,EAAE,CAAC,CAAC;IAAC,KAAK,CAAC,EAAE,SAAS,CAAA;CAAE,GAC7C;IAAE,OAAO,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,SAAS,CAAA;CAAE,CAAC;AAEzE,2CAA2C;AAC3C,wBAAsB,QAAQ,CAAC,CAAC,GAAG,GAAG,EACpC,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EACpB,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAexB"}
|
package/dist/config.js
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* MoneyGraph MCP Server — Configuration
|
|
3
|
-
*/
|
|
4
|
-
// @ts-ignore - SDK uses default export that TypeScript doesn't resolve cleanly
|
|
5
|
-
import MoneyGraphModule from '@moneygraph/sdk';
|
|
6
|
-
// Handle ESM/CJS interop — SDK v3 exports MoneyGraphClient as default
|
|
7
|
-
const MoneyGraph = MoneyGraphModule.default || MoneyGraphModule;
|
|
8
|
-
function resolveMode(apiKey) {
|
|
9
|
-
if (!apiKey)
|
|
10
|
-
return 'sandbox';
|
|
11
|
-
if (apiKey.startsWith('sk_live_'))
|
|
12
|
-
return 'production';
|
|
13
|
-
return 'sandbox';
|
|
14
|
-
}
|
|
15
|
-
export function loadConfig() {
|
|
16
|
-
const apiKey = process.env.MONEYGRAPH_API_KEY || 'sk_test_mcp_sandbox_default';
|
|
17
|
-
const mode = resolveMode(process.env.MONEYGRAPH_API_KEY);
|
|
18
|
-
// @ts-ignore - constructor works at runtime
|
|
19
|
-
// SDK v3: requires secretKey (was apiKey in v2)
|
|
20
|
-
const client = new MoneyGraph({
|
|
21
|
-
secretKey: apiKey,
|
|
22
|
-
mode: mode === 'production' ? 'live' : 'test',
|
|
23
|
-
});
|
|
24
|
-
return { mode, apiKey, client };
|
|
25
|
-
}
|
|
26
|
-
/** Format minor units to human-readable */
|
|
27
|
-
export function formatAmount(minorUnits, currency = 'USD') {
|
|
28
|
-
return `${currency} ${(minorUnits / 100).toFixed(2)}`;
|
|
29
|
-
}
|
|
30
|
-
/** Build _next_steps hint */
|
|
31
|
-
export function nextSteps(...steps) {
|
|
32
|
-
return steps.join(' → ');
|
|
33
|
-
}
|
|
34
|
-
/** Wrap an SDK call with error handling */
|
|
35
|
-
export async function safeCall(fn, context) {
|
|
36
|
-
try {
|
|
37
|
-
const data = await fn();
|
|
38
|
-
return { success: true, data };
|
|
39
|
-
}
|
|
40
|
-
catch (err) {
|
|
41
|
-
const message = err instanceof Error ? err.message : String(err);
|
|
42
|
-
if (message.includes('429') || message.toLowerCase().includes('rate limit')) {
|
|
43
|
-
return {
|
|
44
|
-
success: false,
|
|
45
|
-
error: 'Rate limited. MoneyGraph allows 30 API calls per minute. Please wait and retry.',
|
|
46
|
-
context,
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
return { success: false, error: message, context };
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
//# sourceMappingURL=config.js.map
|
package/dist/config.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,+EAA+E;AAC/E,OAAO,gBAAgB,MAAM,iBAAiB,CAAC;AAC/C,sEAAsE;AACtE,MAAM,UAAU,GAAI,gBAAwB,CAAC,OAAO,IAAI,gBAAgB,CAAC;AAUzE,SAAS,WAAW,CAAC,MAA0B;IAC7C,IAAI,CAAC,MAAM;QAAE,OAAO,SAAS,CAAC;IAC9B,IAAI,MAAM,CAAC,UAAU,CAAC,UAAU,CAAC;QAAE,OAAO,YAAY,CAAC;IACvD,OAAO,SAAS,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EAAE,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC;YAC5E,OAAO;gBACL,OAAO,EAAE,KAAK;gBACd,KAAK,EAAE,iFAAiF;gBACxF,OAAO;aACR,CAAC;QACJ,CAAC;QACD,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC;IACrD,CAAC;AACH,CAAC"}
|
package/dist/http.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* MoneyGraph MCP Server — HTTP Transport
|
|
3
|
-
*
|
|
4
|
-
* Runs the MCP server over HTTP using StreamableHTTPServerTransport.
|
|
5
|
-
* Supports SSE streaming for server-to-client messages.
|
|
6
|
-
*
|
|
7
|
-
* Routes:
|
|
8
|
-
* POST /mcp — Handle MCP JSON-RPC messages
|
|
9
|
-
* GET /mcp — SSE stream for server-to-client notifications
|
|
10
|
-
* DELETE /mcp — Close session
|
|
11
|
-
* GET /health — Health check (for Railway, load balancers)
|
|
12
|
-
*/
|
|
13
|
-
import type { ServerConfig } from './config.js';
|
|
14
|
-
export declare function startHTTPServer(config: ServerConfig): Promise<void>;
|
|
15
|
-
//# sourceMappingURL=http.d.ts.map
|
package/dist/http.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../src/http.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAKH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AA4BhD,wBAAsB,eAAe,CAAC,MAAM,EAAE,YAAY,iBAyEzD"}
|
package/dist/http.js
DELETED
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* MoneyGraph MCP Server — HTTP Transport
|
|
3
|
-
*
|
|
4
|
-
* Runs the MCP server over HTTP using StreamableHTTPServerTransport.
|
|
5
|
-
* Supports SSE streaming for server-to-client messages.
|
|
6
|
-
*
|
|
7
|
-
* Routes:
|
|
8
|
-
* POST /mcp — Handle MCP JSON-RPC messages
|
|
9
|
-
* GET /mcp — SSE stream for server-to-client notifications
|
|
10
|
-
* DELETE /mcp — Close session
|
|
11
|
-
* GET /health — Health check (for Railway, load balancers)
|
|
12
|
-
*/
|
|
13
|
-
import { createServer as createHTTPServer } from 'node:http';
|
|
14
|
-
import { StreamableHTTPServerTransport } from '@modelcontextprotocol/sdk/server/streamableHttp.js';
|
|
15
|
-
import { createServer } from './index.js';
|
|
16
|
-
const ALLOWED_ORIGINS = [
|
|
17
|
-
'http://localhost:5173', // Vite dev server
|
|
18
|
-
'http://localhost:8888', // Netlify dev
|
|
19
|
-
'https://moneygraph.netlify.app',
|
|
20
|
-
];
|
|
21
|
-
function setCORSHeaders(req, res) {
|
|
22
|
-
const origin = req.headers.origin || '';
|
|
23
|
-
// Allow configured origins, or any origin in development
|
|
24
|
-
if (ALLOWED_ORIGINS.includes(origin) || process.env.CORS_ALLOW_ALL === 'true') {
|
|
25
|
-
res.setHeader('Access-Control-Allow-Origin', origin);
|
|
26
|
-
}
|
|
27
|
-
res.setHeader('Access-Control-Allow-Methods', 'GET, POST, DELETE, OPTIONS');
|
|
28
|
-
res.setHeader('Access-Control-Allow-Headers', 'Content-Type, mcp-session-id');
|
|
29
|
-
res.setHeader('Access-Control-Expose-Headers', 'mcp-session-id');
|
|
30
|
-
}
|
|
31
|
-
function readBody(req) {
|
|
32
|
-
return new Promise((resolve, reject) => {
|
|
33
|
-
const chunks = [];
|
|
34
|
-
req.on('data', (chunk) => chunks.push(chunk));
|
|
35
|
-
req.on('end', () => resolve(Buffer.concat(chunks).toString()));
|
|
36
|
-
req.on('error', reject);
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
export async function startHTTPServer(config) {
|
|
40
|
-
const port = parseInt(process.env.PORT || '3001', 10);
|
|
41
|
-
const httpServer = createHTTPServer(async (req, res) => {
|
|
42
|
-
setCORSHeaders(req, res);
|
|
43
|
-
// Handle CORS preflight
|
|
44
|
-
if (req.method === 'OPTIONS') {
|
|
45
|
-
res.writeHead(204);
|
|
46
|
-
res.end();
|
|
47
|
-
return;
|
|
48
|
-
}
|
|
49
|
-
const url = new URL(req.url || '/', `http://${req.headers.host || 'localhost'}`);
|
|
50
|
-
// ── Health check ────────────────────────────────────────
|
|
51
|
-
if (url.pathname === '/health') {
|
|
52
|
-
res.writeHead(200, { 'Content-Type': 'application/json' });
|
|
53
|
-
res.end(JSON.stringify({
|
|
54
|
-
status: 'ok',
|
|
55
|
-
server: '@moneygraph/mcp-server',
|
|
56
|
-
version: '1.1.1',
|
|
57
|
-
mode: config.mode,
|
|
58
|
-
transport: 'http',
|
|
59
|
-
tools: 78,
|
|
60
|
-
resources: 6,
|
|
61
|
-
prompts: 6,
|
|
62
|
-
}));
|
|
63
|
-
return;
|
|
64
|
-
}
|
|
65
|
-
// ── MCP endpoint ────────────────────────────────────────
|
|
66
|
-
if (url.pathname === '/mcp') {
|
|
67
|
-
// Create a new server + transport per request (stateless mode)
|
|
68
|
-
const server = createServer(config);
|
|
69
|
-
const transport = new StreamableHTTPServerTransport({
|
|
70
|
-
sessionIdGenerator: undefined, // Stateless
|
|
71
|
-
});
|
|
72
|
-
// Connect MCP server to transport
|
|
73
|
-
await server.connect(transport);
|
|
74
|
-
// Parse body for POST requests
|
|
75
|
-
if (req.method === 'POST') {
|
|
76
|
-
const body = await readBody(req);
|
|
77
|
-
let parsed;
|
|
78
|
-
try {
|
|
79
|
-
parsed = JSON.parse(body);
|
|
80
|
-
}
|
|
81
|
-
catch {
|
|
82
|
-
res.writeHead(400, { 'Content-Type': 'application/json' });
|
|
83
|
-
res.end(JSON.stringify({ error: 'Invalid JSON' }));
|
|
84
|
-
return;
|
|
85
|
-
}
|
|
86
|
-
await transport.handleRequest(req, res, parsed);
|
|
87
|
-
}
|
|
88
|
-
else {
|
|
89
|
-
// GET (SSE) or DELETE
|
|
90
|
-
await transport.handleRequest(req, res);
|
|
91
|
-
}
|
|
92
|
-
return;
|
|
93
|
-
}
|
|
94
|
-
// ── 404 for everything else ─────────────────────────────
|
|
95
|
-
res.writeHead(404, { 'Content-Type': 'application/json' });
|
|
96
|
-
res.end(JSON.stringify({ error: 'Not found', endpoints: ['/mcp', '/health'] }));
|
|
97
|
-
});
|
|
98
|
-
httpServer.listen(port, () => {
|
|
99
|
-
console.error(`MoneyGraph MCP Server v1.1.1 — ${config.mode} mode — HTTP transport on port ${port} — 78 tools, 6 resources, 6 prompts`);
|
|
100
|
-
console.error(` MCP endpoint: http://localhost:${port}/mcp`);
|
|
101
|
-
console.error(` Health check: http://localhost:${port}/health`);
|
|
102
|
-
});
|
|
103
|
-
}
|
|
104
|
-
//# sourceMappingURL=http.js.map
|
package/dist/http.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"http.js","sourceRoot":"","sources":["../src/http.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,YAAY,IAAI,gBAAgB,EAA6C,MAAM,WAAW,CAAC;AACxG,OAAO,EAAE,6BAA6B,EAAE,MAAM,oDAAoD,CAAC;AACnG,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAG1C,MAAM,eAAe,GAAG;IACtB,uBAAuB,EAAI,kBAAkB;IAC7C,uBAAuB,EAAI,cAAc;IACzC,gCAAgC;CACjC,CAAC;AAEF,SAAS,cAAc,CAAC,GAAoB,EAAE,GAAmB;IAC/D,MAAM,MAAM,GAAG,GAAG,CAAC,OAAO,CAAC,MAAM,IAAI,EAAE,CAAC;IACxC,yDAAyD;IACzD,IAAI,eAAe,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,OAAO,CAAC,GAAG,CAAC,cAAc,KAAK,MAAM,EAAE,CAAC;QAC9E,GAAG,CAAC,SAAS,CAAC,6BAA6B,EAAE,MAAM,CAAC,CAAC;IACvD,CAAC;IACD,GAAG,CAAC,SAAS,CAAC,8BAA8B,EAAE,4B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AAC,EAAE,KAAK,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC;oBACnD,OAAO;gBACT,CAAC;gBACD,MAAM,SAAS,CAAC,aAAa,CAAC,GAAG,EAAE,GAAG,EAAE,MAAM,CAAC,CAAC;YAClD,CAAC;iBAAM,CAAC;gBACN,sBAAsB;gBACtB,MAAM,SAAS,CAAC,aAAa,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;YAC1C,CAAC;YACD,OAAO;QACT,CAAC;QAED,2DAA2D;QAC3D,GAAG,CAAC,SAAS,CAAC,GAAG,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE,CAAC,CAAC;QAC3D,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,CAAC,MAAM,EAAE,SAAS,CAAC,EAAE,CAAC,CAAC,CAAC;IAClF,CAAC,CAAC,CAAC;IAEH,UAAU,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,EAAE;QAC3B,OAAO,CAAC,KAAK,CACX,kCAAkC,MAAM,CAAC,IAAI,kCAAkC,IAAI,qCAAqC,CACzH,CAAC;QACF,OAAO,CAAC,KAAK,CAAC,oCAAoC,IAAI,MAAM,CAAC,CAAC;QAC9D,OAAO,CAAC,KAAK,CAAC,oCAAoC,IAAI,SAAS,CAAC,CAAC;IACnE,CAAC,CAAC,CAAC;AACL,CAAC"}
|
package/dist/index.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* MoneyGraph MCP Server — Main Entry Point
|
|
3
|
-
*
|
|
4
|
-
* The first MCP server for real cross-border money movement.
|
|
5
|
-
* 78 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 { type ServerConfig } from './config.js';
|
|
16
|
-
export declare function createServer(config: ServerConfig): McpServer;
|
|
17
|
-
export declare function startServer(): Promise<void>;
|
|
18
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAGpE,OAAO,EAAc,KAAK,YAAY,EAAE,MAAM,aAAa,CAAC;AAsF5D,wBAAgB,YAAY,CAAC,MAAM,EAAE,YAAY,GAAG,SAAS,CA8C5D;AAGD,wBAAsB,WAAW,kBAkBhC"}
|