@moovio/sdk 0.8.1 → 0.10.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 (82) hide show
  1. package/README.md +42 -7
  2. package/bin/mcp-server.js +78 -11
  3. package/bin/mcp-server.js.map +19 -17
  4. package/jsr.json +1 -1
  5. package/lib/config.d.ts +3 -3
  6. package/lib/config.js +3 -3
  7. package/lib/config.js.map +1 -1
  8. package/lib/security.d.ts +4 -3
  9. package/lib/security.d.ts.map +1 -1
  10. package/lib/security.js +6 -1
  11. package/lib/security.js.map +1 -1
  12. package/mcp-server/extensions.d.ts +2 -0
  13. package/mcp-server/extensions.d.ts.map +1 -1
  14. package/mcp-server/mcp-server.js +1 -1
  15. package/mcp-server/mcp-server.js.map +1 -1
  16. package/mcp-server/prompts.d.ts +26 -0
  17. package/mcp-server/prompts.d.ts.map +1 -0
  18. package/mcp-server/prompts.js +47 -0
  19. package/mcp-server/prompts.js.map +1 -0
  20. package/mcp-server/resources.d.ts.map +1 -1
  21. package/mcp-server/resources.js +1 -0
  22. package/mcp-server/resources.js.map +1 -1
  23. package/mcp-server/server.d.ts.map +1 -1
  24. package/mcp-server/server.js +4 -2
  25. package/mcp-server/server.js.map +1 -1
  26. package/mcp-server/tools.d.ts.map +1 -1
  27. package/mcp-server/tools.js +1 -0
  28. package/mcp-server/tools.js.map +1 -1
  29. package/models/components/createtransfersource.d.ts +2 -0
  30. package/models/components/createtransfersource.d.ts.map +1 -1
  31. package/models/components/createtransfersource.js +2 -0
  32. package/models/components/createtransfersource.js.map +1 -1
  33. package/models/components/feeplan.d.ts +6 -0
  34. package/models/components/feeplan.d.ts.map +1 -1
  35. package/models/components/feeplan.js +3 -0
  36. package/models/components/feeplan.js.map +1 -1
  37. package/models/components/feeplanagreement.d.ts +6 -0
  38. package/models/components/feeplanagreement.d.ts.map +1 -1
  39. package/models/components/feeplanagreement.js +3 -0
  40. package/models/components/feeplanagreement.js.map +1 -1
  41. package/models/components/index.d.ts +1 -0
  42. package/models/components/index.d.ts.map +1 -1
  43. package/models/components/index.js +1 -0
  44. package/models/components/index.js.map +1 -1
  45. package/models/components/monthlyplatformfee.d.ts +44 -0
  46. package/models/components/monthlyplatformfee.d.ts.map +1 -0
  47. package/models/components/monthlyplatformfee.js +71 -0
  48. package/models/components/monthlyplatformfee.js.map +1 -0
  49. package/models/components/partnerpricing.d.ts +6 -0
  50. package/models/components/partnerpricing.d.ts.map +1 -1
  51. package/models/components/partnerpricing.js +3 -0
  52. package/models/components/partnerpricing.js.map +1 -1
  53. package/models/components/partnerpricingagreement.d.ts +6 -0
  54. package/models/components/partnerpricingagreement.d.ts.map +1 -1
  55. package/models/components/partnerpricingagreement.js +3 -0
  56. package/models/components/partnerpricingagreement.js.map +1 -1
  57. package/models/components/transfersource.d.ts +6 -0
  58. package/models/components/transfersource.d.ts.map +1 -1
  59. package/models/components/transfersource.js +3 -0
  60. package/models/components/transfersource.js.map +1 -1
  61. package/models/components/wallettransactionsourcetype.d.ts +3 -0
  62. package/models/components/wallettransactionsourcetype.d.ts.map +1 -1
  63. package/models/components/wallettransactionsourcetype.js +1 -0
  64. package/models/components/wallettransactionsourcetype.js.map +1 -1
  65. package/package.json +1 -1
  66. package/src/lib/config.ts +3 -3
  67. package/src/lib/security.ts +11 -3
  68. package/src/mcp-server/extensions.ts +4 -0
  69. package/src/mcp-server/mcp-server.ts +1 -1
  70. package/src/mcp-server/prompts.ts +110 -0
  71. package/src/mcp-server/resources.ts +1 -0
  72. package/src/mcp-server/server.ts +4 -2
  73. package/src/mcp-server/tools.ts +1 -0
  74. package/src/models/components/createtransfersource.ts +4 -0
  75. package/src/models/components/feeplan.ts +13 -0
  76. package/src/models/components/feeplanagreement.ts +13 -0
  77. package/src/models/components/index.ts +1 -0
  78. package/src/models/components/monthlyplatformfee.ts +83 -0
  79. package/src/models/components/partnerpricing.ts +13 -0
  80. package/src/models/components/partnerpricingagreement.ts +13 -0
  81. package/src/models/components/transfersource.ts +13 -0
  82. package/src/models/components/wallettransactionsourcetype.ts +1 -0
