@crscreditapi/finstack-mcp-server 0.10.0-40e8ad4 → 0.10.0-80b4ec3

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/.env.example CHANGED
@@ -15,3 +15,4 @@ FINSTACK_CHATBASE_SECRET=
15
15
  # Support Autopsy observability: insert one row per tool call into the shared tool_calls table
16
16
  # (n8n Postgres). Leave unset to emit a JSON log line instead. TOOL_LOG=off disables both.
17
17
  TOOL_CALLS_DATABASE_URL=
18
+ # SSL is on by default (no sslmode needed in the URL). TOOL_CALLS_PGSSL=off for a local DB.
package/dist/toolLog.js CHANGED
@@ -12,7 +12,12 @@
12
12
  import { createHash } from 'node:crypto';
13
13
  import pg from 'pg';
14
14
  const ENABLED = (process.env.TOOL_LOG || 'on').toLowerCase() !== 'off';
15
- const DB_URL = process.env.TOOL_CALLS_DATABASE_URL || '';
15
+ // sslmode is stripped from the URL on purpose: pg >= 8.16 treats sslmode=require as
16
+ // verify-full and the RDS certificate chain is not in the container's trust store. SSL is
17
+ // on by default without chain verification (traffic stays inside the VPC);
18
+ // TOOL_CALLS_PGSSL=off disables it for a local database.
19
+ const DB_URL = (process.env.TOOL_CALLS_DATABASE_URL || '').replace(/[?&]sslmode=[^&]+/, '').replace(/\?$/, '');
20
+ const DB_SSL = (process.env.TOOL_CALLS_PGSSL || 'on').toLowerCase() === 'off' ? false : { rejectUnauthorized: false };
16
21
  const STREAM = (process.env.MCP_TRANSPORT || 'stdio') === 'http' ? process.stdout : process.stderr;
17
22
  let pool = null;
18
23
  let lastDbErrorAt = 0;
@@ -25,7 +30,7 @@ function getPool() {
25
30
  max: 2,
26
31
  idleTimeoutMillis: 30_000,
27
32
  connectionTimeoutMillis: 3_000,
28
- ssl: /sslmode=require/.test(DB_URL) ? { rejectUnauthorized: false } : undefined,
33
+ ssl: DB_SSL,
29
34
  });
30
35
  pool.on('error', (err) => warnDb(err));
31
36
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crscreditapi/finstack-mcp-server",
3
- "version": "0.10.0-40e8ad4",
3
+ "version": "0.10.0-80b4ec3",
4
4
  "description": "MCP server for Finstack",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",