mcp-erp 1.0.7 → 1.0.8

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 (3) hide show
  1. package/README.md +4 -18
  2. package/index.js +10 -17
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -13,7 +13,7 @@ Copy the config below into your MCP settings. Requires **Node.js** and uses the
13
13
  ```json
14
14
  {
15
15
  "mcpServers": {
16
- "mcp-erp": {
16
+ "mcp-erps": {
17
17
  "command": "npx",
18
18
  "args": ["-y", "mcp-erps"]
19
19
  }
@@ -23,9 +23,9 @@ Copy the config below into your MCP settings. Requires **Node.js** and uses the
23
23
 
24
24
  ### Where to put it
25
25
 
26
- | App | Config file / location |
27
- |-----|------------------------|
28
- | **Cursor** | **Settings → MCP**, or `.cursor/mcp.json` (workspace or user). Paste the block above; if you already have other servers, add only the `"mcp-erp": { ... }` entry inside `mcpServers`. |
26
+ | App | Config file / location |
27
+ | ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
28
+ | **Cursor** | **Settings → MCP**, or `.cursor/mcp.json` (workspace or user). Paste the block above; if you already have other servers, add only the `"mcp-erp": { ... }` entry inside `mcpServers`. |
29
29
  | **Claude Desktop** | **macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json` · **Windows:** `%APPDATA%\Claude\claude_desktop_config.json` — open the file and add or merge the `mcpServers` object. |
30
30
 
31
31
  ### Optional
@@ -71,20 +71,6 @@ npm start
71
71
  npm run dev
72
72
  ```
73
73
 
74
- ### Test client (local testing)
75
-
76
- A small Node client is included to test the MCP server without Cursor/Claude: it spawns the server over stdio, lists tools, and calls `fetch_docs` to print a preview of `docs.md`.
77
-
78
- From the project root:
79
-
80
- ```bash
81
- npm test
82
- # or
83
- npm run test:client
84
- # or
85
- node test-client.js
86
- ```
87
-
88
74
  You should see: connection success, list of tools, and a preview of the docs content.
89
75
 
90
76
  ### Using the tool from an AI assistant
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,18 +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
- // return contentResult(`Error: docs.md not found at ${DOCS_PATH}`);
45
- // }
46
- // const docs = readFileSync(DOCS_PATH, "utf-8");
47
- return {
48
- content: [
49
- {
50
- type: "text",
51
- text: "Hello, world! You connected me",
52
- },
53
- ],
54
- };
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(docs);
55
48
  },
56
49
  );
57
50
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mcp-erp",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "description": "MCP server: GraphQL Storefront query documentation for ERSP Shopify CMS (fetch_docs from docs.md)",
5
5
  "main": "index.js",
6
6
  "bin": {