@seleniumbox/sbox-mcp 0.3.0 → 0.4.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/README.md +8 -0
- package/dist/index.js +2 -3
- package/dist/mcp-server.js +1 -2
- package/dist/routes/mcp.routes.js +1 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -56,6 +56,14 @@ Then use:
|
|
|
56
56
|
|
|
57
57
|
Open Cursor from the directory that contains `node_modules`.
|
|
58
58
|
|
|
59
|
+
**If you see `ENOTEMPTY: directory not empty, rmdir`** when using npx, the npx cache is in a bad state. Clear it and try again:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
rm -rf ~/.npm/_npx
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Then restart Cursor or reload MCP.
|
|
66
|
+
|
|
59
67
|
## Required environment variables
|
|
60
68
|
|
|
61
69
|
| Variable | Default | Description |
|
package/dist/index.js
CHANGED
|
@@ -10,9 +10,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
10
10
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
11
|
const path_1 = __importDefault(require("path"));
|
|
12
12
|
const index_1 = require("./mcp/tools/index");
|
|
13
|
-
// Resolve SDK via
|
|
14
|
-
const
|
|
15
|
-
const sdkServerDir = path_1.default.join(path_1.default.dirname(sdkPackagePath), "dist", "cjs", "server");
|
|
13
|
+
// Resolve SDK server dir via the package's "server" export (dist/cjs/server) so it works when npx hoists deps
|
|
14
|
+
const sdkServerDir = path_1.default.dirname(require.resolve("@modelcontextprotocol/sdk/server"));
|
|
16
15
|
const { McpServer } = require(path_1.default.join(sdkServerDir, "mcp.js"));
|
|
17
16
|
const { StdioServerTransport } = require(path_1.default.join(sdkServerDir, "stdio.js"));
|
|
18
17
|
const server = new McpServer({
|
package/dist/mcp-server.js
CHANGED
|
@@ -10,8 +10,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
10
10
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
11
|
const path_1 = __importDefault(require("path"));
|
|
12
12
|
const index_1 = require("./mcp/tools/index");
|
|
13
|
-
const
|
|
14
|
-
const sdkServerDir = path_1.default.join(path_1.default.dirname(sdkPackagePath), "dist", "cjs", "server");
|
|
13
|
+
const sdkServerDir = path_1.default.dirname(require.resolve("@modelcontextprotocol/sdk/server"));
|
|
15
14
|
const { McpServer } = require(path_1.default.join(sdkServerDir, "mcp.js"));
|
|
16
15
|
const { StdioServerTransport } = require(path_1.default.join(sdkServerDir, "stdio.js"));
|
|
17
16
|
const server = new McpServer({
|
|
@@ -13,8 +13,7 @@ const express_1 = require("express");
|
|
|
13
13
|
const path_1 = __importDefault(require("path"));
|
|
14
14
|
const crypto_1 = require("crypto");
|
|
15
15
|
const index_1 = require("../mcp/tools/index");
|
|
16
|
-
const
|
|
17
|
-
const sdkServerDir = path_1.default.join(path_1.default.dirname(sdkPackagePath), "dist", "cjs", "server");
|
|
16
|
+
const sdkServerDir = path_1.default.dirname(require.resolve("@modelcontextprotocol/sdk/server"));
|
|
18
17
|
const { McpServer } = require(path_1.default.join(sdkServerDir, "mcp.js"));
|
|
19
18
|
const { StreamableHTTPServerTransport } = require(path_1.default.join(sdkServerDir, "streamableHttp.js"));
|
|
20
19
|
const sessionMap = new Map();
|