@jupiterone/jupiterone-mcp 1.3.0 → 2.0.0
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/dist/client/graphql/queries.d.ts +1 -0
- package/dist/client/graphql/queries.d.ts.map +1 -1
- package/dist/client/graphql/queries.js +19 -1
- package/dist/client/graphql/queries.js.map +1 -1
- package/dist/client/jupiterone-client.d.ts +1 -0
- package/dist/client/jupiterone-client.d.ts.map +1 -1
- package/dist/client/jupiterone-client.js +3 -0
- package/dist/client/jupiterone-client.js.map +1 -1
- package/dist/client/services/account-service.d.ts +16 -0
- package/dist/client/services/account-service.d.ts.map +1 -1
- package/dist/client/services/account-service.js +19 -0
- package/dist/client/services/account-service.js.map +1 -1
- package/dist/generated/description-map.d.ts.map +1 -1
- package/dist/generated/description-map.js +11 -5
- package/dist/generated/description-map.js.map +1 -1
- package/dist/server/mcp-server.d.ts +22 -1
- package/dist/server/mcp-server.d.ts.map +1 -1
- package/dist/server/mcp-server.js +59 -16
- package/dist/server/mcp-server.js.map +1 -1
- package/dist/server/tools/account.d.ts +25 -0
- package/dist/server/tools/account.d.ts.map +1 -1
- package/dist/server/tools/account.js +98 -6
- package/dist/server/tools/account.js.map +1 -1
- package/dist/server/tools/alerts.js +1 -1
- package/dist/server/tools/alerts.js.map +1 -1
- package/dist/server/tools/dashboards.js +3 -3
- package/dist/server/tools/dashboards.js.map +1 -1
- package/dist/server/tools/errors.d.ts +14 -6
- package/dist/server/tools/errors.d.ts.map +1 -1
- package/dist/server/tools/errors.js +22 -7
- package/dist/server/tools/errors.js.map +1 -1
- package/dist/server/tools/integrations.js +4 -4
- package/dist/server/tools/integrations.js.map +1 -1
- package/dist/server/tools/j1ql.d.ts.map +1 -1
- package/dist/server/tools/j1ql.js +55 -25
- package/dist/server/tools/j1ql.js.map +1 -1
- package/dist/server/tools/rules.js +7 -7
- package/dist/server/tools/rules.js.map +1 -1
- package/dist/server/tools/types.d.ts +11 -3
- package/dist/server/tools/types.d.ts.map +1 -1
- package/dist/server/tools/types.js.map +1 -1
- package/node_modules/dtrace-provider/build/Makefile +2 -2
- package/node_modules/dtrace-provider/build/config.gypi +44 -24
- package/package.json +5 -4
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export declare const LIST_ALERT_INSTANCES = "\n query listAlertInstances($alertStatus: AlertStatus, $limit: Int, $cursor: String) {\n listAlertInstances(alertStatus: $alertStatus, limit: $limit, cursor: $cursor) {\n instances {\n ...AlertInstanceFragment\n __typename\n }\n pageInfo {\n endCursor\n hasNextPage\n __typename\n }\n __typename\n }\n }\n\n fragment AlertInstanceFragment on AlertInstance {\n accountId\n resourceGroupId\n createdOn\n dismissedOn\n endReason\n id\n lastEvaluationBeginOn\n lastEvaluationEndOn\n lastEvaluationResult {\n answerText\n evaluationEndOn\n outputs {\n name\n value\n __typename\n }\n rawDataDescriptors {\n name\n recordCount\n __typename\n }\n __typename\n }\n lastUpdatedOn\n level\n questionRuleInstance {\n id\n name\n description\n tags\n pollingInterval\n labels {\n labelName\n labelValue\n __typename\n }\n __typename\n }\n reportRuleInstance {\n name\n description\n __typename\n }\n ruleId\n ruleVersion\n status\n users\n __typename\n }\n";
|
|
2
2
|
export declare const LIST_RULE_INSTANCES = "\n query listRuleInstances($limit: Int, $cursor: String, $filters: ListRuleInstancesFilters) {\n listRuleInstances(limit: $limit, cursor: $cursor, filters: $filters) {\n questionInstances {\n ...RuleInstanceFields\n __typename\n }\n pageInfo {\n hasNextPage\n endCursor\n __typename\n }\n __typename\n }\n }\n\n fragment RuleInstanceFields on QuestionRuleInstance {\n id\n resourceGroupId\n accountId\n name\n description\n version\n lastEvaluationStartOn\n lastEvaluationEndOn\n evaluationStep\n specVersion\n notifyOnFailure\n triggerActionsOnNewEntitiesOnly\n ignorePreviousResults\n pollingInterval\n templates\n outputs\n labels {\n labelName\n labelValue\n __typename\n }\n question {\n queries {\n query\n name\n version\n includeDeleted\n __typename\n }\n __typename\n }\n questionId\n latest\n deleted\n type\n operations {\n when\n actions\n __typename\n }\n latestAlertId\n latestAlertIsActive\n state {\n actions\n __typename\n }\n tags\n remediationSteps\n __typename\n }\n";
|
|
3
3
|
export declare const GET_ACCOUNT_INFO = "\n query account {\n iamGetAccount {\n accountId\n accountSubdomain\n accountName\n accountOwner\n status\n accountType\n accountLogoUrl\n __typename\n }\n }\n";
|
|
4
|
+
export declare const GET_CURRENT_USER = "\n query getCurrentUser {\n iamGetCurrentUser {\n email\n userAbacPermission {\n statement\n }\n resourcePermissions {\n resourceArea\n canCreate\n canRead\n canUpdate\n canDelete\n }\n __typename\n }\n }\n";
|
|
4
5
|
export declare const GET_DASHBOARDS = "\n query GetDashboards {\n getDashboards(options: {includeAllJ1ManagedDashboards: true}) {\n id\n name\n userId\n category\n supportedUseCase\n prerequisites {\n prerequisitesMet\n preRequisitesGroupsFulfilled\n preRequisitesGroupsRequired\n __typename\n }\n isJ1ManagedBoard\n resourceGroupId\n starred\n _timeUpdated\n _createdAt\n __typename\n }\n }\n";
|
|
5
6
|
export declare const GET_DASHBOARD_DETAILS = "\n query solo_GetDashboard($dashboardId: String!) {\n getDashboard(dashboardId: $dashboardId) {\n ...InsightsDashboard\n __typename\n }\n }\n\n fragment InsightsDashboard on InsightsDashboard {\n id\n name\n category\n userId\n supportedUseCase\n isJ1ManagedBoard\n published\n publishedToUserIds\n publishedToGroupIds\n groupIds\n userIds\n scopeFilters\n resourceGroupId\n starred\n _timeUpdated\n _createdAt\n prerequisites {\n prerequisitesMet\n preRequisitesGroupsFulfilled\n preRequisitesGroupsRequired\n __typename\n }\n parameters {\n ...DashboardParameterFields\n __typename\n }\n widgets {\n ...InsightsWidget\n __typename\n }\n layouts {\n ...InsightsDashboardLayoutConfig\n __typename\n }\n __typename\n }\n\n fragment DashboardParameterFields on DashboardParameter {\n dashboardId\n accountId\n id\n label\n name\n options\n valueType\n type\n default\n disableCustomInput\n requireValue\n __typename\n }\n\n fragment InsightsWidget on InsightsWidget {\n id\n title\n description\n type\n questionId\n noResultMessage\n includeDeleted\n config {\n queries {\n id\n name\n query\n __typename\n }\n settings\n postQueryFilters\n disableQueryPolicyFilters\n __typename\n }\n __typename\n }\n\n fragment InsightsDashboardLayoutConfig on InsightsDashboardLayoutConfig {\n xs {\n ...InsightsDashboardLayoutItem\n __typename\n }\n sm {\n ...InsightsDashboardLayoutItem\n __typename\n }\n md {\n ...InsightsDashboardLayoutItem\n __typename\n }\n lg {\n ...InsightsDashboardLayoutItem\n __typename\n }\n xl {\n ...InsightsDashboardLayoutItem\n __typename\n }\n __typename\n }\n\n fragment InsightsDashboardLayoutItem on InsightsDashboardLayoutItem {\n static\n moved\n w\n h\n x\n y\n i\n __typename\n }\n";
|
|
6
7
|
export declare const GET_INTEGRATION_DEFINITIONS = "\n query IntegrationDefinitions($cursor: String, $includeConfig: Boolean = false) {\n integrationDefinitions(cursor: $cursor) {\n definitions {\n ...IntegrationDefinitionsValues\n __typename\n }\n pageInfo {\n endCursor\n hasNextPage\n __typename\n }\n __typename\n }\n }\n\n fragment IntegrationDefinitionsValues on IntegrationDefinition {\n id\n name\n type\n title\n integrationType\n integrationClass\n integrationCategory\n totalInstanceCount\n description\n ...IntegrationDefinitionConfigFragment @include(if: $includeConfig)\n __typename\n }\n\n fragment IntegrationDefinitionConfigFragment on IntegrationDefinition {\n configFields {\n ...ConfigFieldsRecursive\n __typename\n }\n authSections {\n id\n description\n displayName\n configFields {\n ...ConfigFieldsRecursive\n __typename\n }\n verificationDisabled\n __typename\n }\n configSections {\n displayName\n configFields {\n ...ConfigFieldsRecursive\n __typename\n }\n __typename\n }\n __typename\n }\n\n fragment ConfigFieldsRecursive on ConfigField {\n ...ConfigFieldValues\n configFields {\n ...ConfigFieldValues\n configFields {\n ...ConfigFieldValues\n __typename\n }\n __typename\n }\n __typename\n }\n\n fragment ConfigFieldValues on ConfigField {\n key\n displayName\n description\n type\n format\n defaultValue\n helperText\n inputAdornment\n mask\n optional\n immutable\n readonly\n computed\n options {\n value\n description\n label\n webLink\n default\n __typename\n }\n __typename\n }\n";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queries.d.ts","sourceRoot":"","sources":["../../../src/client/graphql/queries.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB,mtCAkEhC,CAAC;AAEF,eAAO,MAAM,mBAAmB,kuCAmE/B,CAAC;AAEF,eAAO,MAAM,gBAAgB,oNAa5B,CAAC;AAEF,eAAO,MAAM,cAAc,4cAsB1B,CAAC;AAEF,eAAO,MAAM,qBAAqB,kjEAsHjC,CAAC;AAEF,eAAO,MAAM,2BAA2B,uxDA8FvC,CAAC;AAEF,eAAO,MAAM,yBAAyB,ggCAiDrC,CAAC;AAEF,eAAO,MAAM,oBAAoB,o+BA2ChC,CAAC;AAEF,eAAO,MAAM,mBAAmB,kmBA+B/B,CAAC;AAEF,eAAO,MAAM,sBAAsB,8nBA+BlC,CAAC;AAEF,eAAO,MAAM,qBAAqB,ijCA2CjC,CAAC;AAEF,eAAO,MAAM,2BAA2B,+2BA0CvC,CAAC;AAEF,eAAO,MAAM,yBAAyB,uHAIrC,CAAC;AAGF,eAAO,MAAM,QAAQ,qdAQpB,CAAC;AAGF,eAAO,MAAM,iBAAiB,iGAO7B,CAAC"}
|
|
1
|
+
{"version":3,"file":"queries.d.ts","sourceRoot":"","sources":["../../../src/client/graphql/queries.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB,mtCAkEhC,CAAC;AAEF,eAAO,MAAM,mBAAmB,kuCAmE/B,CAAC;AAEF,eAAO,MAAM,gBAAgB,oNAa5B,CAAC;AAEF,eAAO,MAAM,gBAAgB,mSAiB5B,CAAC;AAEF,eAAO,MAAM,cAAc,4cAsB1B,CAAC;AAEF,eAAO,MAAM,qBAAqB,kjEAsHjC,CAAC;AAEF,eAAO,MAAM,2BAA2B,uxDA8FvC,CAAC;AAEF,eAAO,MAAM,yBAAyB,ggCAiDrC,CAAC;AAEF,eAAO,MAAM,oBAAoB,o+BA2ChC,CAAC;AAEF,eAAO,MAAM,mBAAmB,kmBA+B/B,CAAC;AAEF,eAAO,MAAM,sBAAsB,8nBA+BlC,CAAC;AAEF,eAAO,MAAM,qBAAqB,ijCA2CjC,CAAC;AAEF,eAAO,MAAM,2BAA2B,+2BA0CvC,CAAC;AAEF,eAAO,MAAM,yBAAyB,uHAIrC,CAAC;AAGF,eAAO,MAAM,QAAQ,qdAQpB,CAAC;AAGF,eAAO,MAAM,iBAAiB,iGAO7B,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GET_ENTITY_COUNTS = exports.QUERY_V2 = exports.GET_RAW_DATA_DOWNLOAD_URL = exports.GET_RULE_EVALUATION_DETAILS = exports.LIST_RULE_EVALUATIONS = exports.GET_INTEGRATION_EVENTS = exports.GET_INTEGRATION_JOB = exports.GET_INTEGRATION_JOBS = exports.GET_INTEGRATION_INSTANCES = exports.GET_INTEGRATION_DEFINITIONS = exports.GET_DASHBOARD_DETAILS = exports.GET_DASHBOARDS = exports.GET_ACCOUNT_INFO = exports.LIST_RULE_INSTANCES = exports.LIST_ALERT_INSTANCES = void 0;
|
|
3
|
+
exports.GET_ENTITY_COUNTS = exports.QUERY_V2 = exports.GET_RAW_DATA_DOWNLOAD_URL = exports.GET_RULE_EVALUATION_DETAILS = exports.LIST_RULE_EVALUATIONS = exports.GET_INTEGRATION_EVENTS = exports.GET_INTEGRATION_JOB = exports.GET_INTEGRATION_JOBS = exports.GET_INTEGRATION_INSTANCES = exports.GET_INTEGRATION_DEFINITIONS = exports.GET_DASHBOARD_DETAILS = exports.GET_DASHBOARDS = exports.GET_CURRENT_USER = exports.GET_ACCOUNT_INFO = exports.LIST_RULE_INSTANCES = exports.LIST_ALERT_INSTANCES = void 0;
|
|
4
4
|
exports.LIST_ALERT_INSTANCES = `
|
|
5
5
|
query listAlertInstances($alertStatus: AlertStatus, $limit: Int, $cursor: String) {
|
|
6
6
|
listAlertInstances(alertStatus: $alertStatus, limit: $limit, cursor: $cursor) {
|
|
@@ -150,6 +150,24 @@ exports.GET_ACCOUNT_INFO = `
|
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
152
|
`;
|
|
153
|
+
exports.GET_CURRENT_USER = `
|
|
154
|
+
query getCurrentUser {
|
|
155
|
+
iamGetCurrentUser {
|
|
156
|
+
email
|
|
157
|
+
userAbacPermission {
|
|
158
|
+
statement
|
|
159
|
+
}
|
|
160
|
+
resourcePermissions {
|
|
161
|
+
resourceArea
|
|
162
|
+
canCreate
|
|
163
|
+
canRead
|
|
164
|
+
canUpdate
|
|
165
|
+
canDelete
|
|
166
|
+
}
|
|
167
|
+
__typename
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
`;
|
|
153
171
|
exports.GET_DASHBOARDS = `
|
|
154
172
|
query GetDashboards {
|
|
155
173
|
getDashboards(options: {includeAllJ1ManagedDashboards: true}) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queries.js","sourceRoot":"","sources":["../../../src/client/graphql/queries.ts"],"names":[],"mappings":";;;AAAa,QAAA,oBAAoB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkEnC,CAAC;AAEW,QAAA,mBAAmB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmElC,CAAC;AAEW,QAAA,gBAAgB,GAAG;;;;;;;;;;;;;CAa/B,CAAC;AAEW,QAAA,cAAc,GAAG;;;;;;;;;;;;;;;;;;;;;;CAsB7B,CAAC;AAEW,QAAA,qBAAqB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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54
|
subdomain?: string;
|
|
55
55
|
}>;
|
|
56
|
+
getCurrentUser(): Promise<import("./services/account-service.js").CurrentUserInfo>;
|
|
56
57
|
getIntegrationDefinitions(...args: Parameters<IntegrationService['getIntegrationDefinitions']>): Promise<{
|
|
57
58
|
definitions: import("../types/jupiterone.js").IntegrationDefinition[];
|
|
58
59
|
pageInfo: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jupiterone-client.d.ts","sourceRoot":"","sources":["../../src/client/jupiterone-client.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE/D,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAEnE,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAGzD,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,MAAM,CAAgB;IAC9B,OAAO,CAAC,MAAM,CAAmB;IACjC,OAAO,CAAC,YAAY,CAAe;IAC5B,WAAW,EAAE,WAAW,CAAC;IACzB,gBAAgB,EAAE,gBAAgB,CAAC;IAC1C,OAAO,CAAC,cAAc,CAAiB;IACvC,OAAO,CAAC,kBAAkB,CAAqB;IACxC,WAAW,EAAE,WAAW,CAAC;gBAEpB,MAAM,EAAE,gBAAgB;IA0B7B,kBAAkB,CAAC,SAAS,EAAE,MAAM,GAAG,gBAAgB;IAMxD,oBAAoB,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,YAAY,CAAC,sBAAsB,CAAC,CAAC;IAK9E,iBAAiB,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,WAAW,CAAC,mBAAmB,CAAC,CAAC;;;;IAIvE,mBAAmB,CAAC,GAAG,IAAI,EAAE,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IlE,qBAAqB,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,gBAAgB,CAAC,uBAAuB,CAAC,CAAC;IAIpF,eAAe,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,CAAC;IAIxE,qBAAqB,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,gBAAgB,CAAC,uBAAuB,CAAC,CAAC;;;IAIpF,qBAAqB,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,gBAAgB,CAAC,uBAAuB,CAAC,CAAC;;;IAIpF,eAAe,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,CAAC;;;IAKxE,cAAc;;;;;IAId,cAAc;IAKd,yBAAyB,CAC7B,GAAG,IAAI,EAAE,UAAU,CAAC,kBAAkB,CAAC,2BAA2B,CAAC,CAAC;;;;;;IAKhE,uBAAuB,CAC3B,GAAG,IAAI,EAAE,UAAU,CAAC,kBAAkB,CAAC,yBAAyB,CAAC,CAAC;;;;;;IAK9D,kBAAkB,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,kBAAkB,CAAC,oBAAoB,CAAC,CAAC;;;;;;IAItF;;;;OAIG;IACG,iBAAiB,CAAC,gBAAgB,EAAE,MAAM,EAAE,qBAAqB,EAAE,MAAM;IAI/E;;;;;;OAMG;IACG,oBAAoB,CACxB,KAAK,EAAE,MAAM,EACb,qBAAqB,EAAE,MAAM,EAC7B,MAAM,CAAC,EAAE,MAAM,EACf,IAAI,CAAC,EAAE,MAAM;;;;;;;IAMT,gBAAgB,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,WAAW,CAAC,kBAAkB,CAAC,CAAC;IAIrE,eAAe;CAGtB"}
|
|
@@ -107,6 +107,9 @@ class JupiterOneClient {
|
|
|
107
107
|
async getAccountInfo() {
|
|
108
108
|
return this.accountService.getAccountInfo();
|
|
109
109
|
}
|
|
110
|
+
async getCurrentUser() {
|
|
111
|
+
return this.accountService.getCurrentUser();
|
|
112
|
+
}
|
|
110
113
|
// Integration methods
|
|
111
114
|
async getIntegrationDefinitions(...args) {
|
|
112
115
|
return this.integrationService.getIntegrationDefinitions(...args);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jupiterone-client.js","sourceRoot":"","sources":["../../src/client/jupiterone-client.ts"],"names":[],"mappings":";;;AAEA,2DAA8D;AAC9D,kEAA2D;AAC3D,gEAAyD;AACzD,0EAAmE;AACnE,sEAA+D;AAC/D,8EAAuE;AACvE,gEAAyD;AACzD,qDAA6C;AAE7C,MAAa,gBAAgB;IACnB,MAAM,CAAgB;IACtB,MAAM,CAAmB;IACzB,YAAY,CAAe;IAC5B,WAAW,CAAc;IACzB,gBAAgB,CAAmB;IAClC,cAAc,CAAiB;IAC/B,kBAAkB,CAAqB;IACxC,WAAW,CAAc;IAEhC,YAAY,MAAwB;QAClC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,MAAM,OAAO,GAA2B;YACtC,aAAa,EAAE,UAAU,MAAM,CAAC,UAAU,IAAI,MAAM,CAAC,MAAM,EAAE;YAC7D,cAAc,EAAE,kBAAkB;YAClC,YAAY,EAAE,kBAAkB,sBAAO,EAAE;SAC1C,CAAC;QACF,IAAI,MAAM,CAAC,SAAS,EAAE,CAAC;YACrB,OAAO,CAAC,kBAAkB,CAAC,GAAG,MAAM,CAAC,SAAS,CAAC;QACjD,CAAC;QACD,iGAAiG;QACjG,2DAA2D;QAC3D,IAAI,CAAC,MAAM,GAAG,IAAI,2CAAuB,CAAC,MAAM,CAAC,OAAO,IAAI,kCAAkC,EAAE;YAC9F,OAAO;YACP,MAAM,EAAE,MAAM,CAAC,WAAW;SAC3B,CAAC,CAAC;QAEH,IAAI,CAAC,YAAY,GAAG,IAAI,+BAAY,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAClD,IAAI,CAAC,WAAW,GAAG,IAAI,6BAAW,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;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BAAkB,CAAC,kBAAkB,CAAC,GAAG,IAAI,CAAC,CAAC;IAC7D,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,iBAAiB,CAAC,gBAAwB,EAAE,qBAA6B;QAC7E,OAAO,IAAI,CAAC,kBAAkB,CAAC,iBAAiB,CAAC,gBAAgB,EAAE,qBAAqB,CAAC,CAAC;IAC5F,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,oBAAoB,CACxB,KAAa,EACb,qBAA6B,EAC7B,MAAe,EACf,IAAa;QAEb,OAAO,IAAI,CAAC,kBAAkB,CAAC,oBAAoB,CAAC,KAAK,EAAE,qBAAqB,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;IAClG,CAAC;IAED,eAAe;IACf,KAAK,CAAC,gBAAgB,CAAC,GAAG,IAAiD;QACzE,OAAO,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,GAAG,IAAI,CAAC,CAAC;IACpD,CAAC;IAED,KAAK,CAAC,eAAe;QACnB,OAAO,IAAI,CAAC,WAAW,CAAC,eAAe,EAAE,CAAC;IAC5C,CAAC;CACF;AAnLD,4CAmLC"}
|
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
import { GraphQLClient } from 'graphql-request';
|
|
2
|
+
export interface CurrentUserInfo {
|
|
3
|
+
email?: string;
|
|
4
|
+
abacStatements: string[];
|
|
5
|
+
resourcePermissions: Array<{
|
|
6
|
+
resourceArea: string;
|
|
7
|
+
canCreate: boolean;
|
|
8
|
+
canRead: boolean;
|
|
9
|
+
canUpdate: boolean;
|
|
10
|
+
canDelete: boolean;
|
|
11
|
+
}>;
|
|
12
|
+
}
|
|
2
13
|
export declare class AccountService {
|
|
3
14
|
private client;
|
|
4
15
|
constructor(client: GraphQLClient);
|
|
@@ -10,5 +21,10 @@ export declare class AccountService {
|
|
|
10
21
|
name?: string;
|
|
11
22
|
subdomain?: string;
|
|
12
23
|
}>;
|
|
24
|
+
/**
|
|
25
|
+
* The caller's identity and effective permissions in the current account — the same
|
|
26
|
+
* `iamGetCurrentUser` source the web app uses for its RBAC gating.
|
|
27
|
+
*/
|
|
28
|
+
getCurrentUser(): Promise<CurrentUserInfo>;
|
|
13
29
|
}
|
|
14
30
|
//# sourceMappingURL=account-service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"account-service.d.ts","sourceRoot":"","sources":["../../../src/client/services/account-service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAGhD,qBAAa,cAAc;IACb,OAAO,CAAC,MAAM;gBAAN,MAAM,EAAE,aAAa;IAEzC;;OAEG;IACG,cAAc,IAAI,OAAO,CAAC;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"account-service.d.ts","sourceRoot":"","sources":["../../../src/client/services/account-service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAGhD,MAAM,WAAW,eAAe;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,mBAAmB,EAAE,KAAK,CAAC;QACzB,YAAY,EAAE,MAAM,CAAC;QACrB,SAAS,EAAE,OAAO,CAAC;QACnB,OAAO,EAAE,OAAO,CAAC;QACjB,SAAS,EAAE,OAAO,CAAC;QACnB,SAAS,EAAE,OAAO,CAAC;KACpB,CAAC,CAAC;CACJ;AAED,qBAAa,cAAc;IACb,OAAO,CAAC,MAAM;gBAAN,MAAM,EAAE,aAAa;IAEzC;;OAEG;IACG,cAAc,IAAI,OAAO,CAAC;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAgBzF;;;OAGG;IACG,cAAc,IAAI,OAAO,CAAC,eAAe,CAAC;CAoBjD"}
|
|
@@ -24,6 +24,25 @@ class AccountService {
|
|
|
24
24
|
throw error;
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* The caller's identity and effective permissions in the current account — the same
|
|
29
|
+
* `iamGetCurrentUser` source the web app uses for its RBAC gating.
|
|
30
|
+
*/
|
|
31
|
+
async getCurrentUser() {
|
|
32
|
+
try {
|
|
33
|
+
const response = await this.client.request(queries_js_1.GET_CURRENT_USER);
|
|
34
|
+
const user = response.iamGetCurrentUser;
|
|
35
|
+
return {
|
|
36
|
+
email: user?.email,
|
|
37
|
+
abacStatements: user?.userAbacPermission?.statement ?? [],
|
|
38
|
+
resourcePermissions: user?.resourcePermissions ?? [],
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
catch (error) {
|
|
42
|
+
console.error('Error getting current user', error);
|
|
43
|
+
throw error;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
27
46
|
}
|
|
28
47
|
exports.AccountService = AccountService;
|
|
29
48
|
//# sourceMappingURL=account-service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"account-service.js","sourceRoot":"","sources":["../../../src/client/services/account-service.ts"],"names":[],"mappings":";;;AACA,
|
|
1
|
+
{"version":3,"file":"account-service.js","sourceRoot":"","sources":["../../../src/client/services/account-service.ts"],"names":[],"mappings":";;;AACA,sDAA2E;AAc3E,MAAa,cAAc;IACL;IAApB,YAAoB,MAAqB;QAArB,WAAM,GAAN,MAAM,CAAe;IAAG,CAAC;IAE7C;;OAEG;IACH,KAAK,CAAC,cAAc;QAClB,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAEvC,6BAAgB,CAAC,CAAC;YACrB,OAAO;gBACL,SAAS,EAAE,QAAQ,CAAC,aAAa,CAAC,SAAS;gBAC3C,IAAI,EAAE,QAAQ,CAAC,aAAa,CAAC,WAAW;gBACxC,SAAS,EAAE,QAAQ,CAAC,aAAa,CAAC,gBAAgB;aACnD,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CAAC,4BAA4B,EAAE,KAAK,CAAC,CAAC;YACnD,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,cAAc;QAClB,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAMvC,6BAAgB,CAAC,CAAC;YACrB,MAAM,IAAI,GAAG,QAAQ,CAAC,iBAAiB,CAAC;YACxC,OAAO;gBACL,KAAK,EAAE,IAAI,EAAE,KAAK;gBAClB,cAAc,EAAE,IAAI,EAAE,kBAAkB,EAAE,SAAS,IAAI,EAAE;gBACzD,mBAAmB,EAAE,IAAI,EAAE,mBAAmB,IAAI,EAAE;aACrD,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CAAC,4BAA4B,EAAE,KAAK,CAAC,CAAC;YACnD,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC;CACF;AA9CD,wCA8CC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"description-map.d.ts","sourceRoot":"","sources":["../../src/generated/description-map.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"description-map.d.ts","sourceRoot":"","sources":["../../src/generated/description-map.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAowFjD,CAAC"}
|
|
@@ -1578,12 +1578,13 @@ Get query results from a rule evaluation:
|
|
|
1578
1578
|
\`\`\``,
|
|
1579
1579
|
"list-accounts.md": `# List Accounts Tool
|
|
1580
1580
|
|
|
1581
|
-
List the JupiterOne accounts the authenticated user can access. Returns each account's \`accountId
|
|
1581
|
+
List the JupiterOne accounts the authenticated user can access. Returns each account's \`accountId\`, a human-readable \`displayName\`, and — when the host can construct one — \`mcpUrl\`, the connector/server URL that pins that account. The list is scoped to the user's memberships. Membership is not a guarantee of live access, though — an account may still reject the connection if access was revoked or disabled, or if it requires a different sign-in method such as SSO.
|
|
1582
1582
|
|
|
1583
1583
|
## When to use
|
|
1584
1584
|
|
|
1585
1585
|
- Call this **first** when no specific account is configured and other tools ask for an \`accountId\`.
|
|
1586
1586
|
- Use it to map an account **name** the user mentions to the \`accountId\` those tools require — always pass the \`accountId\`, never the display name.
|
|
1587
|
+
- When a connection is pinned to an account the user cannot access (data tools return "Not authorized"), call this to find the right account and give the user its \`mcpUrl\` to reconfigure the connector.
|
|
1587
1588
|
|
|
1588
1589
|
## Working across multiple accounts
|
|
1589
1590
|
|
|
@@ -1740,21 +1741,26 @@ To get all rules across multiple pages:
|
|
|
1740
1741
|
4. Repeat until \`hasNextPage\` is false`,
|
|
1741
1742
|
"test-connection.md": `# Test Connection Tool
|
|
1742
1743
|
|
|
1743
|
-
Test the connection to JupiterOne
|
|
1744
|
+
Test the connection to JupiterOne and verify the caller's access to the target account. On success it also reports who you are and a summary of what you're allowed to do, so you can plan tool usage before making calls.
|
|
1744
1745
|
|
|
1745
1746
|
## Parameters
|
|
1746
1747
|
None required.
|
|
1747
1748
|
|
|
1748
1749
|
## Example Usage
|
|
1749
|
-
Test the connection:
|
|
1750
1750
|
\`\`\`json
|
|
1751
1751
|
{}
|
|
1752
1752
|
\`\`\`
|
|
1753
1753
|
|
|
1754
1754
|
## Returns
|
|
1755
1755
|
- \`connected\`: whether the account could be reached and authorized.
|
|
1756
|
-
- \`account\`: account details when
|
|
1757
|
-
- \`
|
|
1756
|
+
- \`account\`: account details (id, name, subdomain) when connected.
|
|
1757
|
+
- \`user.email\`: the identity your token resolves to — surface this to the user if there is any doubt about which sign-in is active.
|
|
1758
|
+
- \`permissions.resourceAreas\`: per-area \`{create, read, update, delete}\` summary (e.g. \`dashboard\`, \`rule\`, \`integration\`). A \`true\` means at least one fine-grained grant exists. **Check this before calling write tools** — e.g. if \`dashboard.create\` is false and \`hasBroadAccess\` is also false, tell the user they lack dashboard-create permission instead of attempting it.
|
|
1759
|
+
- \`permissions.hasBroadAccess\`: true when the caller is a full account admin. When this is true, \`resourceAreas\` may show \`false\` for areas the caller can actually use (admins often have no per-area rows) — so attempt the operation rather than refusing on an empty \`resourceAreas\`.
|
|
1760
|
+
|
|
1761
|
+
## Failure
|
|
1762
|
+
A failed test returns an error result whose text explains why and what to do next. When the failure is an authorization rejection and account discovery is available, the text includes the accounts your sign-in CAN access (with connector URLs) — relay these to the user so they can fix the connector's account binding. Do not loop on re-authentication: if the text says the pinned account is inaccessible, re-authenticating will not fix it.
|
|
1763
|
+
`,
|
|
1758
1764
|
"update-dashboard-widget.md": `# Update Dashboard Widget Tool
|
|
1759
1765
|
|
|
1760
1766
|
Updates an existing widget on a dashboard — for example, to fix its query, rename it, or change its chart type.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"description-map.js","sourceRoot":"","sources":["../../src/generated/description-map.ts"],"names":[],"mappings":";;;AAAA,2CAA2C;AAC9B,QAAA,cAAc,GAA2B;IACpD,4BAA4B,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2FAsU2D;IACzF,qBAAqB,EAAE;;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
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { McpServer } from '@modelcontextprotocol/
|
|
1
|
+
import { McpServer } from '@modelcontextprotocol/server';
|
|
2
|
+
import type { McpHttpHandler } from '@modelcontextprotocol/server';
|
|
2
3
|
import { JupiterOneConfig } from '../types/jupiterone.js';
|
|
3
4
|
import type { AccountResolver } from './tools/types.js';
|
|
4
5
|
import { type ToolTelemetry } from './tools/telemetry.js';
|
|
@@ -20,7 +21,15 @@ export declare class JupiterOneMcpServer {
|
|
|
20
21
|
private telemetry;
|
|
21
22
|
private envAccountId?;
|
|
22
23
|
private resolveAccounts?;
|
|
24
|
+
private stdioHandle?;
|
|
23
25
|
constructor(config: JupiterOneConfig, options?: JupiterOneMcpServerOptions);
|
|
26
|
+
/**
|
|
27
|
+
* Construct a fresh SDK server with every tool registered. The constructor builds one for the
|
|
28
|
+
* host to attach a transport to (the remote's per-request usage); `start()`'s stdio factory
|
|
29
|
+
* builds one per connection, as `serveStdio` pins an instance per connection and may discard an
|
|
30
|
+
* extra one for a `server/discover` probe.
|
|
31
|
+
*/
|
|
32
|
+
private buildSdkServer;
|
|
24
33
|
/**
|
|
25
34
|
* Build the per-call tool context passed to handlers — currently just the host-supplied account
|
|
26
35
|
* resolver, consumed by the account-discovery tool.
|
|
@@ -43,6 +52,18 @@ export declare class JupiterOneMcpServer {
|
|
|
43
52
|
private scopeCall;
|
|
44
53
|
private static readonly MISSING_ACCOUNT_MESSAGE;
|
|
45
54
|
private invoke;
|
|
55
|
+
/**
|
|
56
|
+
* Fetch-shaped MCP handler serving both protocol eras (2026-07-28 envelopes and legacy
|
|
57
|
+
* `initialize` traffic) from this server's tool registry, for HTTP hosts. Exposed from the core
|
|
58
|
+
* so the whole protocol object graph comes from ONE compiled copy of the SDK: the ESM and CJS
|
|
59
|
+
* builds of @modelcontextprotocol/server mangle private protocol fields differently, so a host
|
|
60
|
+
* must not combine its own `createMcpHandler` with a core-built `McpServer` (the ESM build's
|
|
61
|
+
* modern path reads `_supportedProtocolVersions`, which a CJS-built instance stores under a
|
|
62
|
+
* mangled name). Hosts adapt `handler.fetch` with `toNodeHandler(...)` or serve it directly.
|
|
63
|
+
*/
|
|
64
|
+
createHttpHandler(options?: {
|
|
65
|
+
onerror?: (error: Error) => void;
|
|
66
|
+
}): McpHttpHandler;
|
|
46
67
|
start(): Promise<void>;
|
|
47
68
|
stop(): Promise<void>;
|
|
48
69
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-server.d.ts","sourceRoot":"","sources":["../../src/server/mcp-server.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"mcp-server.d.ts","sourceRoot":"","sources":["../../src/server/mcp-server.ts"],"names":[],"mappings":"AACA,OAAO,EAAoB,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAC3E,OAAO,KAAK,EACV,cAAc,EAGf,MAAM,8BAA8B,CAAC;AAGtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAK1D,OAAO,KAAK,EAAE,eAAe,EAA2C,MAAM,kBAAkB,CAAC;AACjG,OAAO,EAAmB,KAAK,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAuB3E,MAAM,WAAW,0BAA0B;IACzC,6EAA6E;IAC7E,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B;;;;OAIG;IACH,eAAe,CAAC,EAAE,eAAe,CAAC;CACnC;AAED,qBAAa,mBAAmB;IACvB,MAAM,EAAE,SAAS,CAAC;IACzB,OAAO,CAAC,MAAM,CAAmB;IACjC,OAAO,CAAC,SAAS,CAAgB;IACjC,OAAO,CAAC,aAAa,CAAU;IAC/B,OAAO,CAAC,SAAS,CAAgB;IACjC,OAAO,CAAC,YAAY,CAAC,CAAS;IAC9B,OAAO,CAAC,eAAe,CAAC,CAAkB;IAC1C,OAAO,CAAC,WAAW,CAAC,CAA6B;gBAErC,MAAM,EAAE,gBAAgB,EAAE,OAAO,GAAE,0BAA+B;IAY9E;;;;;OAKG;IACH,OAAO,CAAC,cAAc;IA2BtB;;;OAGG;IACH,OAAO,CAAC,WAAW;IAInB;;;;OAIG;IACH,OAAO,CAAC,QAAQ;IAKhB,oDAAoD;IACpD,OAAO,CAAC,UAAU;IAYlB,OAAO,CAAC,gBAAgB;IAsBxB;;;;OAIG;IACH,OAAO,CAAC,SAAS;IA2BjB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,uBAAuB,CAC0G;YAE3I,MAAM;IAwDpB;;;;;;;;OAQG;IACH,iBAAiB,CAAC,OAAO,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAA;KAAE,GAAG,cAAc;IAI3E,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAStB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAM5B"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.JupiterOneMcpServer = void 0;
|
|
4
|
-
const
|
|
5
|
-
const
|
|
4
|
+
const stdio_1 = require("@modelcontextprotocol/server/stdio");
|
|
5
|
+
const server_1 = require("@modelcontextprotocol/server");
|
|
6
6
|
const zod_1 = require("zod");
|
|
7
7
|
const jupiterone_client_js_1 = require("../client/jupiterone-client.js");
|
|
8
8
|
const package_json_1 = require("../../package.json");
|
|
@@ -20,44 +20,61 @@ class JupiterOneMcpServer {
|
|
|
20
20
|
telemetry;
|
|
21
21
|
envAccountId;
|
|
22
22
|
resolveAccounts;
|
|
23
|
+
stdioHandle;
|
|
23
24
|
constructor(config, options = {}) {
|
|
24
25
|
this.client = new jupiterone_client_js_1.JupiterOneClient(config);
|
|
25
26
|
// Stateless — validation is a local parse (no client/account scope), so one instance serves
|
|
26
27
|
// every request, including multi-tenant clones.
|
|
27
28
|
this.validator = new j1ql_validator_js_1.J1QLValidator();
|
|
28
|
-
this.
|
|
29
|
+
this.isMultiTenant = !config.accountId;
|
|
30
|
+
this.envAccountId = config.accountId || undefined;
|
|
31
|
+
this.telemetry = options.telemetry ?? telemetry_js_1.stderrTelemetry;
|
|
32
|
+
this.resolveAccounts = options.resolveAccounts;
|
|
33
|
+
this.server = this.buildSdkServer();
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Construct a fresh SDK server with every tool registered. The constructor builds one for the
|
|
37
|
+
* host to attach a transport to (the remote's per-request usage); `start()`'s stdio factory
|
|
38
|
+
* builds one per connection, as `serveStdio` pins an instance per connection and may discard an
|
|
39
|
+
* extra one for a `server/discover` probe.
|
|
40
|
+
*/
|
|
41
|
+
buildSdkServer() {
|
|
42
|
+
const server = new server_1.McpServer({
|
|
29
43
|
name: 'jupiterone-mcp',
|
|
30
44
|
title: 'JupiterOne',
|
|
31
45
|
version: package_json_1.version,
|
|
32
46
|
websiteUrl: 'https://www.jupiterone.com',
|
|
33
47
|
icons: [icon_js_1.JUPITERONE_ICON],
|
|
48
|
+
}, {
|
|
49
|
+
// SEP-2549 cache hints, emitted only on 2026-era responses (the 2025-era wire never
|
|
50
|
+
// carries them). The tool list is static per deploy, so let clients cache it for an hour
|
|
51
|
+
// instead of re-fetching on every session start. `private`: the list varies by connection
|
|
52
|
+
// mode (multi-tenant injects a required accountId parameter; pinned does not).
|
|
53
|
+
cacheHints: { 'tools/list': { ttlMs: 3_600_000, cacheScope: 'private' } },
|
|
34
54
|
});
|
|
35
|
-
this.isMultiTenant = !config.accountId;
|
|
36
|
-
this.envAccountId = config.accountId || undefined;
|
|
37
|
-
this.telemetry = options.telemetry ?? telemetry_js_1.stderrTelemetry;
|
|
38
|
-
this.resolveAccounts = options.resolveAccounts;
|
|
39
55
|
for (const tool of index_js_1.allTools) {
|
|
40
56
|
// Account-discovery tools need a host-supplied resolver (the multi-tenant remote); skip them
|
|
41
57
|
// when none is provided (stdio / fixed-account connectors have nothing to list or select).
|
|
42
58
|
if (tool.requiresAccountResolver && !this.resolveAccounts)
|
|
43
59
|
continue;
|
|
44
|
-
this.register(tool);
|
|
60
|
+
this.register(server, tool);
|
|
45
61
|
}
|
|
62
|
+
return server;
|
|
46
63
|
}
|
|
47
64
|
/**
|
|
48
65
|
* Build the per-call tool context passed to handlers — currently just the host-supplied account
|
|
49
66
|
* resolver, consumed by the account-discovery tool.
|
|
50
67
|
*/
|
|
51
68
|
toolContext() {
|
|
52
|
-
return { resolveAccounts: this.resolveAccounts };
|
|
69
|
+
return { resolveAccounts: this.resolveAccounts, pinnedAccountId: this.envAccountId };
|
|
53
70
|
}
|
|
54
71
|
/**
|
|
55
72
|
* Single registration chokepoint: injects the per-request `accountId` parameter when no env
|
|
56
73
|
* account is configured, then wraps every handler with account-scoped client cloning, sanitized
|
|
57
74
|
* error formatting (C2), and per-call telemetry (O1).
|
|
58
75
|
*/
|
|
59
|
-
register(tool) {
|
|
60
|
-
const registerTool =
|
|
76
|
+
register(server, tool) {
|
|
77
|
+
const registerTool = server.registerTool.bind(server);
|
|
61
78
|
registerTool(tool.name, this.toolConfig(tool), (params) => this.invoke(tool, params));
|
|
62
79
|
}
|
|
63
80
|
/** Build the SDK registration config for a tool. */
|
|
@@ -127,8 +144,12 @@ class JupiterOneMcpServer {
|
|
|
127
144
|
let result;
|
|
128
145
|
try {
|
|
129
146
|
result = await tool.handler(toolParams, client, this.validator, this.toolContext());
|
|
130
|
-
if (result.isError)
|
|
147
|
+
if (result.isError) {
|
|
131
148
|
outcome = 'error';
|
|
149
|
+
// Returned error envelopes (not-found, validation, authz frames) carry their message in the
|
|
150
|
+
// first text block; capture it so NR can categorize them like thrown errors.
|
|
151
|
+
errorMessage = result.content[0]?.text?.slice(0, 200);
|
|
152
|
+
}
|
|
132
153
|
return result;
|
|
133
154
|
}
|
|
134
155
|
catch (error) {
|
|
@@ -140,7 +161,10 @@ class JupiterOneMcpServer {
|
|
|
140
161
|
const deniedStatus = (0, errors_js_1.accessDeniedStatus)(error);
|
|
141
162
|
result =
|
|
142
163
|
deniedStatus !== null
|
|
143
|
-
? (0, errors_js_1.accessDeniedResult)(deniedStatus,
|
|
164
|
+
? (0, errors_js_1.accessDeniedResult)(deniedStatus, {
|
|
165
|
+
hasAccountDiscovery: !!this.resolveAccounts,
|
|
166
|
+
pinnedAccountId: this.envAccountId,
|
|
167
|
+
})
|
|
144
168
|
: tool.formatError
|
|
145
169
|
? tool.formatError(error, toolParams, this.validator)
|
|
146
170
|
: (0, errors_js_1.toErrorResponse)(error, tool.errorContext);
|
|
@@ -160,12 +184,31 @@ class JupiterOneMcpServer {
|
|
|
160
184
|
});
|
|
161
185
|
}
|
|
162
186
|
}
|
|
187
|
+
/**
|
|
188
|
+
* Fetch-shaped MCP handler serving both protocol eras (2026-07-28 envelopes and legacy
|
|
189
|
+
* `initialize` traffic) from this server's tool registry, for HTTP hosts. Exposed from the core
|
|
190
|
+
* so the whole protocol object graph comes from ONE compiled copy of the SDK: the ESM and CJS
|
|
191
|
+
* builds of @modelcontextprotocol/server mangle private protocol fields differently, so a host
|
|
192
|
+
* must not combine its own `createMcpHandler` with a core-built `McpServer` (the ESM build's
|
|
193
|
+
* modern path reads `_supportedProtocolVersions`, which a CJS-built instance stores under a
|
|
194
|
+
* mangled name). Hosts adapt `handler.fetch` with `toNodeHandler(...)` or serve it directly.
|
|
195
|
+
*/
|
|
196
|
+
createHttpHandler(options) {
|
|
197
|
+
return (0, server_1.createMcpHandler)(() => this.buildSdkServer(), options);
|
|
198
|
+
}
|
|
163
199
|
async start() {
|
|
164
|
-
|
|
165
|
-
|
|
200
|
+
// serveStdio owns the connection's era: a 2026-07-28 envelope opening gets the modern
|
|
201
|
+
// per-request protocol, a legacy `initialize` is served exactly as the old
|
|
202
|
+
// connect(StdioServerTransport) wiring served it. One factory-built instance is pinned per
|
|
203
|
+
// connection; a `server/discover` probe may consume a discardable extra instance, which is why
|
|
204
|
+
// the factory builds fresh servers instead of handing out `this.server`.
|
|
205
|
+
this.stdioHandle = (0, stdio_1.serveStdio)(() => this.buildSdkServer());
|
|
166
206
|
}
|
|
167
207
|
async stop() {
|
|
168
|
-
//
|
|
208
|
+
// Cleared before awaiting so repeated stop() calls never close the same handle twice.
|
|
209
|
+
const handle = this.stdioHandle;
|
|
210
|
+
this.stdioHandle = undefined;
|
|
211
|
+
await handle?.close();
|
|
169
212
|
}
|
|
170
213
|
}
|
|
171
214
|
exports.JupiterOneMcpServer = JupiterOneMcpServer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-server.js","sourceRoot":"","sources":["../../src/server/mcp-server.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"mcp-server.js","sourceRoot":"","sources":["../../src/server/mcp-server.ts"],"names":[],"mappings":";;;AAAA,8DAAgE;AAChE,yDAA2E;AAM3E,6BAAwB;AACxB,yEAAkE;AAElE,qDAA6C;AAC7C,kEAA2D;AAC3D,+CAA4C;AAC5C,iDAA4F;AAE5F,uDAA2E;AAC3E,uCAA4C;AAC5C,+CAAmF;AAgCnF,MAAa,mBAAmB;IACvB,MAAM,CAAY;IACjB,MAAM,CAAmB;IACzB,SAAS,CAAgB;IACzB,aAAa,CAAU;IACvB,SAAS,CAAgB;IACzB,YAAY,CAAU;IACtB,eAAe,CAAmB;IAClC,WAAW,CAA8B;IAEjD,YAAY,MAAwB,EAAE,UAAsC,EAAE;QAC5E,IAAI,CAAC,MAAM,GAAG,IAAI,uCAAgB,CAAC,MAAM,CAAC,CAAC;QAC3C,4FAA4F;QAC5F,gDAAgD;QAChD,IAAI,CAAC,SAAS,GAAG,IAAI,iCAAa,EAAE,CAAC;QACrC,IAAI,CAAC,aAAa,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC;QACvC,IAAI,CAAC,YAAY,GAAG,MAAM,CAAC,SAAS,IAAI,SAAS,CAAC;QAClD,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS,IAAI,8BAAe,CAAC;QACtD,IAAI,CAAC,eAAe,GAAG,OAAO,CAAC,eAAe,CAAC;QAC/C,I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CAAC,GAAG,EAAE,GAAG,SAAS;gBAClC,UAAU;gBACV,YAAY;gBACZ,SAAS;gBACT,MAAM;gBACN,KAAK,EAAE,IAAA,yBAAc,EAAC,UAAU,CAAC;gBACjC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,IAAA,0BAAe,EAAC,MAAM,CAAC,CAAC,CAAC,CAAC,SAAS;aACrD,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED;;;;;;;;OAQG;IACH,iBAAiB,CAAC,OAA8C;QAC9D,OAAO,IAAA,yBAAgB,EAAC,GAAG,EAAE,CAAC,IAAI,CAAC,cAAc,EAAE,EAAE,OAAO,CAAC,CAAC;IAChE,CAAC;IAED,KAAK,CAAC,KAAK;QACT,sFAAsF;QACtF,2EAA2E;QAC3E,2FAA2F;QAC3F,+FAA+F;QAC/F,yEAAyE;QACzE,IAAI,CAAC,WAAW,GAAG,IAAA,kBAAU,EAAC,GAAG,EAAE,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC,CAAC;IAC7D,CAAC;IAED,KAAK,CAAC,IAAI;QACR,sFAAsF;QACtF,MAAM,MAAM,GAAG,IAAI,CAAC,WAAW,CAAC;QAChC,IAAI,CAAC,WAAW,GAAG,SAAS,CAAC;QAC7B,MAAM,MAAM,EAAE,KAAK,EAAE,CAAC;IACxB,CAAC;;AAlOH,kDAmOC"}
|
|
@@ -1,3 +1,28 @@
|
|
|
1
1
|
import { type ToolDefinition } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Whether the caller is a full account admin. RBAC `resourceAreas` can be all-false for such users
|
|
4
|
+
* (they have no per-resource-group rows), so this flags that `resourceAreas` may understate access —
|
|
5
|
+
* a caller seeing a false area should still attempt the operation.
|
|
6
|
+
*/
|
|
7
|
+
export declare function hasBroadAbacAccess(statements: string[]): boolean;
|
|
8
|
+
type AreaSummary = {
|
|
9
|
+
create: boolean;
|
|
10
|
+
read: boolean;
|
|
11
|
+
update: boolean;
|
|
12
|
+
delete: boolean;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Coarse any-grant fold of iamGetCurrentUser resourcePermissions rows: true means at least one
|
|
16
|
+
* grant exists for that action in that area. The authoritative check stays with the API — a user
|
|
17
|
+
* with broad ABAC access may legitimately have zero rows here.
|
|
18
|
+
*/
|
|
19
|
+
export declare function summarizeResourceAreas(rows: Array<{
|
|
20
|
+
resourceArea: string;
|
|
21
|
+
canCreate: boolean;
|
|
22
|
+
canRead: boolean;
|
|
23
|
+
canUpdate: boolean;
|
|
24
|
+
canDelete: boolean;
|
|
25
|
+
}>): Record<string, AreaSummary>;
|
|
2
26
|
export declare const accountTools: ToolDefinition[];
|
|
27
|
+
export {};
|
|
3
28
|
//# sourceMappingURL=account.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"account.d.ts","sourceRoot":"","sources":["../../../src/server/tools/account.ts"],"names":[],"mappings":"AAKA,OAAO,EAAyB,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"account.d.ts","sourceRoot":"","sources":["../../../src/server/tools/account.ts"],"names":[],"mappings":"AAKA,OAAO,EAAyB,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC;AAmCxE;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,OAAO,CAEhE;AAED,KAAK,WAAW,GAAG;IAAE,MAAM,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,OAAO,CAAA;CAAE,CAAC;AAExF;;;;GAIG;AACH,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,KAAK,CAAC;IAAE,YAAY,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,OAAO,CAAC;IAAC,SAAS,EAAE,OAAO,CAAC;IAAC,SAAS,EAAE,OAAO,CAAA;CAAE,CAAC,GAClH,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAe7B;AAeD,eAAO,MAAM,YAAY,EAAE,cAAc,EAyExC,CAAC"}
|