package/README.md CHANGED
@@ -79,7 +79,7 @@ yarn add @moovio/sdk zod
79
79
  This SDK is also an installable MCP server where the various SDK methods are
80
80
  exposed as tools that can be invoked by AI applications.
81
81
 
82
- > Node.js v20 or greater is required to run the MCP server.
82
+ > Node.js v20 or greater is required to run the MCP server from npm.
83
83
 
84
84
  <details>
85
85
  <summary>Claude installation steps</summary>
@@ -109,17 +109,52 @@ Add the following server definition to your `claude_desktop_config.json` file:
109
109
  <details>
110
110
  <summary>Cursor installation steps</summary>
111
111
 
112
- Go to `Cursor Settings > Features > MCP Servers > Add new MCP server` and use the following settings:
112
+ Create a `.cursor/mcp.json` file in your project root with the following content:
113
113
 
114
- - Name: Moov
115
- - Type: `command`
116
- - Command:
117
- ```sh
118
- npx -y --package @moovio/sdk -- mcp start --username ... --password ... --x-moov-version ...
114
+ ```json
115
+ {
116
+ "mcpServers": {
117
+ "Moov": {
118
+ "command": "npx",
119
+ "args": [
120
+ "-y", "--package", "@moovio/sdk",
121
+ "--",
122
+ "mcp", "start",
123
+ "--username", "...",
124
+ "--password", "...",
125
+ "--x-moov-version", "..."
126
+ ]
127
+ }
128
+ }
129
+ }
119
130
  ```
120
131
 
121
132
  </details>
122
133
 
134
+ You can also run MCP servers as a standalone binary with no additional dependencies. You must pull these binaries from available Github releases:
135
+
136
+ ```bash
137
+ curl -L -o mcp-server \
138
+ https://github.com/{org}/{repo}/releases/download/{tag}/mcp-server-bun-darwin-arm64 && \
139
+ chmod +x mcp-server
140
+ ```
141
+
142
+ If the repo is a private repo you must add your Github PAT to download a release `-H "Authorization: Bearer {GITHUB_PAT}"`.
143
+
144
+
145
+ ```json
146
+ {
147
+ "mcpServers": {
148
+ "Todos": {
149
+ "command": "./DOWNLOAD/PATH/mcp-server",
150
+ "args": [
151
+ "start"
152
+ ]
153
+ }
154
+ }
155
+ }
156
+ ```
157
+
123
158
  For a full list of server arguments, run:
124
159
 
125
160
  ```sh
package/bin/mcp-server.js CHANGED
@@ -34213,9 +34213,9 @@ var init_config = __esm(() => {
34213
34213
  SDK_METADATA = {
34214
34214
  language: "typescript",
34215
34215
  openapiDocVersion: "latest",
34216
- sdkVersion: "0.8.1",
34217
- genVersion: "2.548.6",
34218
- userAgent: "speakeasy-sdk/typescript 0.8.1 2.548.6 latest @moovio/sdk"
34216
+ sdkVersion: "0.10.0",
34217
+ genVersion: "2.558.5",
34218
+ userAgent: "speakeasy-sdk/typescript 0.10.0 2.558.5 latest @moovio/sdk"
34219
34219
  };
34220
34220
  });
