quantix-mcp 0.3.7 → 0.4.3

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 (113) hide show
  1. package/.claude/settings.local.json +2 -1
  2. package/.github/agents/copilot-instructions.md +32 -32
  3. package/.github/copilot-instructions.md +17 -17
  4. package/.github/workflows/publish.yaml +28 -28
  5. package/.opencode/command/speckit.analyze.md +184 -184
  6. package/.opencode/command/speckit.checklist.md +294 -294
  7. package/.opencode/command/speckit.clarify.md +181 -181
  8. package/.opencode/command/speckit.constitution.md +84 -84
  9. package/.opencode/command/speckit.implement.md +135 -135
  10. package/.opencode/command/speckit.plan.md +89 -89
  11. package/.opencode/command/speckit.specify.md +258 -258
  12. package/.opencode/command/speckit.tasks.md +137 -137
  13. package/.opencode/command/speckit.taskstoissues.md +30 -30
  14. package/.specify/memory/constitution.md +58 -58
  15. package/.specify/templates/constitution-template.md +50 -50
  16. package/.vscode/launch.json +14 -14
  17. package/CLAUDE.md +70 -64
  18. package/GEMINI.md +58 -0
  19. package/README.md +176 -176
  20. package/dist/index.d.ts.map +1 -1
  21. package/dist/index.js +14 -3
  22. package/dist/index.js.map +1 -1
  23. package/dist/tools/accounts.d.ts.map +1 -1
  24. package/dist/tools/accounts.js +55 -34
  25. package/dist/tools/accounts.js.map +1 -1
  26. package/dist/tools/categories.d.ts.map +1 -1
  27. package/dist/tools/categories.js +46 -20
  28. package/dist/tools/categories.js.map +1 -1
  29. package/dist/tools/credit-cards.d.ts.map +1 -1
  30. package/dist/tools/credit-cards.js +104 -33
  31. package/dist/tools/credit-cards.js.map +1 -1
  32. package/dist/tools/data.d.ts.map +1 -1
  33. package/dist/tools/data.js +19 -8
  34. package/dist/tools/data.js.map +1 -1
  35. package/dist/tools/settings.d.ts.map +1 -1
  36. package/dist/tools/settings.js +28 -12
  37. package/dist/tools/settings.js.map +1 -1
  38. package/dist/tools/subscriptions.d.ts +3 -0
  39. package/dist/tools/subscriptions.d.ts.map +1 -0
  40. package/dist/tools/subscriptions.js +128 -0
  41. package/dist/tools/subscriptions.js.map +1 -0
  42. package/dist/tools/summary.d.ts.map +1 -1
  43. package/dist/tools/summary.js +17 -11
  44. package/dist/tools/summary.js.map +1 -1
  45. package/dist/tools/transactions.d.ts.map +1 -1
  46. package/dist/tools/transactions.js +85 -50
  47. package/dist/tools/transactions.js.map +1 -1
  48. package/dist/tools/transfers.d.ts +3 -0
  49. package/dist/tools/transfers.d.ts.map +1 -0
  50. package/dist/tools/transfers.js +107 -0
  51. package/dist/tools/transfers.js.map +1 -0
  52. package/dist/types/schemas.d.ts +65 -0
  53. package/dist/types/schemas.d.ts.map +1 -1
  54. package/dist/types/schemas.js +69 -3
  55. package/dist/types/schemas.js.map +1 -1
  56. package/dist/utils/toolHelpers.d.ts +7 -0
  57. package/dist/utils/toolHelpers.d.ts.map +1 -0
  58. package/dist/utils/toolHelpers.js +11 -0
  59. package/dist/utils/toolHelpers.js.map +1 -0
  60. package/openapi.yaml +2279 -1828
  61. package/package.json +41 -41
  62. package/specs/001-mcp-api-integration/checklists/requirements.md +34 -34
  63. package/specs/001-mcp-api-integration/contracts/openapi.yaml +635 -635
  64. package/specs/001-mcp-api-integration/data-model.md +106 -106
  65. package/specs/001-mcp-api-integration/plan.md +73 -73
  66. package/specs/001-mcp-api-integration/quickstart.md +74 -74
  67. package/specs/001-mcp-api-integration/research.md +58 -58
  68. package/specs/001-mcp-api-integration/spec.md +119 -119
  69. package/specs/001-mcp-api-integration/tasks.md +64 -64
  70. package/src/config.ts +36 -36
  71. package/src/index.ts +60 -47
  72. package/src/services/apiClient.ts +49 -49
  73. package/src/tools/accounts.ts +122 -111
  74. package/src/tools/categories.ts +102 -81
  75. package/src/tools/credit-cards.ts +203 -147
  76. package/src/tools/data.ts +45 -36
  77. package/src/tools/settings.ts +64 -51
  78. package/src/tools/subscriptions.ts +159 -0
  79. package/src/tools/summary.ts +29 -24
  80. package/src/tools/transactions.ts +156 -128
  81. package/src/tools/transfers.ts +122 -0
  82. package/src/types/schemas.ts +304 -235
  83. package/src/utils/toolHelpers.ts +11 -0
  84. package/tests/benchmark.test.d.ts +1 -1
  85. package/tests/benchmark.test.js +32 -32
  86. package/tests/benchmark.test.ts +38 -38
  87. package/tests/server.test.d.ts +1 -1
  88. package/tests/server.test.js +12 -12
  89. package/tests/server.test.ts +14 -14
  90. package/tests/setup.d.ts +3 -3
  91. package/tests/setup.js +16 -16
  92. package/tests/setup.ts +20 -20
  93. package/tests/tools/accounts.test.ts +159 -118
  94. package/tests/tools/categories.test.d.ts +1 -1
  95. package/tests/tools/categories.test.js +62 -62
  96. package/tests/tools/categories.test.ts +120 -78
  97. package/tests/tools/credit-cards.test.d.ts +1 -1
  98. package/tests/tools/credit-cards.test.js +70 -70
  99. package/tests/tools/credit-cards.test.ts +131 -89
  100. package/tests/tools/data.test.ts +100 -0
  101. package/tests/tools/settings.test.ts +116 -0
  102. package/tests/tools/subscriptions.test.ts +173 -0
  103. package/tests/tools/summary.test.d.ts +1 -1
  104. package/tests/tools/summary.test.js +35 -35
  105. package/tests/tools/summary.test.ts +63 -42
  106. package/tests/tools/transactions.test.d.ts +1 -1
  107. package/tests/tools/transactions.test.js +66 -66
  108. package/tests/tools/transactions.test.ts +133 -82
  109. package/tests/tools/transfers.test.ts +141 -0
  110. package/tsconfig.json +52 -52
  111. package/vitest.config.d.ts +2 -2
  112. package/vitest.config.js +13 -13
  113. package/vitest.config.ts +14 -14
