@shelby-protocol/mcp 0.1.0 → 0.1.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 CHANGED
@@ -32,7 +32,7 @@ The server reads the key from, in order:
32
32
  - macOS: `security add-generic-password -s shelby-mcp -a SHELBY_AGENT_KEY -w`
33
33
  - Linux (libsecret): `secret-tool store --label "Shelby agent key" service shelby-mcp account SHELBY_AGENT_KEY`
34
34
 
35
- Uploads read and downloads write only inside the allowed directories. Pass `--allow-dir <dir>` once per directory; without it, only the directory the server starts in is allowed. Paths are checked after resolving symlinks, so neither `..` nor a link can reach outside.
35
+ Uploads read and downloads write only inside the allowed directories. Pass `--allow-dir <dir>`, with more directories after it or repeated; without it, only the directory the server starts in is allowed. Paths are checked after resolving symlinks, so neither `..` nor a link can reach outside.
36
36
 
37
37
  `SHELBY_ENV` selects the backend. It defaults to `beta`; `staging` points at staging. `SHELBY_ADMIN_URL`, `SHELBY_S3_ADMIN_URL` and `SHELBY_S3_ENDPOINT` override single endpoints.
38
38
 
@@ -62,6 +62,10 @@ Don't put the key itself in a project-level `.cursor/mcp.json` or `.mcp.json`; t
62
62
 
63
63
  The server uses stdio. Restart the MCP client after changing the config.
64
64
 
65
+ ## Use with Claude Desktop
66
+
67
+ `npm run bundle` builds two [MCP bundles](https://github.com/modelcontextprotocol/mcpb): `build/shelby.mcpb` for beta and `build/shelby-staging.mcpb` for staging. Open one to install it in Claude Desktop, which asks for the agent key (masked and stored securely) and the allowed directories.
68
+
65
69
  ## Tools
66
70
 
67
71
  Tools take bucket and project **names**. The project is only needed when two reachable buckets share a name.
@@ -98,3 +102,4 @@ Bot keys created before agent keys aren't limited to anything. They still work f
98
102
  | `npm test` | Build, then run the unit and smoke tests |
99
103
  | `npm run lint` | Biome and `tsc --noEmit` |
100
104
  | `npm run format` | Format with Biome |
105
+ | `npm run bundle` | Build the Claude Desktop bundles in `build/` |
package/dist/config.js CHANGED
@@ -22,17 +22,22 @@ function resolveEnvironment() {
22
22
  }
23
23
  return value;
24
24
  }
25
- /** Every `--allow-dir <dir>` and `--allow-dir=<dir>` argument, resolved. */
25
+ /**
26
+ * Every `--allow-dir <dir>...` and `--allow-dir=<dir>` argument, resolved. `--allow-dir` takes
27
+ * each argument up to the next flag, since MCP bundle hosts expand a multi-directory picker into
28
+ * separate arguments.
29
+ */
26
30
  export function parseAllowedDirs(argv, cwd) {
27
31
  const dirs = [];
28
32
  for (let i = 0; i < argv.length; i++) {
29
33
  const arg = argv[i];
30
34
  if (arg === "--allow-dir") {
31
- const value = argv[i + 1];
32
- if (!value)
35
+ const start = dirs.length;
36
+ while (i + 1 < argv.length && !argv[i + 1].startsWith("--")) {
37
+ dirs.push(resolve(cwd, argv[++i]));
38
+ }
39
+ if (dirs.length === start)
33
40
  throw new Error("--allow-dir needs a directory");
34
- dirs.push(resolve(cwd, value));
35
- i++;
36
41
  }
37
42
  else if (arg.startsWith("--allow-dir=")) {
38
43
  dirs.push(resolve(cwd, arg.slice("--allow-dir=".length)));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shelby-protocol/mcp",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "main": "dist/server.js",
5
5
  "module": "dist/server.js",
6
6
  "bin": {
@@ -27,6 +27,7 @@
27
27
  "start": "npm run build && tsx src/server.ts",
28
28
  "dev": "npm run build && fastmcp dev src/server.ts",
29
29
  "prepublishOnly": "npm run build",
30
+ "bundle": "npm run build && node scripts/bundle.mjs",
30
31
  "lint": "biome ci . && tsc --noEmit",
31
32
  "pretest": "npm run build",
32
33
  "test": "vitest run",
@@ -38,6 +39,7 @@
38
39
  "zod": "^4.4.3"
39
40
  },
40
41
  "devDependencies": {
42
+ "@anthropic-ai/mcpb": "^2.1.2",
41
43
  "@biomejs/biome": "^2.5.1",
42
44
  "@modelcontextprotocol/sdk": "^1.29.0",
43
45
  "@tsconfig/node22": "^22.0.5",