@clipform/mcp-server 2.10.2 → 2.10.3

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/index.js CHANGED
@@ -2,10 +2,10 @@
2
2
  import {
3
3
  JSONRPCMessageSchema,
4
4
  createServer
5
- } from "./chunk-NCWQ42GI.js";
6
- import "./chunk-4QF4KGPE.js";
7
- import "./chunk-UBJ7CZL2.js";
8
- import "./chunk-IL26A4IN.js";
5
+ } from "./chunk-ZOBK6CK7.js";
6
+ import "./chunk-QZO6MGNN.js";
7
+ import "./chunk-A5RVUIGS.js";
8
+ import "./chunk-O35IVA4L.js";
9
9
  import "./chunk-ENHVQDSI.js";
10
10
  import {
11
11
  setMcpVersion
@@ -12,9 +12,21 @@ declare function getMcpAnalyticsClient(): McpAnalyticsClient | null;
12
12
  * Pulled out so the options object is unit-testable without standing up the
13
13
  * raw-HTTP handler.
14
14
  */
15
+ interface InstrumentServerOptions {
16
+ /**
17
+ * Inject PostHog's `get_more_tools` virtual tool (default true). Off for
18
+ * the Claude Connectors Directory surface (#3681): the reviewer's tool
19
+ * scan sees every listed tool, and a third-party virtual tool whose
20
+ * description nudges the model to call it - and whose only input is a
21
+ * free-text description of the user's goal - reads as both a
22
+ * prompt-injection pattern and conversation-data collection under the
23
+ * directory policy. The bare endpoint keeps it for the mcp-miner sweep.
24
+ */
25
+ reportMissing?: boolean;
26
+ }
15
27
  declare function buildInstrumentOptions(mcpAuth: {
16
28
  user_id?: string;
17
- } | null): MCPAnalyticsOptions;
29
+ } | null, opts?: InstrumentServerOptions): MCPAnalyticsOptions;
18
30
  /**
19
31
  * Wraps the per-request/per-connection server with PostHog MCP analytics
20
32
  * (#3408, extended in-process #3432), additively - `mcp_request`/`$exception`
@@ -25,6 +37,6 @@ declare function buildInstrumentOptions(mcpAuth: {
25
37
  */
26
38
  declare function instrumentServer(server: unknown, posthogClient: McpAnalyticsClient | null, mcpAuth: {
27
39
  user_id?: string;
28
- } | null): void;
40
+ } | null, opts?: InstrumentServerOptions): void;
29
41
 
30
- export { buildInstrumentOptions, getMcpAnalyticsClient, instrumentServer, setMcpAnalyticsClient };
42
+ export { type InstrumentServerOptions, buildInstrumentOptions, getMcpAnalyticsClient, instrumentServer, setMcpAnalyticsClient };
@@ -5236,7 +5236,7 @@ function setMcpAnalyticsClient(client) {
5236
5236
  function getMcpAnalyticsClient() {
5237
5237
  return installedClient;
5238
5238
  }
5239
- function buildInstrumentOptions(mcpAuth) {
5239
+ function buildInstrumentOptions(mcpAuth, opts = {}) {
5240
5240
  return {
5241
5241
  context: {
5242
5242
  description: "Describe the user's underlying goal in one sentence - not the tool you're calling."
@@ -5263,13 +5263,13 @@ function buildInstrumentOptions(mcpAuth) {
5263
5263
  // tool covers. Injected by the wrapper only - never touches
5264
5264
  // packages/mcp-server's own catalog, so it does not trip the MCP
5265
5265
  // parity/catalog tests.
5266
- reportMissing: true
5266
+ reportMissing: opts.reportMissing ?? true
5267
5267
  };
5268
5268
  }
5269
- function instrumentServer(server, posthogClient, mcpAuth) {
5269
+ function instrumentServer(server, posthogClient, mcpAuth, opts = {}) {
5270
5270
  if (!posthogClient) return;
5271
5271
  try {
5272
- instrument(server, posthogClient, buildInstrumentOptions(mcpAuth));
5272
+ instrument(server, posthogClient, buildInstrumentOptions(mcpAuth, opts));
5273
5273
  } catch (err) {
5274
5274
  console.error("[mcp] Failed to instrument server for PostHog MCP analytics:", err);
5275
5275
  }