34221
34221
 
@@ -34996,6 +34996,30 @@ var init_core = __esm(() => {
34996
34996
  };
34997
34997
  });
34998
34998
 
34999
+ // src/mcp-server/prompts.ts
35000
+ function createRegisterPrompt(logger, server, sdk, allowedScopes) {
35001
+ return (prompt) => {
35002
+ const scopes = prompt.scopes ?? [];
35003
+ if (!scopes.every((s) => allowedScopes.has(s))) {
35004
+ return;
35005
+ }
35006
+ if (prompt.args) {
35007
+ if (prompt.description) {
35008
+ server.prompt(prompt.name, prompt.description, prompt.args, async (args, ctx) => prompt.prompt(sdk, args, ctx));
35009
+ } else {
35010
+ server.prompt(prompt.name, prompt.args, async (args, ctx) => prompt.prompt(sdk, args, ctx));
35011
+ }
35012
+ } else {
35013
+ if (prompt.description) {
35014
+ server.prompt(prompt.name, prompt.description, async (ctx) => prompt.prompt(sdk, ctx));
35015
+ } else {
35016
+ server.prompt(prompt.name, async (ctx) => prompt.prompt(sdk, ctx));
35017
+ }
35018
+ }
35019
+ logger.debug("Registered prompt", { name: prompt.name });
35020
+ };
35021
+ }
35022
+
34999
35023
  // src/mcp-server/shared.ts
