@peac/mcp-server 0.16.3 → 0.16.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 +1 -1
- package/dist/cli.cjs +50 -11
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.mjs +50 -11
- package/dist/cli.mjs.map +1 -1
- package/dist/http-transport.d.ts +7 -1
- package/dist/http-transport.d.ts.map +1 -1
- package/dist/index.cjs +6 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +6 -2
- package/dist/index.mjs.map +1 -1
- package/dist/infra/constants.d.ts +1 -1
- package/dist/server.d.ts +1 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/session-manager.d.ts +2 -0
- package/dist/session-manager.d.ts.map +1 -1
- package/manifest.json +1 -1
- package/package.json +7 -7
- package/server.json +2 -11
- package/smithery.yaml +1 -1
package/dist/http-transport.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* MCP Streamable HTTP transport
|
|
3
3
|
*
|
|
4
|
-
* Adds HTTP transport alongside stdio. Unprotected mode only
|
|
4
|
+
* Adds HTTP transport alongside stdio. Unprotected mode only.
|
|
5
5
|
* Each session gets its own McpServer + transport (CVE-2026-25536 defense).
|
|
6
6
|
*
|
|
7
7
|
* Endpoints:
|
|
@@ -55,11 +55,17 @@ export interface HttpTransportOptions {
|
|
|
55
55
|
/** Factory to create new McpServer instances (one per session) */
|
|
56
56
|
serverFactory: () => McpServer;
|
|
57
57
|
}
|
|
58
|
+
/** Upper bound on tracked rate-limit windows; the oldest window is evicted first. */
|
|
59
|
+
export declare const MAX_RATE_LIMIT_KEYS = 10000;
|
|
60
|
+
/** Rate-limit key: a valid id of a live session, otherwise the client address. */
|
|
61
|
+
export declare function rateLimitKeyFor(sessionId: string | undefined, clientIp: string, isLiveSession: (id: string) => boolean): string;
|
|
58
62
|
/**
|
|
59
63
|
* Create and start an HTTP server for MCP Streamable HTTP transport.
|
|
60
64
|
* Returns a cleanup function to shut everything down.
|
|
61
65
|
*/
|
|
62
66
|
export declare function createHttpTransport(options: HttpTransportOptions): Promise<{
|
|
63
67
|
cleanup: () => Promise<void>;
|
|
68
|
+
/** Number of tracked rate-limit windows (test seam). */
|
|
69
|
+
rateLimitKeyCount: () => number;
|
|
64
70
|
}>;
|
|
65
71
|
//# sourceMappingURL=http-transport.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http-transport.d.ts","sourceRoot":"","sources":["../src/http-transport.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;
|
|
1
|
+
{"version":3,"file":"http-transport.d.ts","sourceRoot":"","sources":["../src/http-transport.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAKzE;;;;;;;;;;;;;;;GAeG;AACH,MAAM,MAAM,eAAe,GAAG,KAAK,GAAG,UAAU,GAAG,WAAW,GAAG,SAAS,GAAG,KAAK,GAAG,MAAM,CAAC;AAE5F,MAAM,WAAW,oBAAoB;IACnC,uCAAuC;IACvC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,0DAA0D;IAC1D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,+CAA+C;IAC/C,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,oEAAoE;IACpE,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;IAChC,8DAA8D;IAC9D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,8DAA8D;IAC9D,UAAU,CAAC,EAAE,eAAe,CAAC;IAC7B,2CAA2C;IAC3C,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gEAAgE;IAChE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,yCAAyC;IACzC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,4CAA4C;IAC5C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,8CAA8C;IAC9C,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,kEAAkE;IAClE,aAAa,EAAE,MAAM,SAAS,CAAC;CAChC;AAYD,qFAAqF;AACrF,eAAO,MAAM,mBAAmB,QAAS,CAAC;AAkC1C,kFAAkF;AAClF,wBAAgB,eAAe,CAC7B,SAAS,EAAE,MAAM,GAAG,SAAS,EAC7B,QAAQ,EAAE,MAAM,EAChB,aAAa,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,GACrC,MAAM,CAIR;AAmED;;;GAGG;AACH,wBAAsB,mBAAmB,CAAC,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC;IAChF,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7B,wDAAwD;IACxD,iBAAiB,EAAE,MAAM,MAAM,CAAC;CACjC,CAAC,CA0YD"}
|
package/dist/index.cjs
CHANGED
|
@@ -34,7 +34,7 @@ var nodePath__namespace = /*#__PURE__*/_interopNamespace(nodePath);
|
|
|
34
34
|
|
|
35
35
|
// src/infra/constants.ts
|
|
36
36
|
var SERVER_NAME = "peac-mcp-server";
|
|
37
|
-
var SERVER_VERSION = "0.16.
|
|
37
|
+
var SERVER_VERSION = "0.16.5";
|
|
38
38
|
var MCP_PROTOCOL_VERSION = "2025-11-25";
|
|
39
39
|
var DEFAULT_MAX_JWS_BYTES = 16384;
|
|
40
40
|
var DEFAULT_MAX_RESPONSE_BYTES = 65536;
|
|
@@ -1249,6 +1249,7 @@ var BUNDLE_TOOL_ANNOTATIONS = {
|
|
|
1249
1249
|
openWorldHint: true
|
|
1250
1250
|
};
|
|
1251
1251
|
var MAX_INPUT_DEPTH = 10;
|
|
1252
|
+
var MAX_TOOL_INPUT_ELEMENTS = 1024;
|
|
1252
1253
|
function errorCallToolResult(meta, code, message) {
|
|
1253
1254
|
const errorDef = kernel.ERRORS[code];
|
|
1254
1255
|
return {
|
|
@@ -1357,7 +1358,10 @@ function createPeacMcpServer(options) {
|
|
|
1357
1358
|
{ name: SERVER_NAME, version },
|
|
1358
1359
|
// listChanged: false -- tool set is static per server instance (determined
|
|
1359
1360
|
// at startup from CLI flags). The server never emits notifications/tools/list_changed.
|
|
1360
|
-
{
|
|
1361
|
+
{
|
|
1362
|
+
capabilities: { tools: { listChanged: false } },
|
|
1363
|
+
maxToolInputElements: MAX_TOOL_INPUT_ELEMENTS
|
|
1364
|
+
}
|
|
1361
1365
|
);
|
|
1362
1366
|
const register = server.registerTool.bind(server);
|
|
1363
1367
|
register(
|