@salesforce/mcp 0.21.4 → 0.22.1

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.
Files changed (2) hide show
  1. package/lib/telemetry.js +8 -1
  2. package/package.json +6 -6
package/lib/telemetry.js CHANGED
@@ -19,6 +19,8 @@ import { join } from 'node:path';
19
19
  import { TelemetryReporter } from '@salesforce/telemetry';
20
20
  import { warn } from '@oclif/core/ux';
21
21
  const PROJECT = 'salesforce-mcp-server';
22
+ // WARN: This is intentionally empty! It's populated at the time of publish
23
+ // This is to prevent telemetry pollution from local clones and forks
22
24
  const APP_INSIGHTS_KEY = 'InstrumentationKey=2ca64abb-6123-4c7b-bd9e-4fe73e71fe9c;IngestionEndpoint=https://eastus-1.in.applicationinsights.azure.com/;LiveEndpoint=https://eastus.livediagnostics.monitor.azure.com/;ApplicationId=ecd8fa7a-0e0d-4109-94db-4d7878ada862';
23
25
  const generateRandomId = () => randomBytes(20).toString('hex');
24
26
  const getCliId = (cacheDir) => {
@@ -70,7 +72,10 @@ export class Telemetry {
70
72
  constructor(config, attributes = {}) {
71
73
  this.config = config;
72
74
  this.attributes = attributes;
73
- warn('You acknowledge and agree that the MCP server may collect usage information, user environment, and crash reports for the purposes of providing services or functions that are relevant to use of the MCP server and product improvements.');
75
+ const startupMessage = APP_INSIGHTS_KEY
76
+ ? 'You acknowledge and agree that the MCP server may collect usage information, user environment, and crash reports for the purposes of providing services or functions that are relevant to use of the MCP server and product improvements.'
77
+ : 'Telemetry is automatically disabled for local development.';
78
+ warn(startupMessage);
74
79
  this.sessionId = generateRandomId();
75
80
  this.cliId = getCliId(config.cacheDir);
76
81
  }
@@ -105,6 +110,8 @@ export class Telemetry {
105
110
  async start() {
106
111
  if (this.started)
107
112
  return;
113
+ if (!APP_INSIGHTS_KEY)
114
+ return;
108
115
  this.started = true;
109
116
  try {
110
117
  this.reporter = await McpTelemetryReporter.create({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/mcp",
3
- "version": "0.21.4",
3
+ "version": "0.22.1",
4
4
  "description": "MCP Server for interacting with Salesforce instances",
5
5
  "bin": {
6
6
  "sf-mcp-server": "bin/run.js"
@@ -41,12 +41,12 @@
41
41
  "@salesforce/core": "^8.23.1",
42
42
  "@salesforce/kit": "^3.1.6",
43
43
  "@salesforce/mcp-provider-api": "0.4.0",
44
- "@salesforce/mcp-provider-dx-core": "0.3.4",
44
+ "@salesforce/mcp-provider-dx-core": "0.3.5",
45
45
  "@salesforce/mcp-provider-code-analyzer": "0.2.0",
46
- "@salesforce/mcp-provider-lwc-experts": "0.5.2",
47
- "@salesforce/mcp-provider-aura-experts": "0.3.2",
48
- "@salesforce/mcp-provider-mobile-web": "0.1.1",
49
- "@salesforce/mcp-provider-devops": "0.1.3",
46
+ "@salesforce/mcp-provider-lwc-experts": "0.6.0",
47
+ "@salesforce/mcp-provider-aura-experts": "0.3.3",
48
+ "@salesforce/mcp-provider-mobile-web": "0.2.0",
49
+ "@salesforce/mcp-provider-devops": "0.1.5",
50
50
  "@salesforce/source-deploy-retrieve": "^12.22.0",
51
51
  "@salesforce/source-tracking": "^7.4.8",
52
52
  "@salesforce/telemetry": "^6.1.0",