@@ -1,111 +1,122 @@
1
- import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
- import { z } from 'zod';
3
- import { CreateAccountInput, UpdateAccountInput } from '../types/schemas.js';
4
- import { apiClient } from '../services/apiClient.js';
5
-
6
- export function registerAccountTools(server: McpServer) {
7
- server.registerTool(
8
- 'create_account',
9
- {
10
- title: 'Create Account',
11
- description: 'Create a new financial account (BANK_ACCOUNT, WALLET, etc.)',
12
- inputSchema: CreateAccountInput
13
- },
14
- async (args) => {
15
- const account = await apiClient.post('/accounts', args);
16
- return {
17
- content: [{ type: 'text', text: `Account created: ${JSON.stringify(account, null, 2)}` }]
18
- };
19
- }
20
- );
21
-
22
- server.registerTool(
23
- 'get_accounts',
24
- {
25
- title: 'Get Accounts',
26
- description: 'List all financial accounts with current balances',
27
- inputSchema: z.object({})
28
- },
29
- async () => {
30
- const accounts = await apiClient.get('/accounts');
31
- return {
32
- content: [{ type: 'text', text: `Accounts: ${JSON.stringify(accounts, null, 2)}` }]
33
- };
34
- }
35
- );
36
-
37
- server.registerTool(
38
- 'get_account',
39
- {
40
- title: 'Get Account Details',
41
- description: 'Get details of a specific account by ID',
42
- inputSchema: z.object({ id: z.string() })
43
- },
44
- async ({ id }) => {
45
- const account = await apiClient.get(`/accounts/${id}`);
46
- return {
47
- content: [{ type: 'text', text: `Account details: ${JSON.stringify(account, null, 2)}` }]
48
- };
49
- }
50
- );
51
-
52
- server.registerTool(
53
- 'update_account',
54
- {
55
- title: 'Update Account',
56
- description: 'Update an existing account',
57
- inputSchema: UpdateAccountInput
58
- },
59
- async ({ id, ...data }) => {
60
- const account = await apiClient.patch(`/accounts/${id}`, data);
61
- return {
62
- content: [{ type: 'text', text: `Account updated: ${JSON.stringify(account, null, 2)}` }]
63
- };
64
- }
65
- );
66
-
67
- server.registerTool(
68
- 'delete_account',
69
- {
70
- title: 'Delete Account',
71
- description: 'Delete an account by ID',
72
- inputSchema: z.object({ id: z.string() })
73
- },
74
- async ({ id }) => {
75
- await apiClient.delete(`/accounts/${id}`);
76
- return {
77
- content: [{ type: 'text', text: `Account deleted successfully (ID: ${id})` }]
78
- };
79
- }
80
- );
81
-
82
- server.registerTool(
83
- 'get_account_balance',
84
- {
85
- title: 'Get Account Balance',
86
- description: 'Get the current balance for a specific account',
87
- inputSchema: z.object({ id: z.string() })
88
- },
89
- async ({ id }) => {
90
- const balance = await apiClient.get(`/accounts/${id}/balance`);
91
- return {
92
- content: [{ type: 'text', text: `Account balance: ${JSON.stringify(balance, null, 2)}` }]
93
- };
94
- }
95
- );
96
-
97
- server.registerTool(
98
- 'get_account_transactions',
99
- {
100
- title: 'Get Account Transactions',
101
- description: 'Get all transactions linked to an account',
102
- inputSchema: z.object({ id: z.string() })
103
- },
104
- async ({ id }) => {
105
- const transactions = await apiClient.get(`/accounts/${id}/transactions`);
106
- return {
107
- content: [{ type: 'text', text: `Account transactions: ${JSON.stringify(transactions, null, 2)}` }]
108
- };
109
- }
110
- );
111
- }
1
+ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
+ import { z } from 'zod';
3
+ import { CreateAccountInput, UpdateAccountInput } from '../types/schemas.js';
4
+ import { apiClient } from '../services/apiClient.js';
5
+ import { handleToolError } from '../utils/toolHelpers.js';
6
+
7
+ export function registerAccountTools(server: McpServer) {
8
+ server.registerTool(
9
+ 'create_account',
10
+ {
11
+ title: 'Create Account',
12
+ description: 'Create a new financial account (BANK_ACCOUNT, WALLET, etc.)',
13
+ inputSchema: CreateAccountInput
14
+ },
15
+ async (args) => {
16
+ try {
17
+ const account = await apiClient.post('/accounts', args);
18
+ return {
19
+ content: [{ type: 'text', text: `Account created: ${JSON.stringify(account, null, 2)}` }]
20
+ };
21
+ } catch (error) {
22
+ return handleToolError(error);
23
+ }
24
+ }
25
+ );
26
+
27
+ server.registerTool(
28
+ 'get_accounts',
29
+ {
30
+ title: 'Get Accounts',
31
+ description: 'List all financial accounts with current balances',
32
+ inputSchema: z.object({})
33
+ },
34
+ async () => {
35
+ try {
36
+ const accounts = await apiClient.get('/accounts');
37
+ return {
38
+ content: [{ type: 'text', text: `Accounts: ${JSON.stringify(accounts, null, 2)}` }]
39
+ };
40
+ } catch (error) {
41
+ return handleToolError(error);
42
+ }
43
+ }
44
+ );
45
+
46
+ server.registerTool(
47
+ 'get_account',
48
+ {
49
+ title: 'Get Account Details',
50
+ description: 'Get details of a specific account by ID',
51
+ inputSchema: z.object({ id: z.string() })
52
+ },
53
+ async ({ id }) => {
54
+ try {
55
+ const account = await apiClient.get(`/accounts/${id}`);
56
+ return {
57
+ content: [{ type: 'text', text: `Account details: ${JSON.stringify(account, null, 2)}` }]
58
+ };
59
+ } catch (error) {
60
+ return handleToolError(error);
61
+ }
62
+ }
63
+ );
64
+
65
+ server.registerTool(
66
+ 'update_account',
67
+ {
68
+ title: 'Update Account',
69
+ description: 'Update an existing account',
70
+ inputSchema: UpdateAccountInput
71
+ },
72
+ async ({ id, ...data }) => {
73
+ try {
74
+ const account = await apiClient.patch(`/accounts/${id}`, data);
75
+ return {
76
+ content: [{ type: 'text', text: `Account updated: ${JSON.stringify(account, null, 2)}` }]
77
+ };
78
+ } catch (error) {
79
+ return handleToolError(error);
80
+ }
81
+ }
82
+ );
83
+
84
+ server.registerTool(
85
+ 'delete_account',
86
+ {
87
+ title: 'Delete Account',
88
+ description: 'Delete an account by ID',
89
+ inputSchema: z.object({ id: z.string() })
90
+ },
91
+ async ({ id }) => {
92
+ try {
93
+ await apiClient.delete(`/accounts/${id}`);
94
+ return {
95
+ content: [{ type: 'text', text: `Account deleted successfully (ID: ${id})` }]
96
+ };
97
+ } catch (error) {
98
+ return handleToolError(error);
99
+ }
100
+ }
101
+ );
102
+
103
+ server.registerTool(
104
+ 'get_account_balance',
105
+ {
106
+ title: 'Get Account Balance',
107
+ description: 'Get the current balance for a specific account',
108
+ inputSchema: z.object({ id: z.string() })
109
+ },
110
+ async ({ id }) => {
111
+ try {
112
+ const balance = await apiClient.get(`/accounts/${id}/balance`);
113
+ return {
114
+ content: [{ type: 'text', text: `Account balance: ${JSON.stringify(balance, null, 2)}` }]
115
+ };
116
+ } catch (error) {
117
+ return handleToolError(error);
118
+ }
119
+ }
120
+ );
121
+
122
+ }
@@ -1,81 +1,102 @@
1
- import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
- import { z } from 'zod';
3
- import { CreateCategoryInput, UpdateCategoryInput } from '../types/schemas.js';
4
- import { apiClient } from '../services/apiClient.js';
5
-
6
- export function registerCategoryTools(server: McpServer) {
7
- server.registerTool(
8
- 'create_category',
9
- {
10
- title: 'Create Category',
11
- description: 'Create a new financial category (INCOME or EXPENSE)',
12
- inputSchema: CreateCategoryInput
13
- },
14
- async (args) => {
15
- const category = await apiClient.post('/categories', args);
16
- return {
17
- content: [{ type: 'text', text: `Category created: ${JSON.stringify(category, null, 2)}` }]
18
- };
19
- }
20
- );
21
-
22
- server.registerTool(
23
- 'get_categories',
24
- {
25
- title: 'Get Categories',
26
- description: 'List all financial categories',
27
- inputSchema: z.object({})
28
- },
29
- async () => {
30
- const categories = await apiClient.get('/categories');
31
- return {
32
- content: [{ type: 'text', text: `Categories: ${JSON.stringify(categories, null, 2)}` }]
33
- };
34
- }
35
- );
36
-
37
- server.registerTool(
38
- 'get_category',
39
- {
40
- title: 'Get Category',
41
- description: 'Get a category by ID',
42
- inputSchema: z.object({ id: z.string() })
43
- },
44
- async ({ id }) => {
45
- const category = await apiClient.get(`/categories/${id}`);
46
- return {
47
- content: [{ type: 'text', text: `Category: ${JSON.stringify(category, null, 2)}` }]
48
- };
49
- }
50
- );
51
-
52
- server.registerTool(
53
- 'update_category',
54
- {
55
- title: 'Update Category',
56
- description: 'Update a category',
57
- inputSchema: UpdateCategoryInput
58
- },
59
- async ({ id, ...data }) => {
60
- const category = await apiClient.patch(`/categories/${id}`, data);
61
- return {
62
- content: [{ type: 'text', text: `Category updated: ${JSON.stringify(category, null, 2)}` }]
63
- };
64
- }
65
- );
66
-
67
- server.registerTool(
68
- 'delete_category',
69
- {
70
- title: 'Delete Category',
71
- description: 'Delete a category by ID',
72
- inputSchema: z.object({ id: z.string() })
73
- },
74
- async ({ id }) => {
75
- await apiClient.delete(`/categories/${id}`);
76
- return {
77
- content: [{ type: 'text', text: `Category deleted successfully (ID: ${id})` }]
78
- };
79
- }
80
- );
81
- }
1
+ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
+ import { z } from 'zod';
3
+ import { CreateCategoryInput, UpdateCategoryInput } from '../types/schemas.js';
4
+ import { apiClient } from '../services/apiClient.js';
5
+ import { handleToolError } from '../utils/toolHelpers.js';
6
+
7
+ export function registerCategoryTools(server: McpServer) {
8
+ server.registerTool(
9
+ 'create_category',
10
+ {
11
+ title: 'Create Category',
12
+ description: 'Create a new financial category (INCOME or EXPENSE)',
13
+ inputSchema: CreateCategoryInput
14
+ },
15
+ async (args) => {
16
+ try {
17
+ const category = await apiClient.post('/categories', args);
18
+ return {
19
+ content: [{ type: 'text', text: `Category created: ${JSON.stringify(category, null, 2)}` }]
20
+ };
21
+ } catch (error) {
22
+ return handleToolError(error);
23
+ }
24
+ }
25
+ );
26
+
27
+ server.registerTool(
28
+ 'get_categories',
29
+ {
30
+ title: 'Get Categories',
31
+ description: 'List all financial categories',
32
+ inputSchema: z.object({})
33
+ },
34
+ async () => {
35
+ try {
36
+ const categories = await apiClient.get('/categories');
37
+ return {
38
+ content: [{ type: 'text', text: `Categories: ${JSON.stringify(categories, null, 2)}` }]
39
+ };
40
+ } catch (error) {
41
+ return handleToolError(error);
42
+ }
43
+ }
44
+ );
45
+
46
+ server.registerTool(
47
+ 'get_category',
48
+ {
49
+ title: 'Get Category',
50
+ description: 'Get a category by ID',
51
+ inputSchema: z.object({ id: z.string() })
52
+ },
53
+ async ({ id }) => {
54
+ try {
55
+ const category = await apiClient.get(`/categories/${id}`);
56
+ return {
57
+ content: [{ type: 'text', text: `Category: ${JSON.stringify(category, null, 2)}` }]
58
+ };
59
+ } catch (error) {
60
+ return handleToolError(error);
61
+ }
62
+ }
63
+ );
64
+
65
+ server.registerTool(
66
+ 'update_category',
67
+ {
68
+ title: 'Update Category',
69
+ description: 'Update a category',
70
+ inputSchema: UpdateCategoryInput
71
+ },
72
+ async ({ id, ...data }) => {
73
+ try {
74
+ const category = await apiClient.patch(`/categories/${id}`, data);
75
+ return {
76
+ content: [{ type: 'text', text: `Category updated: ${JSON.stringify(category, null, 2)}` }]
77
+ };
78
+ } catch (error) {
79
+ return handleToolError(error);
80
+ }
81
+ }
82
+ );
83
+
84
+ server.registerTool(
85
+ 'delete_category',
86
+ {
87
+ title: 'Delete Category',
88
+ description: 'Delete a category by ID',
89
+ inputSchema: z.object({ id: z.string() })
90
+ },
91
+ async ({ id }) => {
92
+ try {
93
+ await apiClient.delete(`/categories/${id}`);
94
+ return {
95
+ content: [{ type: 'text', text: `Category deleted successfully (ID: ${id})` }]
96
+ };
97
+ } catch (error) {
98
+ return handleToolError(error);
99
+ }
100
+ }
101
+ );
102
+ }