@linkegringo/mcp 1.0.0 → 1.0.2
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 +13 -1
- package/package.json +3 -2
package/dist/index.js
CHANGED
|
@@ -1272,6 +1272,8 @@ function runInstaller() {
|
|
|
1272
1272
|
}
|
|
1273
1273
|
|
|
1274
1274
|
// src/index.ts
|
|
1275
|
+
import fs2 from "fs";
|
|
1276
|
+
import { fileURLToPath } from "url";
|
|
1275
1277
|
async function main() {
|
|
1276
1278
|
if (process.argv.includes("install") || process.argv.includes("setup") || process.argv.includes("--install")) {
|
|
1277
1279
|
runInstaller();
|
|
@@ -1282,7 +1284,17 @@ async function main() {
|
|
|
1282
1284
|
await server.connect(transport);
|
|
1283
1285
|
console.error("[LinkeGringo MCP] Servidor iniciado com sucesso via stdio.");
|
|
1284
1286
|
}
|
|
1285
|
-
|
|
1287
|
+
function isDirectExecution() {
|
|
1288
|
+
if (!process.argv[1]) return false;
|
|
1289
|
+
try {
|
|
1290
|
+
const currentFilePath = fileURLToPath(import.meta.url);
|
|
1291
|
+
const scriptPath = fs2.existsSync(process.argv[1]) ? fs2.realpathSync(process.argv[1]) : process.argv[1];
|
|
1292
|
+
return currentFilePath === scriptPath || process.argv[1].endsWith("index.js") || process.argv[1].endsWith("linkegringo-mcp") || process.argv[1].endsWith("mcp") || process.argv[1].endsWith("linkegringo");
|
|
1293
|
+
} catch {
|
|
1294
|
+
return true;
|
|
1295
|
+
}
|
|
1296
|
+
}
|
|
1297
|
+
if (isDirectExecution()) {
|
|
1286
1298
|
main().catch((err) => {
|
|
1287
1299
|
console.error("[LinkeGringo MCP] Erro fatal na inicializa\xE7\xE3o:", err);
|
|
1288
1300
|
process.exit(1);
|
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@linkegringo/mcp",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Servidor MCP oficial do LinkeGringo para auditoria e otimização de perfis para o mercado internacional",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
|
+
"linkegringo": "dist/index.js",
|
|
7
8
|
"linkegringo-mcp": "dist/index.js",
|
|
8
9
|
"mcp": "dist/index.js"
|
|
9
10
|
},
|
|
@@ -22,11 +23,11 @@
|
|
|
22
23
|
"test": "vitest run"
|
|
23
24
|
},
|
|
24
25
|
"dependencies": {
|
|
25
|
-
"@linkegringo/core": "workspace:*",
|
|
26
26
|
"@modelcontextprotocol/sdk": "^1.6.0",
|
|
27
27
|
"zod": "^3.24.1"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
+
"@linkegringo/core": "workspace:*",
|
|
30
31
|
"@types/node": "^22.10.2",
|
|
31
32
|
"tsup": "^8.3.6",
|
|
32
33
|
"typescript": "^5.7.2",
|