decoy-mcp-server 1.0.0 → 1.0.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.
- package/dist/index.js +18 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1401,9 +1401,24 @@ async function main() {
|
|
|
1401
1401
|
console.error(`Agent API: ${AGENT_API_URL}`);
|
|
1402
1402
|
console.error('Ready — connect Claude Desktop to http://localhost:' + PORT + '/mcp');
|
|
1403
1403
|
}
|
|
1404
|
-
// Only boot the HTTP server when run as the entrypoint
|
|
1405
|
-
//
|
|
1406
|
-
|
|
1404
|
+
// Only boot the HTTP server when run as the entrypoint. Importing this module
|
|
1405
|
+
// (e.g. from tests) must NOT start listening or pair.
|
|
1406
|
+
//
|
|
1407
|
+
// process.argv[1] is the path Node was invoked with — but when launched through a
|
|
1408
|
+
// bin shim (`npx decoy-mcp-server`, or a global install), that's a SYMLINK in
|
|
1409
|
+
// node_modules/.bin, while import.meta.url is the resolved real file. Comparing them
|
|
1410
|
+
// directly fails, so main() never ran and `npx decoy-mcp-server` was a silent no-op.
|
|
1411
|
+
// realpathSync collapses the symlink so the comparison holds for both `node dist/index.js`
|
|
1412
|
+
// and the bin shim.
|
|
1413
|
+
let isEntrypoint = false;
|
|
1414
|
+
if (process.argv[1]) {
|
|
1415
|
+
try {
|
|
1416
|
+
isEntrypoint = import.meta.url === pathToFileURL(fs.realpathSync(process.argv[1])).href;
|
|
1417
|
+
}
|
|
1418
|
+
catch {
|
|
1419
|
+
isEntrypoint = import.meta.url === pathToFileURL(process.argv[1]).href;
|
|
1420
|
+
}
|
|
1421
|
+
}
|
|
1407
1422
|
if (isEntrypoint) {
|
|
1408
1423
|
main();
|
|
1409
1424
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "decoy-mcp-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Local MCP bridge for Decoy — lets an AI agent manage your decoy email identities and accounts (create, list, fill credentials) end-to-end encrypted. The bridge decrypts on your machine; Decoy's servers stay blind.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|