bankmcp 0.1.4 → 0.1.5

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
@@ -71,6 +71,12 @@ Your browser will warn once about the certificate on localhost, which the
71
71
  server made for itself because Enable Banking requires https for the bank
72
72
  redirect. Continue past it. Say "connect my bank" and log in at your bank.
73
73
 
74
+ To avoid the warning altogether, use a certificate your browser already
75
+ trusts: [mkcert](https://github.com/FiloSottile/mkcert) makes one with
76
+ `mkcert localhost 127.0.0.1`; point `TLS_CERT_PATH` and `TLS_KEY_PATH` at the
77
+ two files and the server uses them instead of generating its own. BankMCP™
78
+ itself does not touch your system's trust store.
79
+
74
80
  State lives in `~/.bankmcp`. Delete the folder to forget everything.
75
81
 
76
82
  ### On a server
@@ -286,20 +292,26 @@ Requires Node 24 or newer (runs TypeScript directly, no build step).
286
292
  ## Layout
287
293
 
288
294
  ```
289
- src/server.ts Express: /mcp behind OAuth, OAuth endpoints, /callback, status page
290
- src/auth.ts single-user OAuth provider, password login page
291
- src/mcp.ts McpServer factory (tools + prompts + instructions)
295
+ src/stdio.ts entry point for npx bankmcp: stdio server plus the localhost https side
296
+ src/server.ts entry point for a hosted deployment: OAuth, /mcp, callback, status page
297
+ src/app.ts the Express app shared by both entry points
298
+ src/local.ts localhost https server and self-signed certificate for local mode
299
+ src/mcp.ts McpServer factory (tools, prompts, instructions)
292
300
  src/tools.ts the MCP tools
293
301
  src/prompts.ts the MCP prompts
294
302
  src/watcher.ts background rule checks and notifications
303
+ src/auth.ts single-user OAuth provider
304
+ src/setup.ts first-run setup: validates and stores id, key and password
305
+ src/pages.ts the HTML pages: setup, sign-in, connected, status, privacy, terms
306
+ src/config.ts environment and data-directory configuration
295
307
  src/enablebanking.ts JWT signing and a thin typed API client
296
308
  src/store.ts the JSON state file
297
309
  src/data.ts shaping balances and transactions for an assistant
298
- src/stdio.ts local entry point (stdio, used by `npx bankmcp`)
299
- src/local.ts localhost https server for setup and the bank redirect in local mode
300
- src/app.ts the Express app shared by both modes
301
310
  src/cli.ts check, hash-password, watch
302
- plugin/ Claude Code plugin with the bank skill
311
+ bin/bankmcp.js the npx entry; dispatches to stdio or cli
312
+ scripts/ build-mcpb.sh (Claude Desktop bundle), local-chat.ts (Ollama bridge)
313
+ plugin/ Claude Code plugin: setup and deploy skills, bank skill
314
+ docs/ landing page (GitHub Pages, bankmcp.dk)
303
315
  ```
304
316
 
305
317
  ## What this is, and is not
package/bin/bankmcp.js CHANGED
@@ -5,4 +5,12 @@ if (major < 24) {
5
5
  console.error(`BankMCP needs Node 24 or newer (you have ${process.versions.node}).`);
6
6
  process.exit(1);
7
7
  }
8
- await import("../dist/lib/stdio.js");
8
+ // A bare `bankmcp` is the stdio server an MCP client launches. Anything with
9
+ // arguments is a command for the person at the keyboard, and those look in the
10
+ // same place the local server keeps its state.
11
+ if (process.argv.length > 2) {
12
+ process.env.BANKMCP_LOCAL ??= "1";
13
+ await import("../dist/lib/cli.js");
14
+ } else {
15
+ await import("../dist/lib/stdio.js");
16
+ }
package/dist/lib/cli.js CHANGED
@@ -94,6 +94,6 @@ switch (command) {
94
94
  break;
95
95
  }
96
96
  default:
97
- console.log("Usage: node src/cli.ts <hash-password [password] | check | watch [--force]>");
97
+ console.log("Usage: bankmcp <hash-password [password] | check | watch [--force]>");
98
98
  process.exit(command ? 1 : 0);
99
99
  }
package/dist/lib/local.js CHANGED
@@ -6,7 +6,7 @@ import { X509Certificate } from "node:crypto";
6
6
  import { join } from "node:path";
7
7
  import { createServer as createHttpsServer } from "node:https";
8
8
  import selfsigned from "selfsigned";
9
- import { config } from "./config.js";
9
+ import { config, tlsOptions } from "./config.js";
10
10
  import { createApp } from "./app.js";
11
11
  let server;
12
12
  let starting;
@@ -24,6 +24,12 @@ export function certificateStillGood(pem, now = Date.now()) {
24
24
  }
25
25
  }
26
26
  async function certificate() {
27
+ // An explicitly configured certificate wins, so anyone who would rather use
28
+ // one their browser already trusts (mkcert and friends) can point at it
29
+ // instead of trusting the generated one. `server.ts` already honours these.
30
+ const configured = tlsOptions();
31
+ if (configured)
32
+ return configured;
27
33
  const certPath = join(config.dataDir, "localhost-cert.pem");
28
34
  const keyPath = join(config.dataDir, "localhost-key.pem");
29
35
  if (existsSync(certPath) && existsSync(keyPath)) {
package/dist/lib/mcp.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
2
  import { registerTools } from "./tools.js";
3
3
  import { registerPrompts } from "./prompts.js";
4
- export const VERSION = "0.1.4";
4
+ export const VERSION = "0.1.5";
5
5
  export function createServer() {
6
6
  const server = new McpServer({ name: "bank", version: VERSION }, {
7
7
  instructions: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bankmcp",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "BankMCP™: self-hosted, read-only MCP server that lets any AI assistant (Claude, ChatGPT, Mistral, Cursor, or a local model) answer questions about your own bank accounts via open banking (Enable Banking, PSD2)",
5
5
  "license": "MIT",
6
6
  "type": "module",