35000
35024
  async function consumeStream(stream) {
35001
35025
  const reader = stream.getReader();
@@ -35416,6 +35440,9 @@ function resolveSecurity(...options) {
35416
35440
  } else if (o.type === "oauth2:password") {
35417
35441
  return typeof o.value === "string" && !!o.value;
35418
35442
  } else if (o.type === "oauth2:client_credentials") {
35443
+ if (typeof o.value == "string") {
35444
+ return !!o.value;
35445
+ }
35419
35446
  return o.value.clientID != null || o.value.clientSecret != null;
35420
35447
  } else if (typeof o.value === "string") {
35421
35448
  return !!o.value;
@@ -35481,7 +35508,9 @@ function applyBearer(state, spec) {
35481
35508
  if (value.slice(0, 7).toLowerCase() !== "bearer ") {
35482
35509
  value = `Bearer ${value}`;
35483
35510
  }
35484
- state.headers[spec.fieldName] = value;
35511
+ if (spec.fieldName !== undefined) {
35512
+ state.headers[spec.fieldName] = value;
35513
+ }
35485
35514
  }
35486
35515
  function resolveGlobalSecurity(security) {
35487
35516
  return resolveSecurity([
@@ -40144,12 +40173,14 @@ var init_createtransfersource = __esm(() => {
40144
40173
  CreateTransferSource$inboundSchema = objectType({
40145
40174
  transferID: stringType().optional(),
40146
40175
  paymentMethodID: stringType().optional(),
40176
+ paymentToken: stringType().optional(),
40147
40177
  cardDetails: CreateTransferSourceCard$inboundSchema.optional(),
40148
40178
  achDetails: CreateTransferSourceACH$inboundSchema.optional()
40149
40179
  });
40150
40180
  CreateTransferSource$outboundSchema = objectType({
40151
40181
  transferID: stringType().optional(),
40152
40182
  paymentMethodID: stringType().optional(),
40183
+ paymentToken: stringType().optional(),
40153
40184
  cardDetails: CreateTransferSourceCard$outboundSchema.optional(),
40154
40185
  achDetails: CreateTransferSourceACH$outboundSchema.optional()
40155
40186
  });
@@ -40638,6 +40669,24 @@ var init_minimumcommitment = __esm(() => {
40638
40669
  })(MinimumCommitment$ ||= {});
40639
40670
  });
40640
40671
 
40672
+ // src/models/components/monthlyplatformfee.ts
40673
+ var MonthlyPlatformFee$inboundSchema, MonthlyPlatformFee$outboundSchema, MonthlyPlatformFee$;
40674
+ var init_monthlyplatformfee = __esm(() => {
40675
+ init_lib();
40676
+ MonthlyPlatformFee$inboundSchema = objectType({
40677
+ currency: stringType(),
40678
+ valueDecimal: stringType()
40679
+ });
40680
+ MonthlyPlatformFee$outboundSchema = objectType({
40681
+ currency: stringType(),
40682
+ valueDecimal: stringType()
40683
+ });
40684
+ ((MonthlyPlatformFee$) => {
40685
+ MonthlyPlatformFee$.inboundSchema = MonthlyPlatformFee$inboundSchema;
40686
+ MonthlyPlatformFee$.outboundSchema = MonthlyPlatformFee$outboundSchema;
40687
+ })(MonthlyPlatformFee$ ||= {});
40688
+ });
40689
+
40641
40690
  // src/models/components/feeplan.ts
40642
40691
  var FeePlan$inboundSchema, FeePlan$outboundSchema, FeePlan$;
40643
40692
  var init_feeplan = __esm(() => {
@@ -40645,6 +40694,7 @@ var init_feeplan = __esm(() => {
40645
40694
  init_billablefee();
40646
40695
  init_cardacquiringmodel();
40647
40696
  init_minimumcommitment();
40697
+ init_monthlyplatformfee();
40648
40698
  FeePlan$inboundSchema = objectType({
40649
40699
  planID: stringType(),
40650
40700
  name: stringType(),
@@ -40652,6 +40702,7 @@ var init_feeplan = __esm(() => {
40652
40702
  cardAcquiringModel: CardAcquiringModel$inboundSchema,
40653
40703
  billableFees: arrayType(BillableFee$inboundSchema),
40654
40704
  minimumCommitment: MinimumCommitment$inboundSchema,
40705
+ monthlyPlatformFee: MonthlyPlatformFee$inboundSchema,
40655
40706
  createdAt: stringType().datetime({ offset: true }).transform((v2) => new Date(v2))
40656
40707
  });
40657
40708
  FeePlan$outboundSchema = objectType({
@@ -40661,6 +40712,7 @@ var init_feeplan = __esm(() => {
40661
40712
  cardAcquiringModel: CardAcquiringModel$outboundSchema,
40662
40713
  billableFees: arrayType(BillableFee$outboundSchema),
40663
40714
  minimumCommitment: MinimumCommitment$outboundSchema,
40715
+ monthlyPlatformFee: MonthlyPlatformFee$outboundSchema,
40664
40716
  createdAt: dateType().transform((v2) => v2.toISOString())
40665
40717
  });
40666
40718
  ((FeePlan$) => {
@@ -40693,6 +40745,7 @@ var init_feeplanagreement = __esm(() => {
40693
40745
  init_cardacquiringmodel();
40694
40746
  init_feeplanagreementstatus();
40695
40747
  init_minimumcommitment();
40748
+ init_monthlyplatformfee();
40696
40749
  FeePlanAgreement$inboundSchema = objectType({
40697
40750
  agreementID: stringType(),
40698
40751
  planID: stringType(),
@@ -40703,7 +40756,8 @@ var init_feeplanagreement = __esm(() => {
40703
40756
  status: FeePlanAgreementStatus$inboundSchema,
40704
40757
  cardAcquiringModel: CardAcquiringModel$inboundSchema,
40705
40758
  billableFees: arrayType(BillableFee$inboundSchema),
40706
- minimumCommitment: MinimumCommitment$inboundSchema
40759
+ minimumCommitment: MinimumCommitment$inboundSchema,
40760
+ monthlyPlatformFee: MonthlyPlatformFee$inboundSchema
40707
40761
  });
40708
40762
  FeePlanAgreement$outboundSchema = objectType({
40709
40763
  agreementID: stringType(),
@@ -40715,7 +40769,8 @@ var init_feeplanagreement = __esm(() => {
40715
40769
  status: FeePlanAgreementStatus$outboundSchema,
40716
40770
  cardAcquiringModel: CardAcquiringModel$outboundSchema,
40717
40771
  billableFees: arrayType(BillableFee$outboundSchema),
40718
- minimumCommitment: MinimumCommitment$outboundSchema
40772
+ minimumCommitment: MinimumCommitment$outboundSchema,
40773
+ monthlyPlatformFee: MonthlyPlatformFee$outboundSchema
40719
40774
  });
40720
40775
  ((FeePlanAgreement$) => {
40721
40776
  FeePlanAgreement$.inboundSchema = FeePlanAgreement$inboundSchema;
@@ -42261,6 +42316,7 @@ var init_partnerpricing = __esm(() => {
42261
42316
  init_billablefee();
42262
42317
  init_cardacquiringmodel();
42263
42318
  init_minimumcommitment();
42319
+ init_monthlyplatformfee();
42264
42320
  PartnerPricing$inboundSchema = objectType({
42265
42321
  planID: stringType(),
42266
42322
  name: stringType(),
@@ -42269,6 +42325,7 @@ var init_partnerpricing = __esm(() => {
42269
42325
  cardAcquiringModel: CardAcquiringModel$inboundSchema,
42270
42326
  billableFees: arrayType(BillableFee$inboundSchema),
42271
42327
  minimumCommitment: MinimumCommitment$inboundSchema,
42328
+ monthlyPlatformFee: MonthlyPlatformFee$inboundSchema,
42272
42329
  createdAt: stringType().datetime({ offset: true }).transform((v2) => new Date(v2))
42273
42330
  });
42274
42331
  PartnerPricing$outboundSchema = objectType({
@@ -42279,6 +42336,7 @@ var init_partnerpricing = __esm(() => {
42279
42336
  cardAcquiringModel: CardAcquiringModel$outboundSchema,
42280
42337
  billableFees: arrayType(BillableFee$outboundSchema),
42281
42338
  minimumCommitment: MinimumCommitment$outboundSchema,
42339
+ monthlyPlatformFee: MonthlyPlatformFee$outboundSchema,
42282
42340
  createdAt: dateType().transform((v2) => v2.toISOString())
42283
42341
  });
42284
42342
  ((PartnerPricing$) => {
@@ -42295,6 +42353,7 @@ var init_partnerpricingagreement = __esm(() => {
42295
42353
  init_cardacquiringmodel();
42296
42354
  init_feeplanagreementstatus();
42297
42355
  init_minimumcommitment();
42356
+ init_monthlyplatformfee();
42298
42357
  PartnerPricingAgreement$inboundSchema = objectType({
42299
42358
  agreementID: stringType(),
42300
42359
  planID: stringType(),
@@ -42306,6 +42365,7 @@ var init_partnerpricingagreement = __esm(() => {
42306
42365
  cardAcquiringModel: CardAcquiringModel$inboundSchema,
42307
42366
  billableFees: arrayType(BillableFee$inboundSchema),
42308
42367
  minimumCommitment: MinimumCommitment$inboundSchema,
42368
+ monthlyPlatformFee: MonthlyPlatformFee$inboundSchema,
42309
42369
  revenueShare: numberType().int()
42310
42370
  });
42311
42371
  PartnerPricingAgreement$outboundSchema = objectType({
@@ -42319,6 +42379,7 @@ var init_partnerpricingagreement = __esm(() => {
42319
42379
  cardAcquiringModel: CardAcquiringModel$outboundSchema,
42320
42380
  billableFees: arrayType(BillableFee$outboundSchema),
42321
42381
  minimumCommitment: MinimumCommitment$outboundSchema,
42382
+ monthlyPlatformFee: MonthlyPlatformFee$outboundSchema,
42322
42383
  revenueShare: numberType().int()
42323
42384
  });
42324
42385
  ((PartnerPricingAgreement$) => {
@@ -43746,6 +43807,7 @@ var init_transfersource = __esm(() => {
43746
43807
  init_paymentmethodscard();
43747
43808
  init_paymentmethodswallet();
43748
43809
  init_paymentmethodtype();
43810
+ init_terminalcard();
43749
43811
  init_transferaccount();
43750
43812
  TransferSource$inboundSchema = objectType({
43751
43813
  transferID: stringType().optional(),
@@ -43756,6 +43818,7 @@ var init_transfersource = __esm(() => {
43756
43818
  wallet: PaymentMethodsWallet$inboundSchema.optional(),
43757
43819
  card: PaymentMethodsCard$inboundSchema.optional(),
43758
43820
  applePay: ApplePayResponse$inboundSchema.optional(),
43821
+ terminalCard: TerminalCard$inboundSchema.optional(),
43759
43822
  cardDetails: CardTransactionDetails$inboundSchema.optional(),
43760
43823
  achDetails: ACHTransactionDetails$inboundSchema.optional()
43761
43824
  });
@@ -43768,6 +43831,7 @@ var init_transfersource = __esm(() => {
43768
43831
  wallet: PaymentMethodsWallet$outboundSchema.optional(),
43769
43832
  card: PaymentMethodsCard$outboundSchema.optional(),
43770
43833
  applePay: ApplePayResponse$outboundSchema.optional(),
43834
+ terminalCard: TerminalCard$outboundSchema.optional(),
43771
43835
  cardDetails: CardTransactionDetails$outboundSchema.optional(),
43772
43836
  achDetails: ACHTransactionDetails$outboundSchema.optional()
43773
43837
  });
@@ -44461,7 +44525,8 @@ var init_wallettransactionsourcetype = __esm(() => {
44461
44525
  IssuingCardTransaction: "issuing-card-transaction",
44462
44526
  IssuingAuthorization: "issuing-authorization",
44463
44527
  Sweep: "sweep",
44464
- Adjustment: "adjustment"
44528
+ Adjustment: "adjustment",
44529
+ Fee: "fee"
44465
44530
  };
44466
44531
  WalletTransactionSourceType$inboundSchema = nativeEnumType(WalletTransactionSourceType);
44467
44532
  WalletTransactionSourceType$outboundSchema = WalletTransactionSourceType$inboundSchema;
@@ -44808,6 +44873,7 @@ var init_components = __esm(() => {
44808
44873
  init_microdepositstatus();
44809
44874
  init_minimumcommitment();
44810
44875
  init_mode();
44876
+ init_monthlyplatformfee();
44811
44877
  init_moovfeedetails();
44812
44878
  init_moovwalletpaymentmethod();
44813
44879
  init_mxauthorizationcode();
@@ -70545,7 +70611,7 @@ you'll need to specify the \`/accounts/{accountID}/wallets.read\` scope.`,
70545
70611
  function createMCPServer(deps) {
70546
70612
  const server = new McpServer({
70547
70613
  name: "Moov",
70548
- version: "0.8.1"
70614
+ version: "0.10.0"
70549
70615
  });
70550
70616
  const client = new MoovCore({
70551
70617
  security: deps.security,
@@ -70558,7 +70624,8 @@ function createMCPServer(deps) {
70558
70624
  const tool = createRegisterTool(deps.logger, server, client, scopes, allowedTools);
70559
70625
  const resource = createRegisterResource(deps.logger, server, client, scopes);
70560
70626
  const resourceTemplate = createRegisterResourceTemplate(deps.logger, server, client, scopes);
70561
- const register = { tool, resource, resourceTemplate };
70627
+ const prompt = createRegisterPrompt(deps.logger, server, client, scopes);
70628
+ const register = { tool, resource, resourceTemplate, prompt };
70562
70629
  tool(tool$accountsCreate);
70563
70630
  tool(tool$accountsList);
70564
70631
  tool(tool$accountsGet);
@@ -72043,7 +72110,7 @@ var routes = rn({
72043
72110
  var app = Ve(routes, {
72044
72111
  name: "mcp",
72045
72112
  versionInfo: {
72046
- currentVersion: "0.8.1"
72113
+ currentVersion: "0.10.0"
72047
72114
  }
72048
72115
  });
72049
72116
  _t(app, process3.argv.slice(2), buildContext(process3));
@@ -72051,5 +72118,5 @@ export {
72051
72118
  app
72052
72119
  };
72053
72120
 
72054
- //# debugId=0DD85FD32CD63D4C64756E2164756E21
72121
+ //# debugId=BC8E86FEC6C5688D64756E2164756E21
72055
72122
  //# sourceMappingURL=mcp-server.js.map