actual-mcp-server 0.22.4 → 0.22.6
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 +2 -2
- package/dist/src/config.js +27 -1
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -496,7 +496,7 @@ All configuration is via environment variables. Copy `.env.example` to `.env` to
|
|
|
496
496
|
| `MCP_TRANSPORT_MODE` | `--http` | No | Transport mode. Only `--http` is a valid value; stdio is selected via the `--stdio` CLI flag, not this var |
|
|
497
497
|
| `MCP_HTTP_PATH` | `/http` | No | HTTP endpoint routing path |
|
|
498
498
|
| `MCP_BRIDGE_HTTP_PATH` | same as `MCP_HTTP_PATH` | No | Advertised HTTP path shown to clients (set when a reverse proxy rewrites the path) |
|
|
499
|
-
| `MCP_HTTP_BODY_LIMIT` | `512kb` | No | Maximum accepted JSON-RPC request body size (e.g. `512kb`, `1mb`) |
|
|
499
|
+
| `MCP_HTTP_BODY_LIMIT` | `512kb` | No | Maximum accepted JSON-RPC request body size (e.g. `512kb`, `1mb`, `1048576`). Validated at startup: an invalid, zero or overflowing size refuses to start naming the variable (#466) |
|
|
500
500
|
| **Session Management** ||||
|
|
501
501
|
| `USE_CONNECTION_POOL` | `true` | No | Enable session-based connection pooling |
|
|
502
502
|
| `MAX_CONCURRENT_SESSIONS` | `15` | No | Maximum concurrent MCP sessions allowed |
|
|
@@ -786,7 +786,7 @@ The software is provided **as-is**, without warranty of any kind. The author acc
|
|
|
786
786
|
|
|
787
787
|
---
|
|
788
788
|
|
|
789
|
-
**Version:** 0.22.
|
|
789
|
+
**Version:** 0.22.6 | **Tool Count:** 81 (verified LibreChat-compatible)
|
|
790
790
|
|
|
791
791
|
## Sponsor
|
|
792
792
|
|
package/dist/src/config.js
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { parseIdentityMap } from './auth/identity-map.js';
|
|
3
|
+
// #466: the byte count body-parser will ACTUALLY enforce for MCP_HTTP_BODY_LIMIT, or
|
|
4
|
+
// null when the value must be refused. Mirrors `bytes.parse` (what body-parser uses)
|
|
5
|
+
// without importing that transitive package: floor(number * unit), units b and kb
|
|
6
|
+
// through pb in powers of 1024. Stricter than `bytes` in exactly the places `bytes`
|
|
7
|
+
// silently misreads: surrounding whitespace (" 512kb" is 512 bytes), trailing text
|
|
8
|
+
// ("10 potatoes" is 10), separators ("1,000" is 1), a decimal with no unit or with b
|
|
9
|
+
// ("1.5" is 1). The COMPUTED size is what is bounded, because a tiny fraction floors to
|
|
10
|
+
// a 0-byte cap (every request 413) and a huge value is Infinity, which body-parser 2.3.0
|
|
11
|
+
// accepts as NO cap at all: GHSA-v422-hmwv-36x6 by another route.
|
|
12
|
+
const BODY_LIMIT_UNITS = { b: 1, kb: 2 ** 10, mb: 2 ** 20, gb: 2 ** 30, tb: 2 ** 40, pb: 2 ** 50 };
|
|
13
|
+
const BODY_LIMIT_RE = new RegExp(`^(\\d+(?:\\.\\d+)?) *(${Object.keys(BODY_LIMIT_UNITS).join('|')})?$`, 'i');
|
|
14
|
+
export function parseStrictByteSize(value) {
|
|
15
|
+
const m = BODY_LIMIT_RE.exec(value);
|
|
16
|
+
if (!m)
|
|
17
|
+
return null;
|
|
18
|
+
const unit = (m[2] ?? 'b').toLowerCase();
|
|
19
|
+
if (unit === 'b' && m[1].includes('.'))
|
|
20
|
+
return null;
|
|
21
|
+
const n = Math.floor(parseFloat(m[1]) * BODY_LIMIT_UNITS[unit]);
|
|
22
|
+
return Number.isSafeInteger(n) && n >= 1 ? n : null;
|
|
23
|
+
}
|
|
3
24
|
export const configSchema = z.object({
|
|
4
25
|
ACTUAL_SERVER_URL: z.string().url(),
|
|
5
26
|
ACTUAL_PASSWORD: z.string().default(''),
|
|
@@ -91,7 +112,12 @@ export const configSchema = z.object({
|
|
|
91
112
|
// express.json({ limit }). Express accepts a byte string like '512kb' or '2mb'.
|
|
92
113
|
// Default 512kb is generous headroom over the largest legitimate batch payload
|
|
93
114
|
// while bounding the memory-exhaustion surface. Raise it for bulk-import jobs.
|
|
94
|
-
|
|
115
|
+
// #466: validated HERE, because body-parser 2.3.0 throws an opaque TypeError at HTTP
|
|
116
|
+
// startup on an unparseable limit (2.2.x silently ran with no cap), and some values
|
|
117
|
+
// it still silently misreads. Refused, never defaulted away. stdio parses this file
|
|
118
|
+
// too, so a bad value refuses stdio startup as well (as AUTH_BUDGET_ACL_CLAIM does).
|
|
119
|
+
MCP_HTTP_BODY_LIMIT: z.string().default('512kb').refine((v) => parseStrictByteSize(v) !== null, 'MCP_HTTP_BODY_LIMIT must be a positive byte size such as 512kb, 1mb or 1048576 (units b, kb, mb, gb, tb, pb; ' +
|
|
120
|
+
'no spaces around it, no separators; at least 1 byte and at most 9007199254740991 bytes) (#466)'),
|
|
95
121
|
MAX_CONCURRENT_SESSIONS: z.string().default('15').transform(val => parseInt(val, 10)),
|
|
96
122
|
// --- OIDC / mcp-auth (CF-5) ---
|
|
97
123
|
// Set AUTH_PROVIDER=oidc to enable JWT validation via mcp-auth.
|
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.22.
|
|
4
|
+
"version": "0.22.6",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=22.0.0",
|
|
7
7
|
"npm": ">=10.0.0"
|
|
@@ -74,20 +74,20 @@
|
|
|
74
74
|
"dotenv": "^17.4.2",
|
|
75
75
|
"express": "^5.2.1",
|
|
76
76
|
"fuse.js": "^7.4.2",
|
|
77
|
-
"jose": "^6.2.
|
|
77
|
+
"jose": "^6.2.12",
|
|
78
78
|
"mcp-auth": "^0.2.0",
|
|
79
79
|
"winston": "^3.18.3",
|
|
80
80
|
"winston-daily-rotate-file": "^5.0.0",
|
|
81
|
-
"zod": "^4.5
|
|
81
|
+
"zod": "^4.6.5"
|
|
82
82
|
},
|
|
83
83
|
"optionalDependencies": {
|
|
84
84
|
"prom-client": "*"
|
|
85
85
|
},
|
|
86
86
|
"devDependencies": {
|
|
87
|
-
"@playwright/test": "^1.
|
|
87
|
+
"@playwright/test": "^1.63.0",
|
|
88
88
|
"@types/express": "^5.0.3",
|
|
89
|
-
"@types/node": "^26.
|
|
90
|
-
"knip": "^6.
|
|
89
|
+
"@types/node": "^26.6.2",
|
|
90
|
+
"knip": "^6.37.0",
|
|
91
91
|
"node-fetch": "^3.3.2",
|
|
92
92
|
"tsconfig-paths": "^4.2.0",
|
|
93
93
|
"typescript": "^7.0.2"
|