mcp-erp 1.0.6 → 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 +12 -31
  2. package/index.js +10 -17
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -4,18 +4,16 @@ MCP (Model Context Protocol) server that provides GraphQL Storefront query docum
4
4
 
5
5
  ---
6
6
 
7
- ## MCP Configuration
7
+ ## MCP Config
8
8
 
9
- ### From npm (recommended) use `npx`
9
+ Copy the config below into your MCP settings. Requires **Node.js** and uses the published package [mcp-erps](https://www.npmjs.com/package/mcp-erps) via `npx` (no clone needed).
10
10
 
11
- - **Package:** [mcp-erps](https://www.npmjs.com/package/mcp-erps)
12
- - No clone needed. Ensure Node.js is installed, then add the config below to your MCP settings.
13
- - A ready-to-use config file is in this repo: **`mcp-config.json`** (copy its contents or merge into your Cursor/Claude MCP config).
11
+ ### Config (copy-paste)
14
12
 
15
13
  ```json
16
14
  {
17
15
  "mcpServers": {
18
- "mcp-erp": {
16
+ "mcp-erps": {
19
17
  "command": "npx",
20
18
  "args": ["-y", "mcp-erps"]
21
19
  }
@@ -23,20 +21,17 @@ MCP (Model Context Protocol) server that provides GraphQL Storefront query docum
23
21
  }
24
22
  ```
25
23
 
26
- - `-y` skips the “Do you want to install?” prompt when the package is not cached.
27
- - Install once (optional): `npm i -g mcp-erps` — then you can use `"args": ["-y", "mcp-erps"]` or run from PATH.
24
+ ### Where to put it
28
25
 
29
- ### Cursor
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
+ | **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
- - **Location:** Cursor Settings → MCP, or `.cursor/mcp.json`.
32
- - Add the config above under `mcpServers`.
31
+ ### Optional
33
32
 
34
- ### Claude Desktop
35
-
36
- - **macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
37
- - **Windows:** `%APPDATA%\\Claude\\claude_desktop_config.json`
38
-
39
- Add or merge the `mcpServers` block above.
33
+ - **Global install:** `npm i -g mcp-erps` — then you can keep the same config or use `"command": "mcp-erps"`, `"args": []`.
34
+ - A ready-to-use file in this repo: **`mcp-config.json`** (same content as above).
40
35
 
41
36
  ### After configuring
42
37
 
@@ -76,20 +71,6 @@ npm start
76
71
  npm run dev
77
72
  ```
78
73
 
79
- ### Test client (local testing)
80
-
81
- 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`.
82
-
83
- From the project root:
84
-
85
- ```bash
86
- npm test
87
- # or
88
- npm run test:client
89
- # or
90
- node test-client.js
91
- ```
92
-
93
74
  You should see: connection success, list of tools, and a preview of the docs content.
94
75
 
95
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.6",
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": {