@bank-mcp/server 0.1.0 → 0.1.1
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/dist/server.js
CHANGED
|
@@ -42,7 +42,7 @@ const handlers = {
|
|
|
42
42
|
spending_summary: (args) => spendingSummary(spendingSummarySchema.parse(args)),
|
|
43
43
|
};
|
|
44
44
|
export async function startServer() {
|
|
45
|
-
const server = new Server({ name: "bank-mcp", version: "0.1.
|
|
45
|
+
const server = new Server({ name: "bank-mcp", version: "0.1.1" }, { capabilities: { tools: {} } });
|
|
46
46
|
server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
47
47
|
tools: TOOLS,
|
|
48
48
|
}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bank-mcp/server",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Banking data MCP server — give your AI assistant read-only access to bank accounts via pluggable providers",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -42,10 +42,10 @@
|
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@types/jsonwebtoken": "^9.0.0",
|
|
45
|
-
"@types/node": "^
|
|
46
|
-
"eslint": "^
|
|
45
|
+
"@types/node": "^25.3.0",
|
|
46
|
+
"eslint": "^10.0.1",
|
|
47
47
|
"typescript": "^5.7.0",
|
|
48
|
-
"vitest": "^
|
|
48
|
+
"vitest": "^4.0.18"
|
|
49
49
|
},
|
|
50
50
|
"engines": {
|
|
51
51
|
"node": ">=18.0.0"
|
|
@@ -54,5 +54,8 @@
|
|
|
54
54
|
"dist",
|
|
55
55
|
"README.md",
|
|
56
56
|
"LICENSE"
|
|
57
|
-
]
|
|
57
|
+
],
|
|
58
|
+
"publishConfig": {
|
|
59
|
+
"access": "public"
|
|
60
|
+
}
|
|
58
61
|
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { ZodObject, ZodRawShape } from "zod";
|
|
2
|
-
/**
|
|
3
|
-
* Minimal Zod → JSON Schema converter for MCP tool inputSchema.
|
|
4
|
-
*
|
|
5
|
-
* Handles the subset we actually use: objects with string, number,
|
|
6
|
-
* enum, and optional fields. No need for a full library.
|
|
7
|
-
*/
|
|
8
|
-
export declare function zodToJsonSchema(schema: ZodObject<ZodRawShape>): Record<string, unknown>;
|
|
9
|
-
//# sourceMappingURL=zod-to-json.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"zod-to-json.d.ts","sourceRoot":"","sources":["../../src/utils/zod-to-json.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAc,MAAM,KAAK,CAAC;AAE9D;;;;;GAKG;AACH,wBAAgB,eAAe,CAC7B,MAAM,EAAE,SAAS,CAAC,WAAW,CAAC,GAC7B,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAuBzB"}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Minimal Zod → JSON Schema converter for MCP tool inputSchema.
|
|
3
|
-
*
|
|
4
|
-
* Handles the subset we actually use: objects with string, number,
|
|
5
|
-
* enum, and optional fields. No need for a full library.
|
|
6
|
-
*/
|
|
7
|
-
export function zodToJsonSchema(schema) {
|
|
8
|
-
const shape = schema.shape;
|
|
9
|
-
const properties = {};
|
|
10
|
-
const required = [];
|
|
11
|
-
for (const [key, fieldDef] of Object.entries(shape)) {
|
|
12
|
-
const field = fieldDef;
|
|
13
|
-
const prop = zodFieldToJson(field);
|
|
14
|
-
properties[key] = prop;
|
|
15
|
-
if (!field.isOptional()) {
|
|
16
|
-
required.push(key);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
const result = {
|
|
20
|
-
type: "object",
|
|
21
|
-
properties,
|
|
22
|
-
};
|
|
23
|
-
if (required.length > 0) {
|
|
24
|
-
result.required = required;
|
|
25
|
-
}
|
|
26
|
-
return result;
|
|
27
|
-
}
|
|
28
|
-
function zodFieldToJson(field) {
|
|
29
|
-
const def = field._def;
|
|
30
|
-
// Unwrap optional
|
|
31
|
-
if (def.typeName === "ZodOptional") {
|
|
32
|
-
return zodFieldToJson(def.innerType);
|
|
33
|
-
}
|
|
34
|
-
// Unwrap default
|
|
35
|
-
if (def.typeName === "ZodDefault") {
|
|
36
|
-
return zodFieldToJson(def.innerType);
|
|
37
|
-
}
|
|
38
|
-
const result = {};
|
|
39
|
-
// Extract description
|
|
40
|
-
if (def.description) {
|
|
41
|
-
result.description = def.description;
|
|
42
|
-
}
|
|
43
|
-
switch (def.typeName) {
|
|
44
|
-
case "ZodString":
|
|
45
|
-
result.type = "string";
|
|
46
|
-
break;
|
|
47
|
-
case "ZodNumber":
|
|
48
|
-
result.type = "number";
|
|
49
|
-
break;
|
|
50
|
-
case "ZodBoolean":
|
|
51
|
-
result.type = "boolean";
|
|
52
|
-
break;
|
|
53
|
-
case "ZodEnum":
|
|
54
|
-
result.type = "string";
|
|
55
|
-
result.enum = def.values;
|
|
56
|
-
break;
|
|
57
|
-
default:
|
|
58
|
-
result.type = "string";
|
|
59
|
-
}
|
|
60
|
-
return result;
|
|
61
|
-
}
|
|
62
|
-
//# sourceMappingURL=zod-to-json.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"zod-to-json.js","sourceRoot":"","sources":["../../src/utils/zod-to-json.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAC7B,MAA8B;IAE9B,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;IAC3B,MAAM,UAAU,GAA4C,EAAE,CAAC;IAC/D,MAAM,QAAQ,GAAa,EAAE,CAAC;IAE9B,KAAK,MAAM,CAAC,GAAG,EAAE,QAAQ,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACpD,MAAM,KAAK,GAAG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