mcp-erp 1.0.8 → 1.0.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/index.js +10 -10
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { readFileSync, existsSync } from "node:fs";
|
|
3
|
-
import { fileURLToPath } from "node:url";
|
|
4
|
-
import { dirname, join } from "node:path";
|
|
2
|
+
// import { readFileSync, existsSync } from "node:fs";
|
|
3
|
+
// import { fileURLToPath } from "node:url";
|
|
4
|
+
// import { dirname, join } from "node:path";
|
|
5
5
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
6
6
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
7
7
|
|
|
8
|
-
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
9
|
-
const DOCS_PATH = join(__dirname, "docs.md");
|
|
8
|
+
// const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
9
|
+
// const DOCS_PATH = join(__dirname, "docs.md");
|
|
10
10
|
|
|
11
11
|
// ================================================================================================================= //
|
|
12
12
|
// INITIALIZE MCP SERVER
|
|
@@ -40,11 +40,11 @@ server.registerTool(
|
|
|
40
40
|
"Fetch documentation about GraphQL query and sample response from ERSPO Shopify CMS (docs.md).",
|
|
41
41
|
},
|
|
42
42
|
async () => {
|
|
43
|
-
if (!existsSync(DOCS_PATH)) {
|
|
44
|
-
|
|
45
|
-
}
|
|
46
|
-
const docs = readFileSync(DOCS_PATH, "utf-8");
|
|
47
|
-
return contentResult(
|
|
43
|
+
// if (!existsSync(DOCS_PATH)) {
|
|
44
|
+
// return contentResult(`Error: docs.md not found at ${DOCS_PATH}`);
|
|
45
|
+
// }
|
|
46
|
+
// const docs = readFileSync(DOCS_PATH, "utf-8");
|
|
47
|
+
return contentResult("Yuhuuuu... Spada...");
|
|
48
48
|
},
|
|
49
49
|
);
|
|
50
50
|
|