{"_id":"@context-action/webmcp","_rev":"5-8f7107e7d1925f364eac2a477bc3678c","name":"@context-action/webmcp","dist-tags":{"rc":"0.1.0-rc.0","next":"0.1.0","latest":"0.1.2"},"versions":{"0.1.0-rc.0":{"name":"@context-action/webmcp","version":"0.1.0-rc.0","keywords":["webmcp","mcp","browser","tool-calling"],"author":{"name":"mineclover"},"license":"Apache-2.0","_id":"@context-action/webmcp@0.1.0-rc.0","maintainers":[{"name":"astralclover","email":"astralclover@gmail.com"}],"homepage":"https://github.com/mineclover/context-action#readme","bugs":{"url":"https://github.com/mineclover/context-action/issues"},"dist":{"shasum":"2523fd3f904992c9a701a3bee4dc04071256a80c","tarball":"https://registry.npmjs.org/@context-action/webmcp/-/webmcp-0.1.0-rc.0.tgz","fileCount":17,"integrity":"sha512-0wmm/xSAmjSOGJTcAyh2QOEgv9yHrHmEF3lYKpJlAaX/fHLbSH6+iuSFSL3KzYbK55VO6Slj6pbEywvl15DW2g==","signatures":[{"sig":"MEUCIQC4ixRReIg8iqM0S2VkhJT7pk5IxV4MeYJ8Z6kp5MMEoAIgJfqsDaQ3nzPULFdU2SziU/qmVIjX/UaqLCPMZQixALY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@context-action%2fwebmcp@0.1.0-rc.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":71048},"main":"dist/index.cjs","type":"module","types":"dist/index.d.ts","module":"dist/index.js","engines":{"node":">=24.11.0"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./profiles/chrome-legacy":{"import":{"types":"./dist/profiles/chrome-legacy.d.ts","default":"./dist/profiles/chrome-legacy.js"},"require":{"types":"./dist/profiles/chrome-legacy.d.cts","default":"./dist/profiles/chrome-legacy.cjs"}}},"gitHead":"42aa7690bb2707cad8885a85efd60c4784e38756","scripts":{"lint":"pnpm --workspace-root exec biome lint packages/webmcp/src","test":"jest --runInBand","build":"tsdown","clean":"rimraf dist","type-check":"pnpm run type-check:src && pnpm run test:type-check","type-check:src":"tsc --noEmit","test:type-check":"tsc -p __tests__/tsconfig.json --pretty false"},"_npmUser":{"name":"astralclover","email":"astralclover@gmail.com"},"repository":{"url":"git+https://github.com/mineclover/context-action.git","type":"git","directory":"packages/webmcp"},"_npmVersion":"11.16.0","description":"WebMCP imperative API adapter for Context-Action tool managers","directories":{},"sideEffects":false,"_nodeVersion":"24.18.0","dependencies":{"@context-action/tool-protocol":"1.0.0-rc.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"30.4.2","tslib":"^2.8.1","rimraf":"^6.1.3","tsdown":"0.22.13","@swc/core":"1.15.46","@swc/jest":"0.2.39","typescript":"6.0.3","@types/jest":"^30.0.0","@types/node":"24.13.3","@context-action/tool-protocol":"workspace:*"},"_npmOperationalInternal":{"tmp":"tmp/webmcp_0.1.0-rc.0_1786247426425_0.40811635559995163","host":"s3://npm-registry-packages-npm-production"}},"0.1.0":{"name":"@context-action/webmcp","version":"0.1.0","keywords":["webmcp","mcp","browser","tool-calling"],"author":{"name":"mineclover"},"license":"Apache-2.0","_id":"@context-action/webmcp@0.1.0","maintainers":[{"name":"astralclover","email":"astralclover@gmail.com"}],"homepage":"https://github.com/mineclover/context-action#readme","bugs":{"url":"https://github.com/mineclover/context-action/issues"},"dist":{"shasum":"1f739448abf7ff3fd5c1006a7c82347ef958a40e","tarball":"https://registry.npmjs.org/@context-action/webmcp/-/webmcp-0.1.0.tgz","fileCount":17,"integrity":"sha512-WNWV6etlsXhomBvj/3Vgay79M7aBZBYxyUvec7sWEFef4GxEY57GDKgpYDHCXUv6fF4L52iJWhZpPQBs2YZ+mw==","signatures":[{"sig":"MEUCIQDsFaAY3fS2F+H3EY+QkIolfqCFHo7bDuTo/oB/Ceu30AIgK8IDbG3ZnWK6ZwWxZdiNqVBaV1i9l+BmHpVUZo/q2LA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@context-action%2fwebmcp@0.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":71039},"main":"dist/index.cjs","type":"module","types":"dist/index.d.ts","module":"dist/index.js","engines":{"node":">=24.11.0"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./profiles/chrome-legacy":{"import":{"types":"./dist/profiles/chrome-legacy.d.ts","default":"./dist/profiles/chrome-legacy.js"},"require":{"types":"./dist/profiles/chrome-legacy.d.cts","default":"./dist/profiles/chrome-legacy.cjs"}}},"gitHead":"63f790a521e3428a7a2825677747338f8f05ccf3","scripts":{"lint":"pnpm --workspace-root exec biome lint packages/webmcp/src","test":"jest --runInBand","build":"tsdown","clean":"rimraf dist","type-check":"pnpm run type-check:src && pnpm run test:type-check","type-check:src":"tsc --noEmit","test:type-check":"tsc -p __tests__/tsconfig.json --pretty false"},"_npmUser":{"name":"astralclover","email":"astralclover@gmail.com"},"repository":{"url":"git+https://github.com/mineclover/context-action.git","type":"git","directory":"packages/webmcp"},"_npmVersion":"11.16.0","description":"WebMCP imperative API adapter for Context-Action tool managers","directories":{},"sideEffects":false,"_nodeVersion":"24.18.0","dependencies":{"@context-action/tool-protocol":"^1.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"30.4.2","tslib":"^2.8.1","rimraf":"^6.1.3","tsdown":"0.22.13","@swc/core":"1.15.46","@swc/jest":"0.2.39","typescript":"6.0.3","@types/jest":"^30.0.0","@types/node":"24.13.3","@context-action/tool-protocol":"workspace:*"},"_npmOperationalInternal":{"tmp":"tmp/webmcp_0.1.0_1786270405176_0.5732569917882893","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@context-action/webmcp","version":"0.1.1","keywords":["webmcp","mcp","browser","tool-calling"],"author":{"name":"mineclover"},"license":"Apache-2.0","_id":"@context-action/webmcp@0.1.1","maintainers":[{"name":"astralclover","email":"astralclover@gmail.com"}],"homepage":"https://github.com/mineclover/context-action#readme","bugs":{"url":"https://github.com/mineclover/context-action/issues"},"dist":{"shasum":"4aad93d14b700c3ba72e3b9592af53afa05176fe","tarball":"https://registry.npmjs.org/@context-action/webmcp/-/webmcp-0.1.1.tgz","fileCount":18,"integrity":"sha512-ncE8ioSgrlmwMW8jHmQP+rszU3nEiqP7Ca+QvSi5LaeHZl5nt17UMTXWu/+sHQ5LGbq+72632sHrH5V1cvsfOg==","signatures":[{"sig":"MEUCIQCkxB0tzoSig5aydbk3BaUqU+moCQkNkjAOZvDrUdQ8gQIgZPq+ggvreK4Dlld4EpRtk2FnF+gsVe4LJAaEMjoo4So=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@context-action%2fwebmcp@0.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":71610},"main":"dist/index.cjs","type":"module","types":"dist/index.d.ts","module":"dist/index.js","engines":{"node":">=24.11.0"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./profiles/chrome-legacy":{"import":{"types":"./dist/profiles/chrome-legacy.d.ts","default":"./dist/profiles/chrome-legacy.js"},"require":{"types":"./dist/profiles/chrome-legacy.d.cts","default":"./dist/profiles/chrome-legacy.cjs"}}},"gitHead":"13529c727944d093a2555b9ba72963000b9ac15e","scripts":{"lint":"pnpm --workspace-root exec biome lint packages/webmcp/src","test":"jest --runInBand","build":"tsdown","clean":"rimraf dist","type-check":"pnpm run type-check:src && pnpm run test:type-check","type-check:src":"tsc --noEmit","test:type-check":"tsc -p __tests__/tsconfig.json --pretty false"},"_npmUser":{"name":"astralclover","email":"astralclover@gmail.com"},"repository":{"url":"git+https://github.com/mineclover/context-action.git","type":"git","directory":"packages/webmcp"},"_npmVersion":"11.16.0","description":"WebMCP imperative API adapter for Context-Action tool managers","directories":{},"sideEffects":false,"_nodeVersion":"24.18.0","dependencies":{"@context-action/tool-protocol":"^1.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"30.4.2","tslib":"^2.8.1","rimraf":"^6.1.3","tsdown":"0.22.13","@swc/core":"1.15.46","@swc/jest":"0.2.39","typescript":"6.0.3","@types/jest":"^30.0.0","@types/node":"24.13.3","@context-action/tool-protocol":"workspace:*"},"_npmOperationalInternal":{"tmp":"tmp/webmcp_0.1.1_1786316435548_0.8889384054313081","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@context-action/webmcp","version":"0.1.2","type":"module","description":"WebMCP imperative API adapter for Context-Action tool managers","main":"dist/index.cjs","module":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./profiles/chrome-legacy":{"import":{"types":"./dist/profiles/chrome-legacy.d.ts","default":"./dist/profiles/chrome-legacy.js"},"require":{"types":"./dist/profiles/chrome-legacy.d.cts","default":"./dist/profiles/chrome-legacy.cjs"}}},"sideEffects":false,"scripts":{"build":"tsdown","test":"jest --runInBand","type-check:src":"tsc --noEmit","test:type-check":"tsc -p __tests__/tsconfig.json --pretty false","type-check":"pnpm run type-check:src && pnpm run test:type-check","lint":"pnpm --workspace-root exec biome lint packages/webmcp/src","clean":"rimraf dist"},"keywords":["webmcp","mcp","browser","tool-calling"],"author":{"name":"mineclover"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/mineclover/context-action.git","directory":"packages/webmcp"},"publishConfig":{"access":"public"},"dependencies":{"@context-action/tool-protocol":"^1.0.0"},"devDependencies":{"@context-action/tool-protocol":"workspace:*","@swc/core":"1.15.46","@swc/jest":"0.2.39","@types/jest":"^30.0.0","@types/node":"24.13.3","jest":"30.4.2","rimraf":"^6.1.3","tsdown":"0.22.13","tslib":"^2.8.1","typescript":"6.0.3"},"engines":{"node":">=24.11.0"},"gitHead":"9c1b6b10fb8b41029ac2e53d1628b701592bc2b4","_id":"@context-action/webmcp@0.1.2","bugs":{"url":"https://github.com/mineclover/context-action/issues"},"homepage":"https://github.com/mineclover/context-action#readme","_nodeVersion":"24.18.0","_npmVersion":"11.16.0","dist":{"integrity":"sha512-KeIolf0REeRVDJFg/AAy6D6emZJ9h3rojdT0MKAght8IBw8cT8igeOyHna2huWoV6BWsOrq51VMWb/OXjkSe6g==","shasum":"416ead182ba0fa0119ffa582dad2a4b91e2e7477","tarball":"https://registry.npmjs.org/@context-action/webmcp/-/webmcp-0.1.2.tgz","fileCount":18,"unpackedSize":72059,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@context-action%2fwebmcp@0.1.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQC5V+z2/hKrB1Z4cJef6PrDyWSZKeIPdS0dRFSXOAnmBQIgSHjnNf55tiowmNwoxciZzfwS9V48WXBid1VRh2gotCM="}]},"_npmUser":{"name":"astralclover","email":"astralclover@gmail.com"},"directories":{},"maintainers":[{"name":"astralclover","email":"astralclover@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/webmcp_0.1.2_1786345243362_0.30451374837039213"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-09T03:50:26.203Z","modified":"2026-08-10T07:00:43.846Z","0.1.0-rc.0":"2026-08-09T03:50:26.554Z","0.1.0":"2026-08-09T10:13:25.316Z","0.1.1":"2026-08-09T23:00:35.690Z","0.1.2":"2026-08-10T07:00:43.494Z"},"bugs":{"url":"https://github.com/mineclover/context-action/issues"},"author":{"name":"mineclover"},"license":"Apache-2.0","homepage":"https://github.com/mineclover/context-action#readme","keywords":["webmcp","mcp","browser","tool-calling"],"repository":{"type":"git","url":"git+https://github.com/mineclover/context-action.git","directory":"packages/webmcp"},"description":"WebMCP imperative API adapter for Context-Action tool managers","maintainers":[{"name":"astralclover","email":"astralclover@gmail.com"}],"readme":"# @context-action/webmcp\n\nBrowser adapter for exposing an explicit Context-Action tool scope through the\nexperimental WebMCP imperative API. It does not create a second registry:\n`ToolManagementInterface` remains the authorization, validation, approval, and\ndurable-execution boundary.\n\n```ts\nimport { createWebMCPToolScope } from '@context-action/webmcp';\n\nconst scope = await createWebMCPToolScope(registry, {\n  sessionId: 'shopping-page:42',\n  toolNames: ['searchCatalog', 'addToCart'],\n  exposedTo: ['https://agent.example'],\n});\n\n// Call on page teardown. WebMCP unregisters the scoped tools via AbortSignal.\nscope.dispose();\n```\n\nFor React, import `useWebMCPToolScope` from the experimental\n`@context-action/react/webmcp` subpath and\npass a memoized options object; the hook unregisters the scope on unmount.\n\nEach scope creates unique correlation IDs for canonical calls. WebMCP does not\nprovide a stable native retry identity, so idempotency is disabled by default;\npass `getIdempotencyKey` only with a domain-owned retry key. Use `interaction`\nfor canonical policy-gated approval: it runs only after argument validation and\na policy `ask` decision. `afterExecute` is a detached post-execution\nnotification, not an authorization boundary. Select `currentWebMCPProfile` by\ndefault or import `@context-action/webmcp/profiles/chrome-legacy` for Chrome's\nolder registration shape. `errorMode` defaults to `structured`; use `throw`\nwhen the host requires rejected browser callbacks.\n\nThe adapter is safe to import during SSR and in unsupported browsers: it\nreturns `{ supported: false, activeTools: [] }` when `document.modelContext`\nis unavailable. It only exposes the requested `toolNames`; omitting the list\ndoes not publish the entire registry.\n\nWebMCP itself requires a visible browsing context, origin isolation, and the\nbrowser `tools` Permissions Policy. Cross-origin exposure must be explicitly\nlisted through `exposedTo`; this adapter accepts HTTPS origins and local HTTP\norigins only for local development.\n","readmeFilename":"README.md"}