actual-mcp-server 0.6.48 → 0.6.50
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
CHANGED
package/dist/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "actual-mcp-server",
|
|
3
3
|
"displayName": "Actual MCP Server",
|
|
4
|
-
"version": "0.6.
|
|
4
|
+
"version": "0.6.50",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=20.0.0",
|
|
7
7
|
"npm": ">=10.0.0"
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"verify-tools": "npm run build && node scripts/verify-tools.js",
|
|
31
31
|
"check:coverage": "node scripts/list-actual-api-methods.mjs",
|
|
32
32
|
"direct-sync": "node scripts/direct-sync/bank-sync-direct.mjs",
|
|
33
|
-
"test:unit-js": "node tests/unit/transactions_create.test.js && node tests/unit/generated_tools.smoke.test.js && node tests/unit/schema_validation.test.js && node tests/unit/config_https_validation.test.js && node tests/unit/config_insecure_upstream.test.js && node tests/unit/auth-acl.test.js && node tests/unit/bug76.test.js && node tests/unit/budgets_setAmount.test.js && node tests/unit/budgets_transfer.test.js && node tests/unit/transactions_uncategorized.test.js && node tests/unit/httpServer_session_init.test.js && node tests/unit/httpServer_session_not_found.test.js && node tests/unit/manual_mcp_client_retry.test.js && node tests/unit/manual_mcp_client_session.test.js && node tests/unit/manual_mcp_client_circuit.test.js && node tests/unit/manual_runner_killswitch.test.js && node tests/unit/adapter_auth_rate_limit.test.js && node tests/unit/adapter_session_reuse.test.js && node tests/unit/retry_classifier.test.js && node tests/unit/adapter_module_surface.test.js && node tests/unit/adapter_nonidempotent_no_retry.test.js && node tests/unit/pool_liveness.test.js && node tests/unit/pool_shutdown_all.test.js && node tests/unit/query_where_operators.test.js && node tests/unit/query_run_validation.test.js && node tests/unit/adapter_with_write_session.test.js && node tests/unit/category_groups_delete.test.js && node tests/unit/rules_delete.test.js && node tests/unit/schedules_delete.test.js && node tests/unit/payees_delete.test.js && node tests/unit/rules_create_or_update.test.js && node tests/unit/unhandled-rejection.test.js && node tests/unit/rejection-allowlist-purity.test.js && node tests/unit/httpServer_bearer_auth.test.js && node tests/unit/httpServer_oidc_audience.test.js && node tests/unit/httpServer_oidc_auth_verification.test.js && node tests/unit/httpServer_body_limit.test.js && node tests/unit/adapter_write_pool_cooperation.test.js && node tests/unit/budget_acl_enforcement.test.js && node tests/unit/budget_preference_store.test.js && node tests/unit/budget_preference_restore.test.js && node tests/unit/tags_list.test.js && node tests/unit/tags_create.test.js && node tests/unit/tags_update.test.js && node tests/unit/tags_delete.test.js && node tests/unit/notes_get.test.js && node tests/unit/notes_update.test.js && node tests/unit/payees_common_list.test.js && node tests/unit/transactions_update_guard.test.js && node tests/unit/entities_search.test.js && node tests/unit/zod_error_format.test.js && node tests/unit/tool_count_sync.test.js && node tests/unit/stdio_transport.test.js && node tests/unit/logger_structured.test.js && node tests/unit/logger_redaction.test.js && node tests/unit/logger_correlation.test.js && node tests/unit/check_coverage.test.js",
|
|
33
|
+
"test:unit-js": "node tests/unit/transactions_create.test.js && node tests/unit/generated_tools.smoke.test.js && node tests/unit/schema_validation.test.js && node tests/unit/config_https_validation.test.js && node tests/unit/config_insecure_upstream.test.js && node tests/unit/auth-acl.test.js && node tests/unit/bug76.test.js && node tests/unit/budgets_setAmount.test.js && node tests/unit/budgets_transfer.test.js && node tests/unit/transactions_uncategorized.test.js && node tests/unit/httpServer_session_init.test.js && node tests/unit/httpServer_session_not_found.test.js && node tests/unit/manual_mcp_client_retry.test.js && node tests/unit/manual_mcp_client_session.test.js && node tests/unit/manual_mcp_client_circuit.test.js && node tests/unit/manual_runner_killswitch.test.js && node tests/unit/adapter_auth_rate_limit.test.js && node tests/unit/adapter_session_reuse.test.js && node tests/unit/retry_classifier.test.js && node tests/unit/adapter_module_surface.test.js && node tests/unit/adapter_nonidempotent_no_retry.test.js && node tests/unit/pool_liveness.test.js && node tests/unit/pool_shutdown_all.test.js && node tests/unit/query_where_operators.test.js && node tests/unit/query_run_validation.test.js && node tests/unit/adapter_with_write_session.test.js && node tests/unit/category_groups_delete.test.js && node tests/unit/rules_delete.test.js && node tests/unit/schedules_delete.test.js && node tests/unit/payees_delete.test.js && node tests/unit/rules_create_or_update.test.js && node tests/unit/unhandled-rejection.test.js && node tests/unit/rejection-allowlist-purity.test.js && node tests/unit/httpServer_bearer_auth.test.js && node tests/unit/httpServer_oidc_audience.test.js && node tests/unit/httpServer_oidc_auth_verification.test.js && node tests/unit/httpServer_body_limit.test.js && node tests/unit/adapter_write_pool_cooperation.test.js && node tests/unit/budget_acl_enforcement.test.js && node tests/unit/budget_preference_store.test.js && node tests/unit/budget_preference_restore.test.js && node tests/unit/tags_list.test.js && node tests/unit/tags_create.test.js && node tests/unit/tags_update.test.js && node tests/unit/tags_delete.test.js && node tests/unit/notes_get.test.js && node tests/unit/notes_update.test.js && node tests/unit/payees_common_list.test.js && node tests/unit/transactions_update_guard.test.js && node tests/unit/entities_search.test.js && node tests/unit/transactions_import_schema.test.js && node tests/unit/tool_schema_shape.test.js && node tests/unit/zod_error_format.test.js && node tests/unit/tool_count_sync.test.js && node tests/unit/stdio_transport.test.js && node tests/unit/logger_structured.test.js && node tests/unit/logger_redaction.test.js && node tests/unit/logger_correlation.test.js && node tests/unit/check_coverage.test.js",
|
|
34
34
|
"test:adapter": "npm run build && node dist/src/tests_adapter_runner.js",
|
|
35
35
|
"test:e2e": "npx playwright test",
|
|
36
36
|
"test:e2e:docker": "./tests/e2e/run-docker-e2e.sh",
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
// Shared recurrence-config schema for Actual schedules. Used by both actual_schedules_create
|
|
3
|
+
// and actual_schedules_update so the two tools agree on the same shape and publish a typed
|
|
4
|
+
// `date` branch in tools/list (#225). This mirrors the config Actual's `@actual-app/api`
|
|
5
|
+
// accepts for a recurring schedule; it is a closed object so a malformed config gets an
|
|
6
|
+
// actionable validation error rather than being forwarded unshaped.
|
|
7
|
+
export const RecurConfigSchema = z.object({
|
|
8
|
+
frequency: z.enum(['daily', 'weekly', 'monthly', 'yearly'])
|
|
9
|
+
.describe('How often the schedule repeats'),
|
|
10
|
+
start: z.string().regex(/^\d{4}-\d{2}-\d{2}$/)
|
|
11
|
+
.describe('Start date in YYYY-MM-DD format'),
|
|
12
|
+
endMode: z.enum(['never', 'after_n_occurrences', 'on_date'])
|
|
13
|
+
.describe('When the schedule stops: never, after N occurrences, or on a specific date'),
|
|
14
|
+
interval: z.number().int().positive().optional()
|
|
15
|
+
.describe('Every N periods. Default: 1 (every period)'),
|
|
16
|
+
skipWeekend: z.boolean().optional()
|
|
17
|
+
.describe('If true, occurrence is moved when it falls on a weekend'),
|
|
18
|
+
weekendSolveMode: z.enum(['before', 'after']).optional()
|
|
19
|
+
.describe('Move to Friday before or Monday after the weekend. Requires skipWeekend: true'),
|
|
20
|
+
endOccurrences: z.number().int().positive().optional()
|
|
21
|
+
.describe('Number of occurrences before stopping. Required when endMode is after_n_occurrences'),
|
|
22
|
+
endDate: z.string().regex(/^\d{4}-\d{2}-\d{2}$/).optional()
|
|
23
|
+
.describe('Date (YYYY-MM-DD) after which the schedule stops. Required when endMode is on_date'),
|
|
24
|
+
});
|
|
@@ -1,24 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import adapter from '../lib/actual-adapter.js';
|
|
3
3
|
import { UUID_PATTERN } from '../lib/constants.js';
|
|
4
|
-
|
|
5
|
-
frequency: z.enum(['daily', 'weekly', 'monthly', 'yearly'])
|
|
6
|
-
.describe('How often the schedule repeats'),
|
|
7
|
-
start: z.string().regex(/^\d{4}-\d{2}-\d{2}$/)
|
|
8
|
-
.describe('Start date in YYYY-MM-DD format'),
|
|
9
|
-
endMode: z.enum(['never', 'after_n_occurrences', 'on_date'])
|
|
10
|
-
.describe('When the schedule stops: never, after N occurrences, or on a specific date'),
|
|
11
|
-
interval: z.number().int().positive().optional()
|
|
12
|
-
.describe('Every N periods. Default: 1 (every period)'),
|
|
13
|
-
skipWeekend: z.boolean().optional()
|
|
14
|
-
.describe('If true, occurrence is moved when it falls on a weekend'),
|
|
15
|
-
weekendSolveMode: z.enum(['before', 'after']).optional()
|
|
16
|
-
.describe('Move to Friday before or Monday after the weekend. Requires skipWeekend: true'),
|
|
17
|
-
endOccurrences: z.number().int().positive().optional()
|
|
18
|
-
.describe('Number of occurrences before stopping. Required when endMode is after_n_occurrences'),
|
|
19
|
-
endDate: z.string().regex(/^\d{4}-\d{2}-\d{2}$/).optional()
|
|
20
|
-
.describe('Date (YYYY-MM-DD) after which the schedule stops. Required when endMode is on_date'),
|
|
21
|
-
});
|
|
4
|
+
import { RecurConfigSchema } from '../lib/schemas/recur.js';
|
|
22
5
|
const InputSchema = z.object({
|
|
23
6
|
name: z.string().optional()
|
|
24
7
|
.describe('Unique display name for the schedule'),
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import adapter from '../lib/actual-adapter.js';
|
|
3
3
|
import { UUID_PATTERN } from '../lib/constants.js';
|
|
4
|
+
import { RecurConfigSchema } from '../lib/schemas/recur.js';
|
|
4
5
|
const InputSchema = z.object({
|
|
5
6
|
id: z.string().regex(UUID_PATTERN, 'Invalid UUID format')
|
|
6
7
|
.describe('UUID of the schedule to update (from actual_schedules_get)'),
|
|
@@ -15,10 +16,12 @@ const InputSchema = z.object({
|
|
|
15
16
|
amountOp: z.enum(['is', 'isapprox', 'isbetween']).optional()
|
|
16
17
|
.describe('How to match the amount'),
|
|
17
18
|
date: z.union([
|
|
18
|
-
z.string().regex(/^\d{4}-\d{2}-\d{2}$/)
|
|
19
|
-
|
|
19
|
+
z.string().regex(/^\d{4}-\d{2}-\d{2}$/)
|
|
20
|
+
.describe('YYYY-MM-DD: one-off schedule on this specific date'),
|
|
21
|
+
RecurConfigSchema
|
|
22
|
+
.describe('RecurConfig object (frequency, start, endMode, ...): recurring schedule'),
|
|
20
23
|
]).optional()
|
|
21
|
-
.describe('New date string (YYYY-MM-DD) or RecurConfig object'),
|
|
24
|
+
.describe('New date string (YYYY-MM-DD) or RecurConfig object. Set resetNextDate: true when changing this.'),
|
|
22
25
|
posts_transaction: z.boolean().optional()
|
|
23
26
|
.describe('Whether Actual auto-posts a transaction on each occurrence'),
|
|
24
27
|
completed: z.boolean().optional()
|
|
@@ -1,10 +1,32 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { CommonSchemas } from '../lib/schemas/common.js';
|
|
2
3
|
import adapter from '../lib/actual-adapter.js';
|
|
3
|
-
//
|
|
4
|
-
//
|
|
4
|
+
// A single transaction to import. `date` and `amount` are required; the rest are optional.
|
|
5
|
+
// `looseObject` keeps the schema OPEN (additionalProperties is not false) so legitimate
|
|
6
|
+
// Actual `TransactionInput` fields that are not enumerated here (e.g. `subtransactions`,
|
|
7
|
+
// `transfer_id`, `reconciled`) are passed through rather than rejected. (#217)
|
|
8
|
+
const TxItemSchema = z.looseObject({
|
|
9
|
+
date: CommonSchemas.date,
|
|
10
|
+
amount: CommonSchemas.amountCents,
|
|
11
|
+
payee: CommonSchemas.payeeId.optional(),
|
|
12
|
+
payee_name: z.string().optional().describe('Payee name (alternative to payee ID)'),
|
|
13
|
+
imported_payee: z.string().optional().describe('Original payee name from the source'),
|
|
14
|
+
category: CommonSchemas.categoryId.optional(),
|
|
15
|
+
notes: CommonSchemas.notes,
|
|
16
|
+
cleared: CommonSchemas.cleared,
|
|
17
|
+
imported_id: z.string().optional().describe('Stable source ID; used to de-duplicate on re-import'),
|
|
18
|
+
});
|
|
19
|
+
// #217: `txs` was previously `z.unknown()`, which serialised to an empty `{}` JSON Schema in
|
|
20
|
+
// `tools/list`. Schema-driven MCP clients then had no shape for `txs` and sent it in a form
|
|
21
|
+
// the handler could not use, so `@actual-app/api` threw "`date` is required when adding a
|
|
22
|
+
// transaction" even for valid payloads. Typing it as an array of `TxItemSchema` publishes a
|
|
23
|
+
// proper `type: "array"` schema and makes the tool usable from those clients.
|
|
5
24
|
const InputSchema = z.object({
|
|
6
|
-
accountId:
|
|
7
|
-
txs: z
|
|
25
|
+
accountId: CommonSchemas.accountId.describe('Destination account UUID to import into'),
|
|
26
|
+
txs: z
|
|
27
|
+
.array(TxItemSchema)
|
|
28
|
+
.min(1)
|
|
29
|
+
.describe('Transactions to import. Each requires date (YYYY-MM-DD) and amount (integer cents).'),
|
|
8
30
|
});
|
|
9
31
|
const tool = {
|
|
10
32
|
name: 'actual_transactions_import',
|
|
@@ -12,9 +34,7 @@ const tool = {
|
|
|
12
34
|
inputSchema: InputSchema,
|
|
13
35
|
call: async (args, _meta) => {
|
|
14
36
|
const parsed = InputSchema.parse(args || {});
|
|
15
|
-
const
|
|
16
|
-
const txs = parsed.txs;
|
|
17
|
-
const result = await adapter.importTransactions(accountId, txs);
|
|
37
|
+
const result = await adapter.importTransactions(parsed.accountId, parsed.txs);
|
|
18
38
|
return { result };
|
|
19
39
|
},
|
|
20
40
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "actual-mcp-server",
|
|
3
3
|
"displayName": "Actual MCP Server",
|
|
4
|
-
"version": "0.6.
|
|
4
|
+
"version": "0.6.50",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=20.0.0",
|
|
7
7
|
"npm": ">=10.0.0"
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"verify-tools": "npm run build && node scripts/verify-tools.js",
|
|
31
31
|
"check:coverage": "node scripts/list-actual-api-methods.mjs",
|
|
32
32
|
"direct-sync": "node scripts/direct-sync/bank-sync-direct.mjs",
|
|
33
|
-
"test:unit-js": "node tests/unit/transactions_create.test.js && node tests/unit/generated_tools.smoke.test.js && node tests/unit/schema_validation.test.js && node tests/unit/config_https_validation.test.js && node tests/unit/config_insecure_upstream.test.js && node tests/unit/auth-acl.test.js && node tests/unit/bug76.test.js && node tests/unit/budgets_setAmount.test.js && node tests/unit/budgets_transfer.test.js && node tests/unit/transactions_uncategorized.test.js && node tests/unit/httpServer_session_init.test.js && node tests/unit/httpServer_session_not_found.test.js && node tests/unit/manual_mcp_client_retry.test.js && node tests/unit/manual_mcp_client_session.test.js && node tests/unit/manual_mcp_client_circuit.test.js && node tests/unit/manual_runner_killswitch.test.js && node tests/unit/adapter_auth_rate_limit.test.js && node tests/unit/adapter_session_reuse.test.js && node tests/unit/retry_classifier.test.js && node tests/unit/adapter_module_surface.test.js && node tests/unit/adapter_nonidempotent_no_retry.test.js && node tests/unit/pool_liveness.test.js && node tests/unit/pool_shutdown_all.test.js && node tests/unit/query_where_operators.test.js && node tests/unit/query_run_validation.test.js && node tests/unit/adapter_with_write_session.test.js && node tests/unit/category_groups_delete.test.js && node tests/unit/rules_delete.test.js && node tests/unit/schedules_delete.test.js && node tests/unit/payees_delete.test.js && node tests/unit/rules_create_or_update.test.js && node tests/unit/unhandled-rejection.test.js && node tests/unit/rejection-allowlist-purity.test.js && node tests/unit/httpServer_bearer_auth.test.js && node tests/unit/httpServer_oidc_audience.test.js && node tests/unit/httpServer_oidc_auth_verification.test.js && node tests/unit/httpServer_body_limit.test.js && node tests/unit/adapter_write_pool_cooperation.test.js && node tests/unit/budget_acl_enforcement.test.js && node tests/unit/budget_preference_store.test.js && node tests/unit/budget_preference_restore.test.js && node tests/unit/tags_list.test.js && node tests/unit/tags_create.test.js && node tests/unit/tags_update.test.js && node tests/unit/tags_delete.test.js && node tests/unit/notes_get.test.js && node tests/unit/notes_update.test.js && node tests/unit/payees_common_list.test.js && node tests/unit/transactions_update_guard.test.js && node tests/unit/entities_search.test.js && node tests/unit/zod_error_format.test.js && node tests/unit/tool_count_sync.test.js && node tests/unit/stdio_transport.test.js && node tests/unit/logger_structured.test.js && node tests/unit/logger_redaction.test.js && node tests/unit/logger_correlation.test.js && node tests/unit/check_coverage.test.js",
|
|
33
|
+
"test:unit-js": "node tests/unit/transactions_create.test.js && node tests/unit/generated_tools.smoke.test.js && node tests/unit/schema_validation.test.js && node tests/unit/config_https_validation.test.js && node tests/unit/config_insecure_upstream.test.js && node tests/unit/auth-acl.test.js && node tests/unit/bug76.test.js && node tests/unit/budgets_setAmount.test.js && node tests/unit/budgets_transfer.test.js && node tests/unit/transactions_uncategorized.test.js && node tests/unit/httpServer_session_init.test.js && node tests/unit/httpServer_session_not_found.test.js && node tests/unit/manual_mcp_client_retry.test.js && node tests/unit/manual_mcp_client_session.test.js && node tests/unit/manual_mcp_client_circuit.test.js && node tests/unit/manual_runner_killswitch.test.js && node tests/unit/adapter_auth_rate_limit.test.js && node tests/unit/adapter_session_reuse.test.js && node tests/unit/retry_classifier.test.js && node tests/unit/adapter_module_surface.test.js && node tests/unit/adapter_nonidempotent_no_retry.test.js && node tests/unit/pool_liveness.test.js && node tests/unit/pool_shutdown_all.test.js && node tests/unit/query_where_operators.test.js && node tests/unit/query_run_validation.test.js && node tests/unit/adapter_with_write_session.test.js && node tests/unit/category_groups_delete.test.js && node tests/unit/rules_delete.test.js && node tests/unit/schedules_delete.test.js && node tests/unit/payees_delete.test.js && node tests/unit/rules_create_or_update.test.js && node tests/unit/unhandled-rejection.test.js && node tests/unit/rejection-allowlist-purity.test.js && node tests/unit/httpServer_bearer_auth.test.js && node tests/unit/httpServer_oidc_audience.test.js && node tests/unit/httpServer_oidc_auth_verification.test.js && node tests/unit/httpServer_body_limit.test.js && node tests/unit/adapter_write_pool_cooperation.test.js && node tests/unit/budget_acl_enforcement.test.js && node tests/unit/budget_preference_store.test.js && node tests/unit/budget_preference_restore.test.js && node tests/unit/tags_list.test.js && node tests/unit/tags_create.test.js && node tests/unit/tags_update.test.js && node tests/unit/tags_delete.test.js && node tests/unit/notes_get.test.js && node tests/unit/notes_update.test.js && node tests/unit/payees_common_list.test.js && node tests/unit/transactions_update_guard.test.js && node tests/unit/entities_search.test.js && node tests/unit/transactions_import_schema.test.js && node tests/unit/tool_schema_shape.test.js && node tests/unit/zod_error_format.test.js && node tests/unit/tool_count_sync.test.js && node tests/unit/stdio_transport.test.js && node tests/unit/logger_structured.test.js && node tests/unit/logger_redaction.test.js && node tests/unit/logger_correlation.test.js && node tests/unit/check_coverage.test.js",
|
|
34
34
|
"test:adapter": "npm run build && node dist/src/tests_adapter_runner.js",
|
|
35
35
|
"test:e2e": "npx playwright test",
|
|
36
36
|
"test:e2e:docker": "./tests/e2e/run-docker-e2e.sh",
|