@proticom/webmcp 0.0.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.
Files changed (3) hide show
  1. package/README.md +19 -1
  2. package/bin/webmcp.js +66 -0
  3. package/package.json +33 -4
package/README.md CHANGED
@@ -1,3 +1,21 @@
1
1
  # @proticom/webmcp
2
2
 
3
- Placeholder. The real package is published from https://github.com/proticom/webmcp.
3
+ The [webmcp.fast](https://webmcp.fast) daemon: any local MCP server, reachable
4
+ by any agent harness through one outbound connection. This package installs a
5
+ prebuilt binary for your platform (macOS arm64/x64, Linux x64/arm64, Windows
6
+ x64); it has no runtime dependencies and no install script.
7
+
8
+ npm i -g @proticom/webmcp
9
+ webmcp up
10
+
11
+ or, without installing:
12
+
13
+ npx @proticom/webmcp up
14
+
15
+ `webmcp up` pairs this machine, offers the MCP servers your other tools already
16
+ use, offers to install the background service (macOS, Linux), and prints each
17
+ server's URL.
18
+
19
+ Packages are published from GitHub Actions with provenance attestations;
20
+ verify with `npm audit signatures`. Full documentation, protocol, threat model
21
+ and source: https://github.com/proticom/webmcp
package/bin/webmcp.js ADDED
@@ -0,0 +1,66 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+ // Thin launcher for the prebuilt `webmcp` binary. The binary itself lives in a
4
+ // platform package (@proticom/webmcp-<os>-<cpu>) that npm selects through this
5
+ // package's optionalDependencies and the platform packages' os/cpu fields.
6
+ // No postinstall, no download, no network: if the platform package is not
7
+ // installed, we say so and stop.
8
+
9
+ const { spawnSync } = require("child_process");
10
+ const path = require("path");
11
+
12
+ const PLATFORMS = {
13
+ "darwin-arm64": "@proticom/webmcp-darwin-arm64",
14
+ "darwin-x64": "@proticom/webmcp-darwin-x64",
15
+ "linux-x64": "@proticom/webmcp-linux-x64",
16
+ "linux-arm64": "@proticom/webmcp-linux-arm64",
17
+ "win32-x64": "@proticom/webmcp-win32-x64",
18
+ };
19
+
20
+ function binaryPath() {
21
+ const key = `${process.platform}-${process.arch}`;
22
+ const pkg = PLATFORMS[key];
23
+ const file = process.platform === "win32" ? "webmcp.exe" : "webmcp";
24
+ if (!pkg) {
25
+ fail(
26
+ `webmcp has no prebuilt binary for ${key}.`,
27
+ "Build from source: cargo install --git https://github.com/proticom/webmcp --locked",
28
+ );
29
+ }
30
+ try {
31
+ return require.resolve(`${pkg}/${file}`);
32
+ } catch (_) {
33
+ fail(
34
+ `The platform package ${pkg} is not installed (this is ${key}).`,
35
+ "It is an optional dependency of @proticom/webmcp; npm may have skipped it because",
36
+ "of --no-optional / --omit=optional, a lockfile made on another platform, or a",
37
+ "package manager setting. Try again with: npm i -g @proticom/webmcp",
38
+ "Other ways to get webmcp: https://github.com/proticom/webmcp/releases",
39
+ "or: cargo install --git https://github.com/proticom/webmcp --locked",
40
+ );
41
+ }
42
+ }
43
+
44
+ function fail(...lines) {
45
+ for (const line of lines) process.stderr.write(`webmcp: ${line}\n`);
46
+ process.exit(1);
47
+ }
48
+
49
+ const bin = binaryPath();
50
+ const result = spawnSync(bin, process.argv.slice(2), {
51
+ stdio: "inherit",
52
+ windowsHide: true,
53
+ });
54
+
55
+ if (result.error) {
56
+ fail(`could not run ${path.basename(bin)}: ${result.error.message}`);
57
+ }
58
+ if (result.signal) {
59
+ // The daemon died from a signal (e.g. SIGTERM from a supervisor, SIGINT
60
+ // from Ctrl-C). Die the same way so the parent sees the same status.
61
+ process.kill(process.pid, result.signal);
62
+ // If the signal is ignored or not deliverable, fall back to the shell's
63
+ // convention for signal deaths.
64
+ process.exit(128 + (require("os").constants.signals[result.signal] || 1));
65
+ }
66
+ process.exit(result.status === null ? 1 : result.status);
package/package.json CHANGED
@@ -1,8 +1,37 @@
1
1
  {
2
2
  "name": "@proticom/webmcp",
3
- "version": "0.0.0",
4
- "description": "Placeholder reserving the name for the webmcp daemon. Install @proticom/webmcp.",
3
+ "version": "0.1.1",
4
+ "description": "webmcp.fast daemon: expose local MCP servers to any agent harness through one outbound connection",
5
5
  "license": "Apache-2.0",
6
- "repository": { "type": "git", "url": "git+https://github.com/proticom/webmcp.git" },
7
- "homepage": "https://webmcp.fast"
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/proticom/webmcp.git",
9
+ "directory": "npm/webmcp"
10
+ },
11
+ "homepage": "https://webmcp.fast",
12
+ "bugs": "https://github.com/proticom/webmcp/issues",
13
+ "keywords": [
14
+ "mcp",
15
+ "model-context-protocol",
16
+ "agents",
17
+ "relay",
18
+ "webmcp"
19
+ ],
20
+ "bin": {
21
+ "webmcp": "bin/webmcp.js"
22
+ },
23
+ "files": [
24
+ "bin",
25
+ "README.md"
26
+ ],
27
+ "engines": {
28
+ "node": ">=18"
29
+ },
30
+ "optionalDependencies": {
31
+ "@proticom/webmcp-darwin-arm64": "0.1.1",
32
+ "@proticom/webmcp-darwin-x64": "0.1.1",
33
+ "@proticom/webmcp-linux-x64": "0.1.1",
34
+ "@proticom/webmcp-linux-arm64": "0.1.1",
35
+ "@proticom/webmcp-win32-x64": "0.1.1"
36
+ }
8
37
  }