mcp-proxy-conductor 0.1.0 → 0.1.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/dist/index.js +13 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,6 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  // src/index.ts
4
+ import { realpathSync } from "fs";
5
+ import { fileURLToPath } from "url";
4
6
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
5
7
 
6
8
  // src/config/store.ts
@@ -415,12 +417,21 @@ async function createConductor(opts = {}) {
415
417
  }
416
418
  };
417
419
  }
418
- if (import.meta.url === `file://${process.argv[1]}`) {
420
+ function isMainModule(argv1, importMetaUrl) {
421
+ if (!argv1) return false;
422
+ try {
423
+ return realpathSync(argv1) === fileURLToPath(importMetaUrl);
424
+ } catch {
425
+ return false;
426
+ }
427
+ }
428
+ if (isMainModule(process.argv[1], import.meta.url)) {
419
429
  createConductor().then((c) => c.start()).catch((err) => {
420
430
  console.error("ai-conductor failed to start:", err);
421
431
  process.exit(1);
422
432
  });
423
433
  }
424
434
  export {
425
- createConductor
435
+ createConductor,
436
+ isMainModule
426
437
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mcp-proxy-conductor",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Local MCP proxy that aggregates dynamically managed downstream MCP servers, managed at runtime without restarting the client.",
5
5
  "type": "module",
6
6
  "license": "MIT",