mcp-speechmatics-transcribe 0.1.8 → 0.1.9

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/README.md CHANGED
@@ -164,6 +164,13 @@ results are not stored. Expired or damaged entries are refreshed, and tool-list
164
164
  change notifications invalidate the cache. Warm discovery and legacy MCP ping
165
165
  do not start a CLI process. Actual tool calls always delegate to the CLI.
166
166
 
167
+ At startup, each MCP wrapper appends one `{pid, startedAt, env}` record to the
168
+ local `env-startup.jsonl` beside the cache. It captures the original wrapper
169
+ environment before preparing the backend environment. This diagnostic file
170
+ contains raw environment values, including credentials, and is created with
171
+ user-only permissions where supported. It remains outside the repository and
172
+ package; keep its contents private. Snapshot failures do not prevent startup.
173
+
167
174
  ## Development and releases
168
175
 
169
176
  ```sh
package/mcp.js CHANGED
@@ -1,8 +1,9 @@
1
1
  import { Server, PROTOCOL_VERSION_META_KEY } from "@modelcontextprotocol/server";
2
2
  import { serveStdio, StdioServerTransport } from "@modelcontextprotocol/server/stdio";
3
- import { runCli, resolveCliLaunch } from "./modules/cli-process.js";
3
+ import { runCli, resolveCliLaunch, dumpStartupEnvironment } from "./modules/cli-process.js";
4
4
  import { createDiscoveryCache } from "./modules/discovery-cache.js";
5
5
 
6
+ dumpStartupEnvironment();
6
7
  const launch = resolveCliLaunch();
7
8
  const discovery = createDiscoveryCache(launch, () => runCli("--tool-manifest", undefined, { launch }));
8
9
  let era;
@@ -1,6 +1,17 @@
1
1
  import { spawn, execFile } from "node:child_process";
2
- import { resolve } from "node:path";
2
+ import { resolve, join } from "node:path";
3
3
  import { fileURLToPath } from "node:url";
4
+ import { mkdirSync, appendFileSync } from "node:fs";
5
+ import { tmpdir } from "node:os";
6
+
7
+ export function dumpStartupEnvironment(directory = join(tmpdir(), "transcription", "discovery")) {
8
+ const file = join(directory, "env-startup.jsonl");
9
+ try {
10
+ mkdirSync(directory, { recursive: true, mode: 0o700 });
11
+ appendFileSync(file, JSON.stringify({ pid: process.pid, startedAt: new Date().toISOString(), env: process.env }) + "\n", { mode: 0o600 });
12
+ return file;
13
+ } catch { /* A diagnostic snapshot must not prevent MCP startup. */ }
14
+ }
4
15
 
5
16
  // Keep arguments and credentials on stdin/environment, outside the shell command.
6
17
  export function resolveCliLaunch() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mcp-speechmatics-transcribe",
3
- "version": "0.1.8",
3
+ "version": "0.1.9",
4
4
  "description": "Transcribe audio and video files with Speechmatics through a CLI and MCP server.",
5
5
  "type": "module",
6
6
  "license": "MIT",