{"_id":"@darwinium/portal-mcp","_rev":"3-f8559d55ff23fbc30a79ad855895da28","name":"@darwinium/portal-mcp","dist-tags":{"latest":"0.0.3"},"versions":{"0.0.1":{"name":"@darwinium/portal-mcp","version":"0.0.1","keywords":["mcp","modelcontextprotocol","darwinium","portal","fraud","claude"],"author":{"name":"Darwinium"},"license":"ISC","_id":"@darwinium/portal-mcp@0.0.1","maintainers":[{"name":"harrylepotter-dwn","email":"bdavey@darwinium.com"}],"homepage":"https://darwinium.com/portal-mcp","bugs":{"url":"https://github.com/darwinium-com/portal-mcp/issues"},"bin":{"portal-mcp":"bin/portal-mcp.js"},"dist":{"shasum":"d8b76a218cddf8168b18c921a9bbc55fa97c3f24","tarball":"https://registry.npmjs.org/@darwinium/portal-mcp/-/portal-mcp-0.0.1.tgz","fileCount":3,"integrity":"sha512-wSG1dzv9zLqaz/4NNBro3j8J3GlLZqdkohKmgoWXlqqIQ5hF48VHgS0cDAoAH8gI/Ao14AjZWYWEGP7N7COZVg==","signatures":[{"sig":"MEUCIQDThZflVnjT0bGz4KqDPXjnHeguntKVgJPmTZ5sxo3l2gIgBTAul/Zj6T9T9crVtOV7/38vlH0ExHZjow91qzcjB9M=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":2091},"type":"module","engines":{"node":">=20"},"_npmUser":{"name":"harrylepotter-dwn","email":"bdavey@darwinium.com"},"repository":{"url":"git+https://github.com/darwinium-com/portal-mcp.git","type":"git"},"_npmVersion":"11.3.0","description":"Darwinium Portal MCP — name reservation. The released package is not yet published; see https://darwinium.com/portal-mcp","directories":{},"_nodeVersion":"24.0.2","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/","@darwinium:registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/portal-mcp_0.0.1_1788162716314_0.4180979456668912","host":"s3://npm-registry-packages-npm-production"}},"0.0.2":{"name":"@darwinium/portal-mcp","version":"0.0.2","keywords":["mcp","modelcontextprotocol","darwinium","portal","fraud","claude"],"author":{"name":"Darwinium"},"license":"Apache-2.0","_id":"@darwinium/portal-mcp@0.0.2","maintainers":[{"name":"harrylepotter-dwn","email":"bdavey@darwinium.com"}],"homepage":"https://github.com/darwinium-com/portal-mcp#readme","bugs":{"url":"https://github.com/darwinium-com/portal-mcp/issues"},"bin":{"portal-mcp":"dist/bin/portal-mcp.js"},"dist":{"shasum":"094009a80f29bfeed9e11ef2f2963c2de1793528","tarball":"https://registry.npmjs.org/@darwinium/portal-mcp/-/portal-mcp-0.0.2.tgz","fileCount":30,"integrity":"sha512-LwFwA/PWl/wLQFYqhLEjr85TR+2K7I/gl0Rzl45E+CwBWJEJIRR8uzjAZPh6tnoE9+IkAi3awD3XMrTJNZjEOw==","signatures":[{"sig":"MEQCIAzoH+zu1YraTwXt1eBW2/L+lsBIk+Qf7dNYp29JZeohAiBTWer3i91wfkCVArbGn35tnAEUdTyxWKhyv4EKmpbZIg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIDN77AOlJMEk0OFM9ptLp/TjlVodKf4zgTTj8bs5MCPNAiEAmbeSmpVAX1VhGBGqe5gp4sKKHxVjKlXUU0VY99+vS34=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":451903},"main":"dist/bin/portal-mcp.js","type":"module","engines":{"node":">=20"},"scripts":{"lint":"eslint src/","test":"npm run build && npm run smoke-test","build":"rimraf dist && node scripts/gen-version.mjs && node scripts/vendor-instructions.mjs && tsdown && node -e \"require('fs').chmodSync('dist/bin/portal-mcp.js', 0o755)\"","clean":"rimraf dist","vendor":"node scripts/vendor-instructions.mjs","smoke-test":"node --experimental-strip-types scripts/smoke-test.ts","gen-version":"node scripts/gen-version.mjs","sync:public":"node scripts/sync-public-repo.mjs","package:mcpb":"node scripts/build-mcpb.mjs","vendor:check":"node scripts/vendor-instructions.mjs --check","package:macos":"node scripts/build-mcpb.mjs --target=darwin-arm64 --handover","bundle-extension":"node scripts/bundle-extension.mjs","gen-version:check":"node scripts/gen-version.mjs --check","smoke-test:eaddrinuse":"node --experimental-strip-types scripts/smoke-test-eaddrinuse.ts"},"_npmUser":{"name":"harrylepotter-dwn","email":"bdavey@darwinium.com"},"repository":{"url":"git+https://github.com/darwinium-com/portal-mcp.git","type":"git","directory":"portal-mcp"},"_npmVersion":"11.3.0","description":"Darwinium Portal MCP — local stdio MCP server bridging Claude Desktop / Claude Code to the active *.darwinium.com tab via a Chrome MV3 extension.","directories":{},"_nodeVersion":"24.0.2","dependencies":{"ws":"^8.20.0","zod":"^3.25.0","adm-zip":"^0.6.0","commander":"^13.1.0","env-paths":"^4.0.0","@modelcontextprotocol/sdk":"^1.29.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/","@darwinium:registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^10.8.1","rimraf":"^6.1.3","tsdown":"^0.21.0","@types/ws":"^8.18.0","typescript":"^5.7.3","@types/node":"^20.0.0","@types/adm-zip":"^0.5.5"},"_npmOperationalInternal":{"tmp":"tmp/portal-mcp_0.0.2_1788163346418_0.9206791941325638","host":"s3://npm-registry-packages-npm-production"}},"0.0.3":{"_id":"@darwinium/portal-mcp@0.0.3","bin":{"portal-mcp":"dist/bin/portal-mcp.js"},"bugs":{"url":"https://github.com/darwinium-com/portal-mcp/issues"},"dist":{"shasum":"f05957a43b36e9b0d3037826b68826bedb8755e1","tarball":"https://registry.npmjs.org/@darwinium/portal-mcp/-/portal-mcp-0.0.3.tgz","fileCount":29,"integrity":"sha512-s/KZivFLISMjoi3WjU9LXkH18n27oVpeNnpGYT/+vA7509h+LIAt1PyMN1EFnQPsnr+BFZEsfi6ifGESAjpqNg==","signatures":[{"sig":"MEUCIQCHIt8tHlS/gwKE3l9mWFRjFh9LfVOwLdE75mrFMndFagIgVqhU1/beYVExpvgEHbf2oYeE1qVEEZOlS4q77a7MXC0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDlvE6jFpzP7sKD78i9EL6Yz5oNyrfcUfsKA+EpkgT1eQIgD433CWKkxPPMiG4SkVgyOFddqPbI21ywk25fqwvTUqQ="}],"unpackedSize":422076},"main":"dist/bin/portal-mcp.js","name":"@darwinium/portal-mcp","type":"module","author":{"name":"Darwinium"},"engines":{"node":">=20"},"license":"Apache-2.0","scripts":{"lint":"eslint src/","test":"npm run build && npm run smoke-test","build":"rimraf dist && node scripts/gen-version.mjs && node scripts/vendor-instructions.mjs && tsdown && node -e \"require('fs').chmodSync('dist/bin/portal-mcp.js', 0o755)\"","clean":"rimraf dist","vendor":"node scripts/vendor-instructions.mjs","smoke-test":"node --experimental-strip-types scripts/smoke-test.ts","gen-version":"node scripts/gen-version.mjs","sync:public":"node scripts/sync-public-repo.mjs","package:mcpb":"node scripts/build-mcpb.mjs","vendor:check":"node scripts/vendor-instructions.mjs --check","package:macos":"node scripts/build-mcpb.mjs --runtime=bun --target=darwin-arm64 --handover","bundle-extension":"node scripts/bundle-extension.mjs","gen-version:check":"node scripts/gen-version.mjs --check","smoke-test:eaddrinuse":"node --experimental-strip-types scripts/smoke-test-eaddrinuse.ts"},"version":"0.0.3","_npmUser":{"name":"harrylepotter-dwn","email":"bdavey@darwinium.com"},"homepage":"https://github.com/darwinium-com/portal-mcp#readme","keywords":["mcp","modelcontextprotocol","darwinium","portal","fraud","claude"],"repository":{"url":"git+https://github.com/darwinium-com/portal-mcp.git","type":"git","directory":"portal-mcp"},"_npmVersion":"11.3.0","description":"Darwinium Portal MCP — local stdio MCP server bridging Claude Desktop / Claude Code to the active *.darwinium.com tab via a Chrome MV3 extension.","directories":{},"maintainers":[{"name":"harrylepotter-dwn","email":"bdavey@darwinium.com"}],"_nodeVersion":"24.0.2","dependencies":{"ws":"^8.20.0","zod":"^3.25.0","adm-zip":"^0.6.0","commander":"^13.1.0","env-paths":"^4.0.0","@modelcontextprotocol/sdk":"^1.29.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/","@darwinium:registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^10.8.1","rimraf":"^6.1.3","tsdown":"^0.21.0","@types/ws":"^8.18.0","typescript":"^5.7.3","@types/node":"^20.0.0","@types/adm-zip":"^0.5.5"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/portal-mcp_0.0.3_1788315770453_0.16436949478676133"}}},"time":{"created":"2026-08-31T07:51:56.033Z","modified":"2026-09-02T02:22:50.748Z","0.0.1":"2026-08-31T07:51:56.437Z","0.0.2":"2026-08-31T08:02:26.505Z","0.0.3":"2026-09-02T02:22:50.541Z"},"bugs":{"url":"https://github.com/darwinium-com/portal-mcp/issues"},"author":{"name":"Darwinium"},"license":"Apache-2.0","homepage":"https://github.com/darwinium-com/portal-mcp#readme","keywords":["mcp","modelcontextprotocol","darwinium","portal","fraud","claude"],"repository":{"url":"git+https://github.com/darwinium-com/portal-mcp.git","type":"git","directory":"portal-mcp"},"description":"Darwinium Portal MCP — local stdio MCP server bridging Claude Desktop / Claude Code to the active *.darwinium.com tab via a Chrome MV3 extension.","maintainers":[{"name":"harrylepotter-dwn","email":"bdavey@darwinium.com"}],"readme":"# @darwinium/portal-mcp\n\nConnect Claude Desktop or Claude Code to your active `*.darwinium.com` portal tab. Three tools, zero backend connections, OOB-paired to your existing portal session.\n\nFor the full guide, visit **https://www.darwinium.com**. (A dedicated docs site at `darwinium.com/portal-mcp` is coming; until then this README is the reference.)\n\n---\n\n## What this is\n\n`@darwinium/portal-mcp` is a stdio MCP server that bridges Claude Desktop and Claude Code to the active Darwinium portal tab in your browser. It does **not** connect to any Darwinium backend — your existing portal session handles all data access. The MCP server only sees what your portal tab sees.\n\nThe three tools exposed are:\n\n- `get_page_commands` — list the page commands registered on the active tab\n- `run_page_command` — invoke a named page command with args\n- `get_context` — return the page's static instructions plus current node context\n\n## Prerequisites\n\n- macOS, Windows, or Linux with **Node.js 20 or newer** (`node --version`)\n- **Google Chrome 116+** (Chromium-based browsers are not officially supported in v1)\n- A logged-in Darwinium portal tab (`*.darwinium.com`)\n\n## Install\n\nThe install is two short steps: register the MCP server with your LLM client, then run a one-time pairing command in your terminal so the MCP server can talk to your browser tab.\n\n### Step 1 — Install the Chrome extension\n\nPick the path your environment allows:\n\n- **Chrome Web Store** (recommended for unmanaged Chrome): listing pending review\n- **Unpacked** (locked corporate Chrome): run the installer in Step 2 first; it extracts a versioned copy of the extension to your platform's app-data directory and prints the exact path. Then in Chrome:\n  1. Visit `chrome://extensions`\n  2. Enable **Developer Mode** (top right)\n  3. Click **Load Unpacked**\n  4. Point it at the path the installer printed (e.g. `~/Library/Application Support/darwinium-portal-mcp/extension/` on macOS)\n\n### Step 2 — Install the MCP server\n\nPick the LLM client you use:\n\n#### Claude Desktop\n\n```\nnpx -y @darwinium/portal-mcp install\n```\n\nThe installer:\n\n1. Writes a per-install token to your platform's app-data directory (mode `0600` on macOS / Linux; ACL-locked on Windows)\n2. Patches your `claude_desktop_config.json` (with a `.bak` companion for safety, additive merge — your other MCP entries are preserved)\n3. Extracts the bundled extension to your app-data directory (for the Unpacked path above)\n4. Prints a 6-digit pairing code in a box like:\n\n   ```\n   portal-mcp: pairing armed. Open the Darwinium Portal MCP extension popup\n               and enter this 6-digit code within 60 seconds.\n\n     ┌────────────────────────────────────────────────────────────┐\n     │                                                            │\n     │   Pairing code:  123456                                    │\n     │   Expires:       60s                                       │\n     │                                                            │\n     └────────────────────────────────────────────────────────────┘\n\n   portal-mcp: waiting for popup... (Ctrl+C to abort)\n   ```\n\n5. Waits for you to paste the code into the extension popup. Click the **Darwinium Portal MCP** icon in your Chrome toolbar, type the 6 digits, click **Save & Connect**. The installer prints `✓ paired with extension` and exits success.\n\nIf the code expires (60 seconds) or you mistype it three times, press **Enter** at the installer's prompt to generate a fresh code. Press **Ctrl+C** to abort.\n\n#### Claude Code\n\nIn any Claude Code session:\n\n```\n/plugin marketplace add darwinium-com/portal-mcp\n/plugin install portal-mcp@darwinium\n```\n\nOr register it in one line without the plugin:\n\n```\nclaude mcp add darwinium-portal-mcp -- npx -y @darwinium/portal-mcp serve\n```\n\nEither way, then complete OOB pairing (one-time):\n\n```\nnpx -y @darwinium/portal-mcp install\n```\n\nSame boxed pairing code, same paste-into-popup flow as the Claude Desktop track. The Claude Code marketplace install handles the config registration; the `install` subcommand handles the browser pairing — they are complementary, not redundant.\n\n## Verify your install\n\nRun the diagnostic:\n\n```\nnpx -y @darwinium/portal-mcp doctor\n```\n\nYou'll see nine checks. All should pass on a healthy install:\n\n- `binary.present` — the npm-fetched binary is on disk and executable\n- `token.mode` — token file is mode `0600` (macOS / Linux only)\n- `token.parent.mode` — token's parent dir is mode `0700` (macOS / Linux only)\n- `token.acl` — token file has inheritance broken (Windows only; skipped elsewhere)\n- `config.desktop.entry` — `claude_desktop_config.json.mcpServers[\"darwinium-portal-mcp\"]` exists and is well-formed\n- `config.code.marketplace` — Claude Code plugin install is present at `~/.claude/plugins/...` (warn-only if missing — you may not be using Claude Code)\n- `extension.reachable` — the extension's WebSocket bridge accepts the token within 5 seconds\n- `port.9224.bindable` — `127.0.0.1:9224` is free for the MCP server to bind\n- `git.token-tree-warning` — token file is **not** inside a git working tree (warn-by-default; move it out or add to `.gitignore` if it is)\n\nFor support tickets, attach the structured `--json` output:\n\n```\nnpx -y @darwinium/portal-mcp doctor --json > doctor-output.json\n```\n\n## Rotate the token\n\nIf your token file is leaked or you simply want a fresh pairing:\n\n```\nnpx -y @darwinium/portal-mcp rotate-token\n```\n\nThis regenerates the token and prompts you to re-pair the extension. The old token stops working immediately — the extension's next bridge call gets a \"Token mismatch\" error, the popup auto-detects it and shows a **Re-pair** action. Click Re-pair, paste the new 6-digit code, paired.\n\n## Common errors\n\nThe MCP server returns four user-actionable error responses:\n\n| Error | What it means | What to do |\n|-------|---------------|------------|\n| `No tab connected` | The extension popup shows **Disconnected** | Open `*.darwinium.com`, click **Connect** in the popup |\n| `Connection lost mid-call` | The extension disconnected during your command | Wait for auto-reconnect (≤30s), then retry |\n| `Page navigated mid-call, current page is X` | You navigated away during the command | Retry from the new page, or include `expected_page_id` to gate the call |\n| `Token mismatch` | Extension token doesn't match the binary | Run `npx -y @darwinium/portal-mcp rotate-token` and re-pair |\n\n## Privacy Policy\n\nFull policy: **https://www.darwinium.com/privacy-policy**. Summary below.\n\n### What this software collects\n\n**Darwinium collects nothing through this tool.** It has no analytics, no telemetry, no\ncrash reporting, and no backend of its own. The only network destination either component\never opens is `ws://127.0.0.1:9224` — a loopback socket on your own machine.\n\n### What data is handled, and where it goes\n\nThe extension reads the Darwinium portal page you have open and passes what it reads to\nthe local MCP server, which hands it to the LLM client that launched it (Claude Desktop or\nClaude Code).\n\nBe aware of what that means: **portal data you ask about does leave your machine — it is\nsent to your AI provider by your own LLM client**, exactly as any other content in that\nconversation is, under that provider's privacy policy (for Claude, Anthropic's). Darwinium\nneither sees nor receives it. Do not ask the assistant about portal data you are not\nwilling to send to your AI provider.\n\nThe server reaches no Darwinium backend at any point. Your existing browser session performs\nall data access, and the server only ever sees what your own portal tab already shows you.\n\n### Storage and retention\n\n- A 64-character hex pairing token is written to your platform's app-data directory\n  (mode `0600` on macOS/Linux, ACL-locked on Windows). It authorises the loopback WebSocket\n  and nothing else. It never appears in `claude_desktop_config.json` and never leaves the machine.\n- The extension stores that token, plus a short in-memory tool-call history for the popup,\n  in Chrome's local extension storage.\n- No portal data is written to disk by either component, and nothing is retained after the\n  process exits. Revoke at any time with `rotate-token`, or by removing the extension.\n\n### Scope limits\n\n- The extension's production `host_permissions` and content-script matches are exactly\n  `https://*.darwinium.com/*` and `https://*.int.darwinium.io/*`. It cannot read any other\n  site, and `scripts/check-manifest.mjs --prod` fails the build if that ever widens.\n- The 6-digit pairing code is single-use, expires in 60 seconds, and is rate-limited to\n  3 attempts.\n\n### Third parties\n\nNone, other than the AI provider you have chosen to run this server under, as described above.\n\n### Contact\n\nPrivacy questions: **privacy@darwinium.com**. Issues:\n**https://github.com/darwinium-com/portal-mcp/issues**.\n\n## Troubleshooting\n\n- **\"It worked yesterday, broken today\"** — npm cache may be stale. Run `npx clear-npx-cache` or `npm cache clean --force`. Then re-run `doctor` and check the `binary.present` version.\n- **\"Load Unpacked fails on macOS because the path contains spaces\"** — copy the extracted extension to a path without spaces, e.g. `cp -r '~/Library/Application Support/darwinium-portal-mcp/extension' ~/darwinium-mcp-extension` and load the latter.\n- **\"Pairing code expired\"** — press **Enter** at the installer's prompt to re-arm with a fresh code (counter resets).\n- **\"`claude_desktop_config.json` is not valid JSON\"** — fix the syntax (or delete the file) and re-run `install`. Your previous config is at `claude_desktop_config.json.bak`.\n- **\"`port 9224` is already in use\"** (`port.9224.bindable` doctor check fails) — another `portal-mcp serve` instance is running, or another tool has bound the port. Quit the other instance, or `lsof -i :9224` (macOS / Linux) / `netstat -ano | findstr :9224` (Windows) to find the offender.\n\nFor more, contact us at **https://www.darwinium.com/contact-us**.\n\n## Building the macOS hand-over bundle (internal)\n\nAhead of the npm and Chrome Web Store releases, `yarn package:macos` produces a folder that\ninstalls with double-clicks only — no terminal, no Node.js, no npm. Intended for non-technical\nusers (sales, solutions engineering) on Apple Silicon.\n\n```\nyarn package:macos                       # defaults to bun-darwin-arm64\nyarn package:macos --target=bun-darwin-x64   # Intel Macs\n```\n\nRequires [bun](https://bun.sh) on PATH. Output lands in `build/` (gitignored):\n\n- `DarwiniumPortalMCP-<version>-macos-<arch>.zip` — the file you hand over\n- `DarwiniumPortalMCP/1 - Darwinium Portal MCP.mcpb` — double-click installs the MCP server\n  into Claude Desktop. The hand-over bundle carries a `bun build --compile` standalone binary\n  so it is entirely self-contained for a non-technical recipient. The bundle published to the\n  extension directory (`yarn package:mcpb`) uses `server.type: \"node\"` instead: Claude Desktop\n  ships its own Node runtime, so one ~320KB file installs on macOS, Windows and Linux.\n- `DarwiniumPortalMCP/2 - chrome-extension/` — the Load Unpacked target, at a space-free path\n- `DarwiniumPortalMCP/START-HERE.html` — the end-user guide\n- `Check-Setup.command` / `Fix-Permissions.command` — support escape hatches\n\nThe bundle skips the `install` subcommand entirely: `serve` generates the token on first launch\nand surfaces it via `initialize.instructions`, so the user asks Claude for the pairing token and\npastes it into the popup. No terminal is involved at any point.\n\nAnything resolving a bundled file must go through `src/install/bundlePaths.ts` — under a compiled\nbinary `import.meta.url` and `argv[1]` both point inside bun's virtual `/$bunfs/` filesystem and\nnever exist on disk.\n\n## License\n\nApache-2.0 — see [LICENSE](./LICENSE).\n\n## Source\n\n`@darwinium/portal-mcp` source repository: https://github.com/darwinium-com/portal-mcp *(publishes with v1.0)*.\n","readmeFilename":"README.md"}