newrelic-mcp 1.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/LICENSE +21 -0
- package/README.md +430 -0
- package/dist/client/newrelic-client.d.ts +40 -0
- package/dist/client/newrelic-client.d.ts.map +1 -0
- package/dist/client/newrelic-client.js +173 -0
- package/dist/client/newrelic-client.js.map +1 -0
- package/dist/server.d.ts +24 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +204 -0
- package/dist/server.js.map +1 -0
- package/dist/tools/alert.d.ts +14 -0
- package/dist/tools/alert.d.ts.map +1 -0
- package/dist/tools/alert.js +183 -0
- package/dist/tools/alert.js.map +1 -0
- package/dist/tools/apm.d.ts +9 -0
- package/dist/tools/apm.d.ts.map +1 -0
- package/dist/tools/apm.js +33 -0
- package/dist/tools/apm.js.map +1 -0
- package/dist/tools/entity.d.ts +11 -0
- package/dist/tools/entity.d.ts.map +1 -0
- package/dist/tools/entity.js +140 -0
- package/dist/tools/entity.js.map +1 -0
- package/dist/tools/nerdgraph.d.ts +9 -0
- package/dist/tools/nerdgraph.d.ts.map +1 -0
- package/dist/tools/nerdgraph.js +33 -0
- package/dist/tools/nerdgraph.js.map +1 -0
- package/dist/tools/nrql.d.ts +25 -0
- package/dist/tools/nrql.d.ts.map +1 -0
- package/dist/tools/nrql.js +58 -0
- package/dist/tools/nrql.js.map +1 -0
- package/dist/tools/synthetics.d.ts +12 -0
- package/dist/tools/synthetics.d.ts.map +1 -0
- package/dist/tools/synthetics.js +149 -0
- package/dist/tools/synthetics.js.map +1 -0
- package/package.json +96 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NerdGraphTool = void 0;
|
|
4
|
+
class NerdGraphTool {
|
|
5
|
+
client;
|
|
6
|
+
constructor(client) {
|
|
7
|
+
this.client = client;
|
|
8
|
+
}
|
|
9
|
+
getQueryTool() {
|
|
10
|
+
return {
|
|
11
|
+
name: 'run_nerdgraph_query',
|
|
12
|
+
description: 'Execute a custom NerdGraph GraphQL query',
|
|
13
|
+
inputSchema: {
|
|
14
|
+
type: 'object',
|
|
15
|
+
properties: {
|
|
16
|
+
query: {
|
|
17
|
+
type: 'string',
|
|
18
|
+
description: 'The GraphQL query to execute',
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
required: ['query'],
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
async execute(input) {
|
|
26
|
+
if (!input.query || typeof input.query !== 'string') {
|
|
27
|
+
throw new Error('Invalid or empty GraphQL query provided');
|
|
28
|
+
}
|
|
29
|
+
return await this.client.executeNerdGraphQuery(input.query);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
exports.NerdGraphTool = NerdGraphTool;
|
|
33
|
+
//# sourceMappingURL=nerdgraph.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nerdgraph.js","sourceRoot":"","sources":["../../src/tools/nerdgraph.ts"],"names":[],"mappings":";;;AAGA,MAAa,aAAa;IAChB,MAAM,CAAiB;IAE/B,YAAY,MAAsB;QAChC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED,YAAY;QACV,OAAO;YACL,IAAI,EAAE,qBAAqB;YAC3B,WAAW,EAAE,0CAA0C;YACvD,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACV,KAAK,EAAE;wBACL,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,8BAA8B;qBAC5C;iBACF;gBACD,QAAQ,EAAE,CAAC,OAAO,CAAC;aACpB;SACF,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,KAAU;QACtB,IAAI,CAAC,KAAK,CAAC,KAAK,IAAI,OAAO,KAAK,CAAC,KAAK,KAAK,QAAQ,EAAE,CAAC;YACpD,MAAM,IAAI,KAAK,CAAC,yCAAyC,CAAC,CAAC;QAC7D,CAAC;QAED,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,qBAAqB,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAC9D,CAAC;CACF;AA/BD,sCA+BC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
2
|
+
import type { NewRelicClient, NrqlQueryResult } from '../client/newrelic-client';
|
|
3
|
+
export declare class NrqlTool {
|
|
4
|
+
name: string;
|
|
5
|
+
description: string;
|
|
6
|
+
private client;
|
|
7
|
+
constructor(client: NewRelicClient);
|
|
8
|
+
getToolDefinition(): Tool;
|
|
9
|
+
getInputSchema(): {
|
|
10
|
+
type: "object";
|
|
11
|
+
properties: {
|
|
12
|
+
nrql: {
|
|
13
|
+
type: string;
|
|
14
|
+
description: string;
|
|
15
|
+
};
|
|
16
|
+
target_account_id: {
|
|
17
|
+
type: string;
|
|
18
|
+
description: string;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
required: string[];
|
|
22
|
+
};
|
|
23
|
+
execute(input: any): Promise<NrqlQueryResult>;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=nrql.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nrql.d.ts","sourceRoot":"","sources":["../../src/tools/nrql.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAE/D,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAOjF,qBAAa,QAAQ;IACnB,IAAI,SAAoB;IACxB,WAAW,SAA+E;IAC1F,OAAO,CAAC,MAAM,CAAiB;gBAEnB,MAAM,EAAE,cAAc;IAIlC,iBAAiB,IAAI,IAAI;IAQzB,cAAc;;;;;;;;;;;;;;IAiBR,OAAO,CAAC,KAAK,EAAE,GAAG,GAAG,OAAO,CAAC,eAAe,CAAC;CAqBpD"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NrqlTool = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const _NrqlInputSchema = zod_1.z.object({
|
|
6
|
+
nrql: zod_1.z.string().min(1),
|
|
7
|
+
target_account_id: zod_1.z.string().optional(),
|
|
8
|
+
});
|
|
9
|
+
class NrqlTool {
|
|
10
|
+
name = 'run_nrql_query';
|
|
11
|
+
description = 'Execute NRQL queries against New Relic data to analyze metrics and events';
|
|
12
|
+
client;
|
|
13
|
+
constructor(client) {
|
|
14
|
+
this.client = client;
|
|
15
|
+
}
|
|
16
|
+
getToolDefinition() {
|
|
17
|
+
return {
|
|
18
|
+
name: this.name,
|
|
19
|
+
description: this.description,
|
|
20
|
+
inputSchema: this.getInputSchema(),
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
getInputSchema() {
|
|
24
|
+
return {
|
|
25
|
+
type: 'object',
|
|
26
|
+
properties: {
|
|
27
|
+
nrql: {
|
|
28
|
+
type: 'string',
|
|
29
|
+
description: 'The NRQL query to execute',
|
|
30
|
+
},
|
|
31
|
+
target_account_id: {
|
|
32
|
+
type: 'string',
|
|
33
|
+
description: 'Optional New Relic account ID to query',
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
required: ['nrql'],
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
async execute(input) {
|
|
40
|
+
// Validate input
|
|
41
|
+
if (!input.nrql || typeof input.nrql !== 'string' || input.nrql.trim() === '') {
|
|
42
|
+
throw new Error('Invalid or empty NRQL query provided');
|
|
43
|
+
}
|
|
44
|
+
if (!input.target_account_id) {
|
|
45
|
+
throw new Error('Account ID must be provided');
|
|
46
|
+
}
|
|
47
|
+
if (input.target_account_id && !/^\d+$/.test(input.target_account_id)) {
|
|
48
|
+
throw new Error('Invalid account ID format');
|
|
49
|
+
}
|
|
50
|
+
const result = await this.client.runNrqlQuery({
|
|
51
|
+
nrql: input.nrql,
|
|
52
|
+
accountId: input.target_account_id,
|
|
53
|
+
});
|
|
54
|
+
return result;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
exports.NrqlTool = NrqlTool;
|
|
58
|
+
//# sourceMappingURL=nrql.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nrql.js","sourceRoot":"","sources":["../../src/tools/nrql.ts"],"names":[],"mappings":";;;AACA,6BAAwB;AAGxB,MAAM,gBAAgB,GAAG,OAAC,CAAC,MAAM,CAAC;IAChC,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACvB,iBAAiB,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACzC,CAAC,CAAC;AAEH,MAAa,QAAQ;IACnB,IAAI,GAAG,gBAAgB,CAAC;IACxB,WAAW,GAAG,2EAA2E,CAAC;IAClF,MAAM,CAAiB;IAE/B,YAAY,MAAsB;QAChC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED,iBAAiB;QACf,OAAO;YACL,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,WAAW,EAAE,IAAI,CAAC,cAAc,EAAE;SACnC,CAAC;IACJ,CAAC;IAED,cAAc;QACZ,OAAO;YACL,IAAI,EAAE,QAAiB;YACvB,UAAU,EAAE;gBACV,IAAI,EAAE;oBACJ,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,2BAA2B;iBACzC;gBACD,iBAAiB,EAAE;oBACjB,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,wCAAwC;iBACtD;aACF;YACD,QAAQ,EAAE,CAAC,MAAM,CAAC;SACnB,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,KAAU;QACtB,iBAAiB;QACjB,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,OAAO,KAAK,CAAC,IAAI,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;YAC9E,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAC;QAC1D,CAAC;QAED,IAAI,CAAC,KAAK,CAAC,iBAAiB,EAAE,CAAC;YAC7B,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAC;QACjD,CAAC;QAED,IAAI,KAAK,CAAC,iBAAiB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,EAAE,CAAC;YACtE,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;QAC/C,CAAC;QAED,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC;YAC5C,IAAI,EAAE,KAAK,CAAC,IAAI;YAChB,SAAS,EAAE,KAAK,CAAC,iBAAiB;SACnC,CAAC,CAAC;QAEH,OAAO,MAAM,CAAC;IAChB,CAAC;CACF;AAvDD,4BAuDC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
2
|
+
import type { NewRelicClient } from '../client/newrelic-client';
|
|
3
|
+
export declare class SyntheticsTool {
|
|
4
|
+
private client;
|
|
5
|
+
constructor(client: NewRelicClient);
|
|
6
|
+
getListMonitorsTool(): Tool;
|
|
7
|
+
getCreateMonitorTool(): Tool;
|
|
8
|
+
listSyntheticsMonitors(input: any): Promise<any>;
|
|
9
|
+
createBrowserMonitor(input: any): Promise<any>;
|
|
10
|
+
private frequencyToPeriod;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=synthetics.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"synthetics.d.ts","sourceRoot":"","sources":["../../src/tools/synthetics.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAC/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAEhE,qBAAa,cAAc;IACzB,OAAO,CAAC,MAAM,CAAiB;gBAEnB,MAAM,EAAE,cAAc;IAIlC,mBAAmB,IAAI,IAAI;IAqB3B,oBAAoB,IAAI,IAAI;IAmCtB,sBAAsB,CAAC,KAAK,EAAE,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC;IAqChD,oBAAoB,CAAC,KAAK,EAAE,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC;IA6CpD,OAAO,CAAC,iBAAiB;CAW1B"}
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SyntheticsTool = void 0;
|
|
4
|
+
class SyntheticsTool {
|
|
5
|
+
client;
|
|
6
|
+
constructor(client) {
|
|
7
|
+
this.client = client;
|
|
8
|
+
}
|
|
9
|
+
getListMonitorsTool() {
|
|
10
|
+
return {
|
|
11
|
+
name: 'list_synthetics_monitors',
|
|
12
|
+
description: 'List all Synthetics monitors in your New Relic account',
|
|
13
|
+
inputSchema: {
|
|
14
|
+
type: 'object',
|
|
15
|
+
properties: {
|
|
16
|
+
target_account_id: {
|
|
17
|
+
type: 'string',
|
|
18
|
+
description: 'Optional New Relic account ID',
|
|
19
|
+
},
|
|
20
|
+
monitor_type: {
|
|
21
|
+
type: 'string',
|
|
22
|
+
enum: ['SIMPLE', 'BROWSER', 'SCRIPT_API', 'SCRIPT_BROWSER'],
|
|
23
|
+
description: 'Filter by monitor type',
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
getCreateMonitorTool() {
|
|
30
|
+
return {
|
|
31
|
+
name: 'create_browser_monitor',
|
|
32
|
+
description: 'Create a new browser-based Synthetics monitor',
|
|
33
|
+
inputSchema: {
|
|
34
|
+
type: 'object',
|
|
35
|
+
properties: {
|
|
36
|
+
name: {
|
|
37
|
+
type: 'string',
|
|
38
|
+
description: 'Name of the monitor',
|
|
39
|
+
},
|
|
40
|
+
url: {
|
|
41
|
+
type: 'string',
|
|
42
|
+
description: 'URL to monitor',
|
|
43
|
+
},
|
|
44
|
+
frequency: {
|
|
45
|
+
type: 'number',
|
|
46
|
+
enum: [1, 5, 10, 15, 30, 60],
|
|
47
|
+
description: 'Check frequency in minutes',
|
|
48
|
+
},
|
|
49
|
+
locations: {
|
|
50
|
+
type: 'array',
|
|
51
|
+
items: { type: 'string' },
|
|
52
|
+
description: 'Location codes for monitoring',
|
|
53
|
+
},
|
|
54
|
+
target_account_id: {
|
|
55
|
+
type: 'string',
|
|
56
|
+
description: 'Optional New Relic account ID',
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
required: ['name', 'url', 'frequency', 'locations'],
|
|
60
|
+
},
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
async listSyntheticsMonitors(input) {
|
|
64
|
+
const accountId = input.target_account_id;
|
|
65
|
+
if (!accountId) {
|
|
66
|
+
throw new Error('Account ID must be provided');
|
|
67
|
+
}
|
|
68
|
+
let query = `domain = 'SYNTH' AND accountId = '${accountId}'`;
|
|
69
|
+
if (input.monitor_type) {
|
|
70
|
+
query += ` AND monitorType = '${input.monitor_type}'`;
|
|
71
|
+
}
|
|
72
|
+
const graphqlQuery = `{
|
|
73
|
+
actor {
|
|
74
|
+
entitySearch(query: "${query}") {
|
|
75
|
+
results {
|
|
76
|
+
entities {
|
|
77
|
+
... on SyntheticMonitorEntityOutline {
|
|
78
|
+
guid
|
|
79
|
+
name
|
|
80
|
+
monitorType
|
|
81
|
+
period
|
|
82
|
+
monitoredUrl
|
|
83
|
+
tags {
|
|
84
|
+
key
|
|
85
|
+
values
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}`;
|
|
93
|
+
const response = await this.client.executeNerdGraphQuery(graphqlQuery);
|
|
94
|
+
return response.data?.actor?.entitySearch?.results?.entities || [];
|
|
95
|
+
}
|
|
96
|
+
async createBrowserMonitor(input) {
|
|
97
|
+
const accountId = input.target_account_id;
|
|
98
|
+
if (!accountId) {
|
|
99
|
+
throw new Error('Account ID must be provided');
|
|
100
|
+
}
|
|
101
|
+
const mutation = `
|
|
102
|
+
mutation {
|
|
103
|
+
syntheticsCreateSimpleBrowserMonitor(
|
|
104
|
+
accountId: ${accountId}
|
|
105
|
+
monitor: {
|
|
106
|
+
name: "${input.name}"
|
|
107
|
+
uri: "${input.url}"
|
|
108
|
+
period: ${this.frequencyToPeriod(input.frequency)}
|
|
109
|
+
status: ENABLED
|
|
110
|
+
locations: {
|
|
111
|
+
public: ${JSON.stringify(input.locations)}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
) {
|
|
115
|
+
monitor {
|
|
116
|
+
id
|
|
117
|
+
name
|
|
118
|
+
uri
|
|
119
|
+
period
|
|
120
|
+
status
|
|
121
|
+
}
|
|
122
|
+
errors {
|
|
123
|
+
type
|
|
124
|
+
description
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
`;
|
|
129
|
+
const response = await this.client.executeNerdGraphQuery(mutation);
|
|
130
|
+
const result = response.data?.syntheticsCreateSimpleBrowserMonitor;
|
|
131
|
+
if (result?.errors && result.errors.length > 0) {
|
|
132
|
+
throw new Error(`Failed to create monitor: ${result.errors[0].description}`);
|
|
133
|
+
}
|
|
134
|
+
return result?.monitor || null;
|
|
135
|
+
}
|
|
136
|
+
frequencyToPeriod(frequency) {
|
|
137
|
+
const periodMap = {
|
|
138
|
+
1: 'EVERY_MINUTE',
|
|
139
|
+
5: 'EVERY_5_MINUTES',
|
|
140
|
+
10: 'EVERY_10_MINUTES',
|
|
141
|
+
15: 'EVERY_15_MINUTES',
|
|
142
|
+
30: 'EVERY_30_MINUTES',
|
|
143
|
+
60: 'EVERY_HOUR',
|
|
144
|
+
};
|
|
145
|
+
return periodMap[frequency] || 'EVERY_5_MINUTES';
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
exports.SyntheticsTool = SyntheticsTool;
|
|
149
|
+
//# sourceMappingURL=synthetics.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"synthetics.js","sourceRoot":"","sources":["../../src/tools/synthetics.ts"],"names":[],"mappings":"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"}
|
package/package.json
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "newrelic-mcp",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Model Context Protocol server for New Relic observability platform integration",
|
|
5
|
+
"main": "dist/server.js",
|
|
6
|
+
"bin": {
|
|
7
|
+
"newrelic-mcp": "./dist/server.js"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"dist/",
|
|
11
|
+
"README.md",
|
|
12
|
+
"LICENSE",
|
|
13
|
+
"package.json"
|
|
14
|
+
],
|
|
15
|
+
"directories": {
|
|
16
|
+
"test": "test",
|
|
17
|
+
"doc": "docs"
|
|
18
|
+
},
|
|
19
|
+
"repository": {
|
|
20
|
+
"type": "git",
|
|
21
|
+
"url": "git+https://github.com/cloudbring/newrelic-mcp.git"
|
|
22
|
+
},
|
|
23
|
+
"bugs": {
|
|
24
|
+
"url": "https://github.com/cloudbring/newrelic-mcp/issues"
|
|
25
|
+
},
|
|
26
|
+
"homepage": "https://github.com/cloudbring/newrelic-mcp#readme",
|
|
27
|
+
"scripts": {
|
|
28
|
+
"build": "tsc",
|
|
29
|
+
"dev": "tsx src/server.ts",
|
|
30
|
+
"start": "node dist/server.js",
|
|
31
|
+
"test": "vitest",
|
|
32
|
+
"test:ui": "vitest --ui",
|
|
33
|
+
"test:coverage": "vitest --coverage",
|
|
34
|
+
"test:integration": "USE_REAL_ENV=true vitest",
|
|
35
|
+
"test:bdd": "vitest --run test/features/**/*.spec.ts",
|
|
36
|
+
"test:unit": "vitest --run test/**/*.test.ts",
|
|
37
|
+
"test:eval": "evalite",
|
|
38
|
+
"test:eval:watch": "evalite watch",
|
|
39
|
+
"typecheck": "tsc --noEmit",
|
|
40
|
+
"lint": "biome check .",
|
|
41
|
+
"lint:fix": "biome check --write .",
|
|
42
|
+
"format": "biome format --write .",
|
|
43
|
+
"format:check": "biome format .",
|
|
44
|
+
"inspect": "npx @modelcontextprotocol/inspector node dist/server.js",
|
|
45
|
+
"inspect:dev": "npx @modelcontextprotocol/inspector tsx src/server.ts",
|
|
46
|
+
"inspect:env": "./scripts/run-inspector.sh",
|
|
47
|
+
"test:server": "node scripts/test-server.js",
|
|
48
|
+
"prepare": "husky"
|
|
49
|
+
},
|
|
50
|
+
"keywords": [
|
|
51
|
+
"mcp",
|
|
52
|
+
"modelcontextprotocol",
|
|
53
|
+
"newrelic",
|
|
54
|
+
"observability",
|
|
55
|
+
"monitoring",
|
|
56
|
+
"apm",
|
|
57
|
+
"nrql",
|
|
58
|
+
"alerts",
|
|
59
|
+
"synthetics",
|
|
60
|
+
"ai",
|
|
61
|
+
"llm",
|
|
62
|
+
"claude"
|
|
63
|
+
],
|
|
64
|
+
"author": "@cloudbring",
|
|
65
|
+
"license": "MIT",
|
|
66
|
+
"devDependencies": {
|
|
67
|
+
"@amiceli/vitest-cucumber": "^5.1.2",
|
|
68
|
+
"@biomejs/biome": "^2.1.3",
|
|
69
|
+
"@cucumber/gherkin": "^33.1.0",
|
|
70
|
+
"@types/node": "^24.2.0",
|
|
71
|
+
"@vitest/coverage-v8": "^3.2.4",
|
|
72
|
+
"@vitest/ui": "^3.2.4",
|
|
73
|
+
"autoevals": "^0.0.130",
|
|
74
|
+
"evalite": "^0.11.4",
|
|
75
|
+
"husky": "^9.1.7",
|
|
76
|
+
"lint-staged": "^16.1.4",
|
|
77
|
+
"tsx": "^4.20.3",
|
|
78
|
+
"typescript": "^5.9.2",
|
|
79
|
+
"ultracite": "^5.1.2",
|
|
80
|
+
"vitest": "^3.2.4"
|
|
81
|
+
},
|
|
82
|
+
"dependencies": {
|
|
83
|
+
"@modelcontextprotocol/sdk": "^1.17.1",
|
|
84
|
+
"@opentelemetry/api": "^1.9.0",
|
|
85
|
+
"@opentelemetry/auto-instrumentations-node": "^0.62.0",
|
|
86
|
+
"@opentelemetry/exporter-trace-otlp-http": "^0.203.0",
|
|
87
|
+
"@opentelemetry/instrumentation-winston": "^0.48.0",
|
|
88
|
+
"@opentelemetry/resources": "^2.0.1",
|
|
89
|
+
"@opentelemetry/sdk-node": "^0.203.0",
|
|
90
|
+
"@opentelemetry/semantic-conventions": "^1.36.0",
|
|
91
|
+
"dotenv": "^17.2.1",
|
|
92
|
+
"newrelic": "^13.0.0",
|
|
93
|
+
"winston": "^3.17.0",
|
|
94
|
+
"zod": "^3.25.76"
|
|
95
|
+
}
|
|
96
|
+
}
|