sophos-central-mcp-server 0.8.6 → 0.8.8
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/LICENSE +0 -0
- package/README.md +2 -1
- package/dist/auth/token-manager.d.ts +0 -0
- package/dist/auth/token-manager.d.ts.map +0 -0
- package/dist/auth/token-manager.js +0 -0
- package/dist/auth/token-manager.js.map +0 -0
- package/dist/client/sophos-client.d.ts +0 -0
- package/dist/client/sophos-client.d.ts.map +0 -0
- package/dist/client/sophos-client.js +0 -0
- package/dist/client/sophos-client.js.map +0 -0
- package/dist/client/tenant-resolver.d.ts +0 -0
- package/dist/client/tenant-resolver.d.ts.map +0 -0
- package/dist/client/tenant-resolver.js +0 -0
- package/dist/client/tenant-resolver.js.map +0 -0
- package/dist/config/config.d.ts +1 -0
- package/dist/config/config.d.ts.map +1 -1
- package/dist/config/config.js +6 -0
- package/dist/config/config.js.map +1 -1
- package/dist/http-guard.d.ts +13 -1
- package/dist/http-guard.d.ts.map +1 -1
- package/dist/http-guard.js +27 -2
- package/dist/http-guard.js.map +1 -1
- package/dist/index.d.ts +0 -0
- package/dist/index.d.ts.map +0 -0
- package/dist/index.js +6 -4
- package/dist/index.js.map +1 -1
- package/dist/tools/accounts.d.ts +0 -0
- package/dist/tools/accounts.d.ts.map +0 -0
- package/dist/tools/accounts.js +0 -0
- package/dist/tools/accounts.js.map +0 -0
- package/dist/tools/admin-management.d.ts +0 -0
- package/dist/tools/admin-management.d.ts.map +0 -0
- package/dist/tools/admin-management.js +0 -0
- package/dist/tools/admin-management.js.map +0 -0
- package/dist/tools/alerts.d.ts +0 -0
- package/dist/tools/alerts.d.ts.map +0 -0
- package/dist/tools/alerts.js +0 -0
- package/dist/tools/alerts.js.map +0 -0
- package/dist/tools/audit-events.d.ts +0 -0
- package/dist/tools/audit-events.d.ts.map +0 -0
- package/dist/tools/audit-events.js +0 -0
- package/dist/tools/audit-events.js.map +0 -0
- package/dist/tools/business-automation.d.ts +0 -0
- package/dist/tools/business-automation.d.ts.map +0 -0
- package/dist/tools/business-automation.js +0 -0
- package/dist/tools/business-automation.js.map +0 -0
- package/dist/tools/cases.d.ts +0 -0
- package/dist/tools/cases.d.ts.map +0 -0
- package/dist/tools/cases.js +0 -0
- package/dist/tools/cases.js.map +0 -0
- package/dist/tools/cloud-security.d.ts +0 -0
- package/dist/tools/cloud-security.d.ts.map +0 -0
- package/dist/tools/cloud-security.js +0 -0
- package/dist/tools/cloud-security.js.map +0 -0
- package/dist/tools/detections.d.ts +0 -0
- package/dist/tools/detections.d.ts.map +0 -0
- package/dist/tools/detections.js +0 -0
- package/dist/tools/detections.js.map +0 -0
- package/dist/tools/directory.d.ts +0 -0
- package/dist/tools/directory.d.ts.map +0 -0
- package/dist/tools/directory.js +0 -0
- package/dist/tools/directory.js.map +0 -0
- package/dist/tools/dns-protection.d.ts +0 -0
- package/dist/tools/dns-protection.d.ts.map +0 -0
- package/dist/tools/dns-protection.js +0 -0
- package/dist/tools/dns-protection.js.map +0 -0
- package/dist/tools/email.d.ts +0 -0
- package/dist/tools/email.d.ts.map +0 -0
- package/dist/tools/email.js +0 -0
- package/dist/tools/email.js.map +0 -0
- package/dist/tools/endpoint-migrations.d.ts +0 -0
- package/dist/tools/endpoint-migrations.d.ts.map +0 -0
- package/dist/tools/endpoint-migrations.js +0 -0
- package/dist/tools/endpoint-migrations.js.map +0 -0
- package/dist/tools/endpoint-settings.d.ts +0 -0
- package/dist/tools/endpoint-settings.d.ts.map +0 -0
- package/dist/tools/endpoint-settings.js +0 -0
- package/dist/tools/endpoint-settings.js.map +0 -0
- package/dist/tools/endpoints.d.ts +0 -0
- package/dist/tools/endpoints.d.ts.map +0 -0
- package/dist/tools/endpoints.js +0 -0
- package/dist/tools/endpoints.js.map +0 -0
- package/dist/tools/exclusions.d.ts +0 -0
- package/dist/tools/exclusions.d.ts.map +0 -0
- package/dist/tools/exclusions.js +0 -0
- package/dist/tools/exclusions.js.map +0 -0
- package/dist/tools/firewall.d.ts +0 -0
- package/dist/tools/firewall.d.ts.map +0 -0
- package/dist/tools/firewall.js +0 -0
- package/dist/tools/firewall.js.map +0 -0
- package/dist/tools/fusion-cases.js +4 -4
- package/dist/tools/fusion-cases.js.map +1 -1
- package/dist/tools/groups.d.ts +0 -0
- package/dist/tools/groups.d.ts.map +0 -0
- package/dist/tools/groups.js +0 -0
- package/dist/tools/groups.js.map +0 -0
- package/dist/tools/health.d.ts +0 -0
- package/dist/tools/health.d.ts.map +0 -0
- package/dist/tools/health.js +0 -0
- package/dist/tools/health.js.map +0 -0
- package/dist/tools/helpers.d.ts +0 -0
- package/dist/tools/helpers.d.ts.map +0 -0
- package/dist/tools/helpers.js +0 -0
- package/dist/tools/helpers.js.map +0 -0
- package/dist/tools/licensing.d.ts +0 -0
- package/dist/tools/licensing.d.ts.map +0 -0
- package/dist/tools/licensing.js +0 -0
- package/dist/tools/licensing.js.map +0 -0
- package/dist/tools/live-discover.d.ts +0 -0
- package/dist/tools/live-discover.d.ts.map +0 -0
- package/dist/tools/live-discover.js +0 -0
- package/dist/tools/live-discover.js.map +0 -0
- package/dist/tools/mobile.d.ts +0 -0
- package/dist/tools/mobile.d.ts.map +0 -0
- package/dist/tools/mobile.js +0 -0
- package/dist/tools/mobile.js.map +0 -0
- package/dist/tools/partner.d.ts +0 -0
- package/dist/tools/partner.d.ts.map +0 -0
- package/dist/tools/partner.js +0 -0
- package/dist/tools/partner.js.map +0 -0
- package/dist/tools/policies.d.ts +0 -0
- package/dist/tools/policies.d.ts.map +0 -0
- package/dist/tools/policies.js +0 -0
- package/dist/tools/policies.js.map +0 -0
- package/dist/tools/siem.d.ts +0 -0
- package/dist/tools/siem.d.ts.map +0 -0
- package/dist/tools/siem.js +0 -0
- package/dist/tools/siem.js.map +0 -0
- package/dist/tools/switch.d.ts +0 -0
- package/dist/tools/switch.d.ts.map +0 -0
- package/dist/tools/switch.js +0 -0
- package/dist/tools/switch.js.map +0 -0
- package/dist/tools/tenants.d.ts +0 -0
- package/dist/tools/tenants.d.ts.map +0 -0
- package/dist/tools/tenants.js +0 -0
- package/dist/tools/tenants.js.map +0 -0
- package/dist/tools/user-activity.d.ts +0 -0
- package/dist/tools/user-activity.d.ts.map +0 -0
- package/dist/tools/user-activity.js +0 -0
- package/dist/tools/user-activity.js.map +0 -0
- package/dist/tools/web-filtering.d.ts +0 -0
- package/dist/tools/web-filtering.d.ts.map +0 -0
- package/dist/tools/web-filtering.js +0 -0
- package/dist/tools/web-filtering.js.map +0 -0
- package/dist/tools/wifi.d.ts +0 -0
- package/dist/tools/wifi.d.ts.map +0 -0
- package/dist/tools/wifi.js +0 -0
- package/dist/tools/wifi.js.map +0 -0
- package/dist/tools/xdr.d.ts +0 -0
- package/dist/tools/xdr.d.ts.map +0 -0
- package/dist/tools/xdr.js +0 -0
- package/dist/tools/xdr.js.map +0 -0
- package/dist/types/sophos.d.ts +0 -0
- package/dist/types/sophos.d.ts.map +0 -0
- package/dist/types/sophos.js +0 -0
- package/dist/types/sophos.js.map +0 -0
- package/docs/screenshots/tenant-health-detail.png +0 -0
- package/docs/screenshots/tenant-health-overview.png +0 -0
- package/docs/screenshots/tenant-listing.png +0 -0
- package/package.json +1 -1
package/LICENSE
CHANGED
|
File without changes
|
package/README.md
CHANGED
|
@@ -457,7 +457,7 @@ Sophos Central Cases REST API. Correct for a tenant that has not moved to Fusion
|
|
|
457
457
|
|
|
458
458
|
Sophos Fusion Cases GraphQL API v2. Case IDs are UUIDs; short IDs (`CSE00001`) are accepted and resolved. Severity is 2 informational, 4 low, 6 medium, 8 high, 10 critical. Detection severity inside the case summary is a 0 to 1 float, a different scale from both the case severity and the Classic REST 0 to 10 detection severity; none of them convert. There is no delete: close the case (with a verdict when its type needs one), then archive it.
|
|
459
459
|
|
|
460
|
-
`managed_by` is required on create and split, and must be `CUSTOMER` (self managed). Sophos MDR cases (`PROVIDER`) can't be created through the API by design, so the tools refuse `PROVIDER` before any call; raise an MDR service request in Sophos Fusion instead. The same goes for a case type the tenant pins to `PROVIDER`, such as `health_check`. `managed_by` cannot be changed afterwards, and a case created without it is unclaimed, so the tool never omits it. Detection and event IDs on the evidence tools are six section resource names (`alert://priv:event-filter:123456:1789526908712:<uuid>`), which `sophos_fusion_search_detections` returns. Evidence writes are queued jobs that land category by category (an add showed after about 5 seconds, a three category removal took about 25 seconds), so read the evidence back with a poll; adding a detection also attaches its linked asset and events, and removing it does not retract them (`remove_all` does). Comment @mentions (`@authorized_contacts`, `@customer`, `@sophos`) fire wherever they appear, including in prose, and an unrecognised token is dropped silently, so the comment tools read the stored mentions back. Tags are merged on update unless `replace_tags` is set. File deletion is soft. Split and merge are irreversible and need a confirmation argument.
|
|
460
|
+
`managed_by` is required on create and split, and must be `CUSTOMER` (self managed). Sophos MDR cases (`PROVIDER`) can't be created through the API by design, so the tools refuse `PROVIDER` before any call; raise an MDR service request in Sophos Fusion instead. The same goes for a case type the tenant pins to `PROVIDER`, such as `health_check`. `managed_by` cannot be changed afterwards, and a case created without it is unclaimed, so the tool never omits it. Detection and event IDs on the evidence tools are six section resource names (`alert://priv:event-filter:123456:1789526908712:<uuid>`), which `sophos_fusion_search_detections` returns. Evidence writes are queued jobs that land category by category (an add showed after about 5 seconds, a three category removal took about 25 seconds), so read the evidence back with a poll; adding a detection also attaches its linked asset and events, and removing it does not retract them (`remove_all` does). Comment @mentions (`@authorized_contacts`, `@customer`, `@sophos`) fire wherever they appear, including in prose, and an unrecognised token is dropped silently, so the comment tools read the stored mentions back. Tags are merged on update unless `replace_tags` is set. A file sent as `content_base64` travels inside the MCP message, which is capped at 10 MiB on stdio and HTTP, so it can be up to about 7.5 MiB. A larger message gets a JSON-RPC 413 over HTTP. Over stdio the MCP SDK closes the connection on it and the server exits. `file_path` reads the file on the server host and takes up to 50 MiB. File deletion is soft. Split and merge are irreversible and need a confirmation argument.
|
|
461
461
|
|
|
462
462
|
| Tool | Description |
|
|
463
463
|
|------|-------------|
|
|
@@ -831,6 +831,7 @@ Packaging files at the repo root: `manifest.json` (MCPB manifest, regenerated by
|
|
|
831
831
|
- Credentials are read from environment variables only, never logged
|
|
832
832
|
- JWT tokens are held in memory with automatic refresh
|
|
833
833
|
- HTTP server binds to `127.0.0.1` by default and refuses requests from a browser `Origin` that is not localhost or listed in `MCP_ALLOWED_ORIGINS`. If `MCP_HTTP_HOST` opens it to the network, set `MCP_HTTP_TOKEN` and put TLS in front (a reverse proxy or Tailscale)
|
|
834
|
+
- `/mcp` accepts request bodies up to 10 MiB, the same cap as stdio, and answers a larger one with a JSON-RPC 413 and malformed JSON with a JSON-RPC parse error (-32700). Tool arguments are capped at 1,000,000 array elements and object members (the SDK's `maxToolInputElements`), so an oversized argument list is refused before validation
|
|
834
835
|
- Write actions have `destructiveHint` annotations so clients can warn users
|
|
835
836
|
- Partner/org callers require explicit `tenant_id` on every call
|
|
836
837
|
- The REST client refuses a request path where an ID argument carries a `.` or `..` segment (encoded too), `?`, `#`, a backslash, an encoded `/` or a control character, so a crafted ID cannot redirect a call to another resource
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/config/config.d.ts
CHANGED
|
@@ -36,5 +36,6 @@ export declare function checkFusionGraphQLUrl(value: string): string;
|
|
|
36
36
|
export declare const CHARACTER_LIMIT: number;
|
|
37
37
|
export declare const DEFAULT_PAGE_SIZE = 50;
|
|
38
38
|
export declare const MAX_PAGE_SIZE = 100;
|
|
39
|
+
export declare const MAX_TOOL_INPUT_ELEMENTS = 1000000;
|
|
39
40
|
export declare const CLASSIC_MIGRATION_CHECK: boolean;
|
|
40
41
|
//# sourceMappingURL=config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/config/config.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,YAAY;IAC3B,QAAQ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AAM,EAAE,CAAC;CAC1B;AAED,wBAAgB,UAAU,IAAI,YAAY,CA6BzC;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,EAAE,CAkBvE;AAGD,eAAO,MAAM,eAAe,8CAA8C,CAAC;AAC3E,eAAO,MAAM,iBAAiB,mCAAmC,CAAC;AAKlE,eAAO,MAAM,yBAAyB,QAC4C,CAAC;AAEnF;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAc3D;AAGD,eAAO,MAAM,eAAe,QAG3B,CAAC;AACF,eAAO,MAAM,iBAAiB,KAAK,CAAC;AACpC,eAAO,MAAM,aAAa,MAAM,CAAC;AAOjC,eAAO,MAAM,uBAAuB,UAAY,CAAC;AAOjD,eAAO,MAAM,uBAAuB,SAC0C,CAAC"}
|
package/dist/config/config.js
CHANGED
|
@@ -82,6 +82,12 @@ export function checkFusionGraphQLUrl(value) {
|
|
|
82
82
|
export const CHARACTER_LIMIT = Math.max(10000, parseInt(process.env.CHARACTER_LIMIT || "50000", 10) || 50000);
|
|
83
83
|
export const DEFAULT_PAGE_SIZE = 50;
|
|
84
84
|
export const MAX_PAGE_SIZE = 100;
|
|
85
|
+
// The SDK's maxToolInputElements (array elements plus object members in one
|
|
86
|
+
// tool call's arguments), which stops an oversized argument list from
|
|
87
|
+
// exhausting memory during validation. A legitimate call can't reach it inside
|
|
88
|
+
// a 10 MiB message: that would take entries averaging under 10.5 bytes, and the
|
|
89
|
+
// only entries that short are ports (at most 65,535 per field), enums and tags.
|
|
90
|
+
export const MAX_TOOL_INPUT_ELEMENTS = 1_000_000;
|
|
85
91
|
// Migration awareness for the Classic Cases and Detections REST tools. A
|
|
86
92
|
// tenant that has moved to Sophos Fusion is refused on those tools and pointed
|
|
87
93
|
// at the sophos_fusion_* equivalent, because for such a tenant the Classic
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":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AAG,GAAG,CAAC;AAEjC,4EAA4E;AAC5E,sEAAsE;AACtE,+EAA+E;AAC/E,gFAAgF;AAChF,gFAAgF;AAChF,MAAM,CAAC,MAAM,uBAAuB,GAAG,SAAS,CAAC;AAEjD,yEAAyE;AACzE,+EAA+E;AAC/E,2EAA2E;AAC3E,iEAAiE;AACjE,wDAAwD;AACxD,MAAM,CAAC,MAAM,uBAAuB,GAClC,CAAC,OAAO,CAAC,GAAG,CAAC,8BAA8B,IAAI,IAAI,CAAC,CAAC,WAAW,EAAE,KAAK,KAAK,CAAC"}
|
package/dist/http-guard.d.ts
CHANGED
|
@@ -15,10 +15,22 @@
|
|
|
15
15
|
*
|
|
16
16
|
* requireBearerToken is the opt-in shared secret (MCP_HTTP_TOKEN) for a server
|
|
17
17
|
* that other machines can reach.
|
|
18
|
+
*
|
|
19
|
+
* MAX_MCP_MESSAGE_BYTES is the /mcp body limit. It matches the SDK's stdio
|
|
20
|
+
* message cap (STDIO_DEFAULT_MAX_BUFFER_SIZE), so a tool call that fits on one
|
|
21
|
+
* transport fits on the other. refusePayloadTooLarge answers a body over it,
|
|
22
|
+
* and refuseMalformedJson answers a body that is not JSON, both as JSON-RPC
|
|
23
|
+
* errors instead of Express's HTML error page, which carries a stack trace.
|
|
18
24
|
*/
|
|
19
|
-
import type { RequestHandler } from "express";
|
|
25
|
+
import type { ErrorRequestHandler, RequestHandler } from "express";
|
|
26
|
+
/** 10 MiB: the largest JSON-RPC message /mcp accepts, the same as stdio. */
|
|
27
|
+
export declare const MAX_MCP_MESSAGE_BYTES: number;
|
|
20
28
|
export declare function refuseForeignOrigins(allowedOrigins: string[]): RequestHandler;
|
|
21
29
|
export declare function requireBearerToken(token: string): RequestHandler;
|
|
30
|
+
/** Turns the body parser's 413 into a JSON-RPC error; other errors pass through. */
|
|
31
|
+
export declare const refusePayloadTooLarge: ErrorRequestHandler;
|
|
32
|
+
/** Turns the body parser's JSON syntax error into a JSON-RPC parse error (-32700); other errors pass through. */
|
|
33
|
+
export declare const refuseMalformedJson: ErrorRequestHandler;
|
|
22
34
|
export declare function isLoopbackAddress(address: string): boolean;
|
|
23
35
|
/** The one line printed when the listener is reachable from other machines and has no token. */
|
|
24
36
|
export declare function openListenerWarning(address: string, tokenSet: boolean): string | undefined;
|
package/dist/http-guard.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http-guard.d.ts","sourceRoot":"","sources":["../src/http-guard.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"http-guard.d.ts","sourceRoot":"","sources":["../src/http-guard.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAGH,OAAO,KAAK,EAAE,mBAAmB,EAAyB,cAAc,EAAY,MAAM,SAAS,CAAC;AAEpG,4EAA4E;AAC5E,eAAO,MAAM,qBAAqB,QAAmB,CAAC;AAgBtD,wBAAgB,oBAAoB,CAAC,cAAc,EAAE,MAAM,EAAE,GAAG,cAAc,CAc7E;AAMD,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,cAAc,CAYhE;AAED,oFAAoF;AACpF,eAAO,MAAM,qBAAqB,EAAE,mBAUnC,CAAC;AAEF,iHAAiH;AACjH,eAAO,MAAM,mBAAmB,EAAE,mBAOjC,CAAC;AAEF,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAE1D;AAED,gGAAgG;AAChG,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAG1F"}
|
package/dist/http-guard.js
CHANGED
|
@@ -15,8 +15,16 @@
|
|
|
15
15
|
*
|
|
16
16
|
* requireBearerToken is the opt-in shared secret (MCP_HTTP_TOKEN) for a server
|
|
17
17
|
* that other machines can reach.
|
|
18
|
+
*
|
|
19
|
+
* MAX_MCP_MESSAGE_BYTES is the /mcp body limit. It matches the SDK's stdio
|
|
20
|
+
* message cap (STDIO_DEFAULT_MAX_BUFFER_SIZE), so a tool call that fits on one
|
|
21
|
+
* transport fits on the other. refusePayloadTooLarge answers a body over it,
|
|
22
|
+
* and refuseMalformedJson answers a body that is not JSON, both as JSON-RPC
|
|
23
|
+
* errors instead of Express's HTML error page, which carries a stack trace.
|
|
18
24
|
*/
|
|
19
25
|
import { createHash, timingSafeEqual } from "node:crypto";
|
|
26
|
+
/** 10 MiB: the largest JSON-RPC message /mcp accepts, the same as stdio. */
|
|
27
|
+
export const MAX_MCP_MESSAGE_BYTES = 10 * 1024 * 1024;
|
|
20
28
|
const LOOPBACK_HOSTNAMES = new Set(["localhost", "127.0.0.1", "[::1]"]);
|
|
21
29
|
function isLoopbackOrigin(origin) {
|
|
22
30
|
try {
|
|
@@ -26,8 +34,8 @@ function isLoopbackOrigin(origin) {
|
|
|
26
34
|
return false;
|
|
27
35
|
}
|
|
28
36
|
}
|
|
29
|
-
function jsonRpcError(res, status, message) {
|
|
30
|
-
res.status(status).json({ jsonrpc: "2.0", error: { code
|
|
37
|
+
function jsonRpcError(res, status, message, code = -32000) {
|
|
38
|
+
res.status(status).json({ jsonrpc: "2.0", error: { code, message }, id: null });
|
|
31
39
|
}
|
|
32
40
|
export function refuseForeignOrigins(allowedOrigins) {
|
|
33
41
|
const allowed = new Set(allowedOrigins);
|
|
@@ -56,6 +64,23 @@ export function requireBearerToken(token) {
|
|
|
56
64
|
jsonRpcError(res, 401, "Unauthorized: send the MCP_HTTP_TOKEN value as an \"Authorization: Bearer <token>\" header.");
|
|
57
65
|
};
|
|
58
66
|
}
|
|
67
|
+
/** Turns the body parser's 413 into a JSON-RPC error; other errors pass through. */
|
|
68
|
+
export const refusePayloadTooLarge = (error, _req, res, next) => {
|
|
69
|
+
if (error?.type !== "entity.too.large") {
|
|
70
|
+
next(error);
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
jsonRpcError(res, 413, `Payload Too Large: the request body is over the ${MAX_MCP_MESSAGE_BYTES} byte limit. For a large case file, use file_path.`);
|
|
74
|
+
};
|
|
75
|
+
/** Turns the body parser's JSON syntax error into a JSON-RPC parse error (-32700); other errors pass through. */
|
|
76
|
+
export const refuseMalformedJson = (error, _req, res, next) => {
|
|
77
|
+
if (error?.type !== "entity.parse.failed") {
|
|
78
|
+
next(error);
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
// The SDK's wording for the same case when it parses the body itself
|
|
82
|
+
jsonRpcError(res, 400, "Parse error: Invalid JSON", -32700);
|
|
83
|
+
};
|
|
59
84
|
export function isLoopbackAddress(address) {
|
|
60
85
|
return address.startsWith("127.") || address === "::1" || address.toLowerCase().startsWith("::ffff:127.");
|
|
61
86
|
}
|
package/dist/http-guard.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http-guard.js","sourceRoot":"","sources":["../src/http-guard.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"http-guard.js","sourceRoot":"","sources":["../src/http-guard.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAG1D,4EAA4E;AAC5E,MAAM,CAAC,MAAM,qBAAqB,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC;AAEtD,MAAM,kBAAkB,GAAG,IAAI,GAAG,CAAC,CAAC,WAAW,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC,CAAC;AAExE,SAAS,gBAAgB,CAAC,MAAc;IACtC,IAAI,CAAC;QACH,OAAO,kBAAkB,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,CAAC;IAC1D,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED,SAAS,YAAY,CAAC,GAAa,EAAE,MAAc,EAAE,OAAe,EAAE,IAAI,GAAG,CAAC,KAAK;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zO,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
File without changes
|
package/dist/index.d.ts.map
CHANGED
|
File without changes
|
package/dist/index.js
CHANGED
|
@@ -13,14 +13,14 @@ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
|
13
13
|
import { StreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/streamableHttp.js";
|
|
14
14
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
15
15
|
import express from "express";
|
|
16
|
-
import { loadConfig } from "./config/config.js";
|
|
16
|
+
import { loadConfig, MAX_TOOL_INPUT_ELEMENTS } from "./config/config.js";
|
|
17
17
|
import { TokenManager } from "./auth/token-manager.js";
|
|
18
18
|
import { TenantResolver } from "./client/tenant-resolver.js";
|
|
19
19
|
import { SophosClient } from "./client/sophos-client.js";
|
|
20
20
|
import { FusionClient } from "./client/fusion-client.js";
|
|
21
21
|
import { CaseReferenceDataCache } from "./fusion/case-reference-data.js";
|
|
22
22
|
import { FusionMigrationGuard } from "./fusion/migration.js";
|
|
23
|
-
import { openListenerWarning, refuseForeignOrigins, requireBearerToken } from "./http-guard.js";
|
|
23
|
+
import { MAX_MCP_MESSAGE_BYTES, openListenerWarning, refuseForeignOrigins, refuseMalformedJson, refusePayloadTooLarge, requireBearerToken, } from "./http-guard.js";
|
|
24
24
|
// Tool registration modules
|
|
25
25
|
import { registerTenantTools } from "./tools/tenants.js";
|
|
26
26
|
import { registerAlertTools } from "./tools/alerts.js";
|
|
@@ -79,7 +79,7 @@ async function main() {
|
|
|
79
79
|
const server = new McpServer({
|
|
80
80
|
name: "sophos-central-mcp-server",
|
|
81
81
|
version: pkgVersion,
|
|
82
|
-
});
|
|
82
|
+
}, { maxToolInputElements: MAX_TOOL_INPUT_ELEMENTS });
|
|
83
83
|
// Partner/org-only tools
|
|
84
84
|
if (identity.idType !== "tenant") {
|
|
85
85
|
registerTenantTools(server, tenantResolver);
|
|
@@ -151,7 +151,9 @@ async function runHTTP(createServer, config) {
|
|
|
151
151
|
app.use("/mcp", requireBearerToken(config.httpToken));
|
|
152
152
|
}
|
|
153
153
|
// Parse (and decompress) bodies only on /mcp, after the token check
|
|
154
|
-
app.use("/mcp", express.json());
|
|
154
|
+
app.use("/mcp", express.json({ limit: MAX_MCP_MESSAGE_BYTES }));
|
|
155
|
+
app.use("/mcp", refusePayloadTooLarge);
|
|
156
|
+
app.use("/mcp", refuseMalformedJson);
|
|
155
157
|
// MCP endpoint: stateless streamable HTTP
|
|
156
158
|
app.post("/mcp", async (req, res) => {
|
|
157
159
|
const server = createServer();
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;;GAKG;AAEH,OAAO,eAAe,CAAC;AACvB,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,MAAM,WAAW,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACnD,MAAM,UAAU,GAAW,WAAW,CAAC,iBAAiB,CAAC,CAAC,OAAO,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,6BAA6B,EAAE,MAAM,oDAAoD,CAAC;AACnG,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,OAAO,MAAM,SAAS,CAAC;AAG9B,OAAO,EAAE,UAAU,EAAqB,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;;GAKG;AAEH,OAAO,eAAe,CAAC;AACvB,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,MAAM,WAAW,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACnD,MAAM,UAAU,GAAW,WAAW,CAAC,iBA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SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAChC,OAAO,CAAC,KAAK,CAAC,yCAAyC,CAAC,CAAC;AAC3D,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IACrB,OAAO,CAAC,KAAK,CAAC,2BAA2B,EAAE,KAAK,CAAC,CAAC;IAClD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
package/dist/tools/accounts.d.ts
CHANGED
|
File without changes
|
|
File without changes
|
package/dist/tools/accounts.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/tools/alerts.d.ts
CHANGED
|
File without changes
|
|
File without changes
|
package/dist/tools/alerts.js
CHANGED
|
File without changes
|
package/dist/tools/alerts.js.map
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/tools/cases.d.ts
CHANGED
|
File without changes
|
|
File without changes
|
package/dist/tools/cases.js
CHANGED
|
File without changes
|
package/dist/tools/cases.js.map
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/tools/detections.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/tools/directory.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/tools/email.d.ts
CHANGED
|
File without changes
|
|
File without changes
|
package/dist/tools/email.js
CHANGED
|
File without changes
|
package/dist/tools/email.js.map
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/tools/endpoints.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/tools/exclusions.js
CHANGED
|
File without changes
|
|
File without changes
|
package/dist/tools/firewall.d.ts
CHANGED
|
File without changes
|
|
File without changes
|
package/dist/tools/firewall.js
CHANGED
|
File without changes
|
|
File without changes
|
|
@@ -1156,15 +1156,15 @@ Returns:
|
|
|
1156
1156
|
title: "Upload Fusion Case File",
|
|
1157
1157
|
description: `Attach a file to a Sophos Fusion case: registers the upload, PUTs the bytes to the presigned URL the API returns, then polls until the file status leaves SCHEDULED (it reached UPLOADED within about 3 seconds in testing).
|
|
1158
1158
|
|
|
1159
|
-
Supply exactly one of content (text, stored as UTF-8), content_base64 (binary) or file_path (a file on the machine running this MCP server). name is required unless file_path is given. content_type defaults from the file extension.
|
|
1159
|
+
Supply exactly one of content (text, stored as UTF-8), content_base64 (binary) or file_path (a file on the machine running this MCP server). name is required unless file_path is given. content_type defaults from the file extension. content and content_base64 travel inside the MCP message, which is capped at 10 MiB on stdio and HTTP, so content_base64 carries up to about 7.5 MiB of file. A larger message gets an error over HTTP, but over stdio the MCP SDK closes the connection and this server exits. file_path is read on the server, so use it for larger files, up to 50 MiB. Deleting a file later is a soft delete.
|
|
1160
1160
|
|
|
1161
1161
|
Args:
|
|
1162
1162
|
- case_id (string): ${ID_NOTE}
|
|
1163
1163
|
- tenant_id (string, optional): Tenant ID. Required for partner/org callers.
|
|
1164
1164
|
- name (string, optional): File name as it should appear on the case.
|
|
1165
1165
|
- content (string, optional): Text content.
|
|
1166
|
-
- content_base64 (string, optional): Binary content, base64.
|
|
1167
|
-
- file_path (string, optional): Local path to read.
|
|
1166
|
+
- content_base64 (string, optional): Binary content, base64 (up to about 7.5 MiB of file).
|
|
1167
|
+
- file_path (string, optional): Local path to read (up to 50 MiB).
|
|
1168
1168
|
- content_type (string, optional): MIME type; guessed from the name when omitted.
|
|
1169
1169
|
- embedded (boolean, optional, default false): Mark the file as embedded content (for images used in key findings).
|
|
1170
1170
|
|
|
@@ -1175,7 +1175,7 @@ Returns:
|
|
|
1175
1175
|
tenant_id: tenantIdField,
|
|
1176
1176
|
name: z.string().min(1).optional().describe("File name on the case"),
|
|
1177
1177
|
content: z.string().optional().describe("Text content (UTF-8)"),
|
|
1178
|
-
content_base64: z.string().optional().describe("Binary content, base64"),
|
|
1178
|
+
content_base64: z.string().optional().describe("Binary content, base64 (up to about 7.5 MiB of file; use file_path above that)"),
|
|
1179
1179
|
file_path: z.string().optional().describe("Local file path on the MCP server host"),
|
|
1180
1180
|
content_type: z.string().optional().describe("MIME type (guessed from the name when omitted)"),
|
|
1181
1181
|
embedded: z.boolean().optional().default(false).describe("Embedded content (images in key findings)"),
|