{"_id":"webmcp-react","_rev":"8-eee7c2256c8280d68219b7bab6a642ba","name":"webmcp-react","dist-tags":{"latest":"1.3.1"},"versions":{"0.0.1":{"name":"webmcp-react","version":"0.0.1","keywords":["webmcp","mcp","model-context-protocol","react","hooks","ai","navigator.modelContext","w3c"],"author":"","license":"MIT","_id":"webmcp-react@0.0.1","maintainers":[{"name":"mcpcat","email":"naji247@gmail.com"}],"homepage":"https://github.com/MCPCat/webmcp-react","bugs":{"url":"https://github.com/MCPCat/webmcp-react/issues"},"dist":{"shasum":"869158fdd3e1071e159f076ef1179c587059b096","tarball":"https://registry.npmjs.org/webmcp-react/-/webmcp-react-0.0.1.tgz","fileCount":2,"integrity":"sha512-zrzLNOLzaa/zJaP6gKxaV2QlRqqPCs2RG1mnJ8cVGcovYqqF88ySDbjKdgivC36r1mTcFRAMeaAcr5TD46410g==","signatures":[{"sig":"MEUCIQDVbNwcWO7ybUSGgPl+UArUy7gg2GEAD5SzQ40DNM3I9AIgH4Wmpb6RSUYrsRITZoIPTBMHo7iysLz/CAekwQ14zRA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1323},"main":"./dist/index.cjs","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"16fb2a03a483c199ece75368f2b79cead6e03736","scripts":{"test":"echo \"Add test script\"","build":"echo \"Add build script\""},"_npmUser":{"name":"mcpcat","email":"naji247@gmail.com"},"repository":{"url":"git+https://github.com/MCPCat/webmcp-react.git","type":"git"},"_npmVersion":"10.9.4","description":"React hooks for exposing your app's functionality as WebMCP tools - transport-agnostic, SSR-safe, Strict Mode safe, W3C spec-aligned","directories":{},"sideEffects":false,"_nodeVersion":"22.21.1","_hasShrinkwrap":false,"peerDependencies":{"react":">=18.0.0","react-dom":">=18.0.0"},"_npmOperationalInternal":{"tmp":"tmp/webmcp-react_0.0.1_1771350148061_0.12542431005621157","host":"s3://npm-registry-packages-npm-production"}},"0.1.0":{"name":"webmcp-react","version":"0.1.0","keywords":["webmcp","mcp","model-context-protocol","react","hooks","ai","navigator.modelContext","w3c"],"author":{"name":"Kashish Hora"},"license":"MIT","_id":"webmcp-react@0.1.0","maintainers":[{"name":"mcpcat","email":"naji247@gmail.com"}],"contributors":[{"name":"Naseem Alnaji"}],"homepage":"https://github.com/MCPCat/webmcp-react","bugs":{"url":"https://github.com/MCPCat/webmcp-react/issues"},"dist":{"shasum":"183bb228112ebba1b80752f8ee6a6c7fd8210545","tarball":"https://registry.npmjs.org/webmcp-react/-/webmcp-react-0.1.0.tgz","fileCount":15,"integrity":"sha512-ljTijAjJMNPOGn8qarBGh61lSko45sm2+a8DKc1tbsj4rhYTXGVJw61564fAaGcQB88azjUrddePFKnj8hUd2g==","signatures":[{"sig":"MEUCIHTQ0xbqxv9kNdaBAS3jJn1Mq8hkvak2SkXvCnjm2E++AiEAg/eXdaC9p2idBgVi7vM3WGyHinxDJNWRNz8QhLXLMbI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/webmcp-react@0.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":123440},"main":"./dist/index.cjs","pnpm":{"onlyBuiltDependencies":["esbuild"]},"type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./types":{"types":"./dist/types.d.ts","import":"./dist/types.js","require":"./dist/types.cjs"}},"gitHead":"b326396efe9bcf9f0a9774a0364dcc840c7f9d32","scripts":{"lint":"biome check .","test":"vitest run","build":"tsup","prepare":"husky","lint:fix":"biome check --write .","typecheck":"tsc --noEmit","dev:nextjs":"pnpm --filter webmcp-react-nextjs-example dev","test:watch":"vitest","dev:playground":"pnpm --filter webmcp-react-playground dev"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:a5fad75a-54be-4de9-9144-be818c6d8261"}},"repository":{"url":"git+https://github.com/MCPCat/webmcp-react.git","type":"git"},"_npmVersion":"11.8.0","description":"React hooks for exposing your app's functionality as WebMCP tools - transport-agnostic, SSR-safe, Strict Mode safe, W3C spec-aligned","directories":{},"lint-staged":{"*.json":["biome format --write --no-errors-on-unmatched"],"*.{ts,tsx}":["biome check --write --no-errors-on-unmatched"]},"sideEffects":false,"_nodeVersion":"24.13.1","dependencies":{"zod-to-json-schema":"^3.24.1"},"_hasShrinkwrap":false,"devDependencies":{"zod":"^3.24.0","tsup":"^8.4.0","husky":"^9.1.7","jsdom":"^26.0.0","react":"^19.0.0","vitest":"^3.0.0","react-dom":"^19.0.0","typescript":"^5.7.0","lint-staged":"^16.2.7","@types/react":"^19.0.0","@biomejs/biome":"^2.0.0","@types/react-dom":"^19.0.0","@testing-library/react":"^16.1.0","@testing-library/jest-dom":"^6.6.3"},"peerDependencies":{"zod":">=3.0.0","react":">=18.0.0","react-dom":">=18.0.0"},"_npmOperationalInternal":{"tmp":"tmp/webmcp-react_0.1.0_1772452356795_0.22826986782526748","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"webmcp-react","version":"0.2.0","keywords":["webmcp","mcp","model-context-protocol","react","hooks","ai","navigator.modelContext","w3c"],"author":{"name":"Kashish Hora"},"license":"MIT","_id":"webmcp-react@0.2.0","maintainers":[{"name":"mcpcat","email":"alerts@mcpcat.io"}],"contributors":[{"name":"Naseem Alnaji"}],"homepage":"https://github.com/MCPCat/webmcp-react","bugs":{"url":"https://github.com/MCPCat/webmcp-react/issues"},"dist":{"shasum":"7f156839ab519b805a1d688cd0b71887ff693019","tarball":"https://registry.npmjs.org/webmcp-react/-/webmcp-react-0.2.0.tgz","fileCount":15,"integrity":"sha512-0eF7WtuAuLqb/QNl6PD4ha+nI8dAhImHz+5JbHoj02mraeq4lUddFV++H5JfBQNoGP6rm5tyscJQDQ9bPVTmMg==","signatures":[{"sig":"MEUCIQCcypaEjF1PHaWyWTQm5KbJ3/CPx4F0g1g95iFrWYyAAwIgVeuOTV32PZMGBfc5TCL26ZC0XFZD2f3u8OQIRA1cMX0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":149913},"main":"./dist/index.cjs","pnpm":{"onlyBuiltDependencies":["esbuild"]},"type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./types":{"types":"./dist/types.d.ts","import":"./dist/types.js","require":"./dist/types.cjs"}},"gitHead":"28f3f6063011148f270c7184357875eef880646e","scripts":{"lint":"biome check .","test":"vitest run","build":"tsup","prepare":"husky","lint:fix":"biome check --write .","typecheck":"tsc --noEmit","dev:nextjs":"pnpm --filter webmcp-react-nextjs-example dev","test:watch":"vitest","dev:playground":"pnpm --filter webmcp-react-playground dev","build:extension":"pnpm --filter webmcp-bridge-extension build","typecheck:extension":"pnpm --filter webmcp-bridge-extension typecheck"},"_npmUser":{"name":"mcpcat","email":"alerts@mcpcat.io"},"repository":{"url":"git+https://github.com/MCPCat/webmcp-react.git","type":"git"},"_npmVersion":"11.14.1","description":"React hooks for exposing your app's functionality as WebMCP tools - transport-agnostic, SSR-safe, Strict Mode safe, W3C spec-aligned","directories":{},"lint-staged":{"*.json":["biome format --write --no-errors-on-unmatched"],"*.{ts,tsx}":["biome check --write --no-errors-on-unmatched"]},"sideEffects":false,"_nodeVersion":"22.21.1","dependencies":{"zod-to-json-schema":"^3.24.1"},"_hasShrinkwrap":false,"devDependencies":{"zod":"^3.24.0","tsup":"^8.4.0","husky":"^9.1.7","jsdom":"^26.0.0","react":"^19.0.0","vitest":"^3.0.0","react-dom":"^19.0.0","typescript":"^5.7.0","lint-staged":"^16.2.7","@types/react":"^19.0.0","@biomejs/biome":"^2.0.0","@types/react-dom":"^19.0.0","@testing-library/react":"^16.1.0","@testing-library/jest-dom":"^6.6.3"},"peerDependencies":{"zod":">=3.0.0","react":">=18.0.0","react-dom":">=18.0.0"},"_npmOperationalInternal":{"tmp":"tmp/webmcp-react_0.2.0_1782387751856_0.8107212342991297","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"webmcp-react","version":"1.1.0","keywords":["webmcp","mcp","model-context-protocol","react","hooks","ai","document.modelContext","w3c"],"author":{"name":"Kashish Hora"},"license":"MIT","_id":"webmcp-react@1.1.0","maintainers":[{"name":"mcpcat","email":"alerts@mcpcat.io"}],"contributors":[{"name":"Naseem Alnaji"}],"homepage":"https://github.com/agentcathq/webmcp-react","bugs":{"url":"https://github.com/agentcathq/webmcp-react/issues"},"dist":{"shasum":"0ab13fd480c15f55446e32090b4c5cddf17bcc7b","tarball":"https://registry.npmjs.org/webmcp-react/-/webmcp-react-1.1.0.tgz","fileCount":15,"integrity":"sha512-4PCe6oQJU3orgebSMgnxPvFfFXyVrpbY4ono4ahiIk2qTmILPc8W4iocRZ/duzny/CCsRgprQ5Vf2y8ferJDsQ==","signatures":[{"sig":"MEUCIEdl6hzDaC1k+rsCBNAlnxiCbWQgJSPNvnGMpjrcGtyKAiEA1AZPOPg+8zEUuFEtzr9bRDAgKjFVkl0aaEA2okiQGjk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/webmcp-react@1.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":176050},"main":"./dist/index.cjs","pnpm":{"overrides":{"sharp":">=0.35.0","postcss":">=8.5.18","ip-address":">=10.3.1"},"onlyBuiltDependencies":["esbuild"]},"type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./types":{"types":"./dist/types.d.ts","import":"./dist/types.js","require":"./dist/types.cjs"}},"gitHead":"82e6fef0d93c83b1d0d74599bf57389063ce3ba6","scripts":{"lint":"biome check .","test":"vitest run","build":"tsup","prepare":"husky","lint:fix":"biome check --write .","typecheck":"tsc --noEmit","dev:nextjs":"pnpm --filter webmcp-react-nextjs-example dev","test:watch":"vitest","dev:playground":"pnpm --filter webmcp-react-playground dev","prepublishOnly":"pnpm build","build:extension":"pnpm --filter webmcp-bridge-extension build","typecheck:extension":"pnpm --filter webmcp-bridge-extension typecheck"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:63935c2b-61a8-41f6-8278-b5bbd796f104"}},"repository":{"url":"git+https://github.com/agentcathq/webmcp-react.git","type":"git"},"_npmVersion":"11.19.0","description":"React hooks for exposing your app's functionality as WebMCP tools - transport-agnostic, SSR-safe, Strict Mode safe, W3C spec-aligned","directories":{},"lint-staged":{"*.json":["biome format --write --no-errors-on-unmatched"],"*.{ts,tsx}":["biome check --write --no-errors-on-unmatched"]},"sideEffects":false,"_nodeVersion":"24.20.0","dependencies":{"zod-to-json-schema":"^3.24.1"},"_hasShrinkwrap":false,"devDependencies":{"zod":"^4.4.3","tsup":"^8.5.1","husky":"^9.1.7","jsdom":"^26.1.0","react":"^19.2.8","vitest":"^3.2.7","react-dom":"^19.2.8","typescript":"^5.9.3","lint-staged":"^16.4.0","@types/react":"^19.2.18","@biomejs/biome":"^2.0.0","@types/react-dom":"^19.2.4","@testing-library/react":"^16.3.2","@testing-library/jest-dom":"^6.9.1"},"peerDependencies":{"zod":"^3.25.0 || ^4.0.0","react":">=18.0.0","react-dom":">=18.0.0"},"_npmOperationalInternal":{"tmp":"tmp/webmcp-react_1.1.0_1788473067914_0.6624078784242304","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"webmcp-react","version":"1.2.0","keywords":["webmcp","mcp","model-context-protocol","react","hooks","ai","document.modelContext","w3c"],"author":{"name":"Kashish Hora"},"license":"MIT","_id":"webmcp-react@1.2.0","maintainers":[{"name":"agentcathq","email":"alerts@mcpcat.io"}],"contributors":[{"name":"Naseem Alnaji"}],"homepage":"https://github.com/agentcathq/webmcp-react","bugs":{"url":"https://github.com/agentcathq/webmcp-react/issues"},"dist":{"shasum":"f1d65d11f5f548dfe670edaf6ebe5fdd05d56844","tarball":"https://registry.npmjs.org/webmcp-react/-/webmcp-react-1.2.0.tgz","fileCount":15,"integrity":"sha512-Fzh07XLjVrPxKwIMm6DkaqZ97KxEDW3H+f4lZhNHmAxgpd9/84kSDD+5XesG/GAEklsr+TjW/7z/3lcWC3OJyQ==","signatures":[{"sig":"MEYCIQCL3LNIpeN6LS0A6wGO6N3BmcLIy0WYHKHxEZmIIWcgqAIhAPen8XUfCKX9JMUe3eyV3gw3rEOc370HiojZvX1gt1oR","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEQCICaUZpeu98sk45CZeLyuFWM6JFt6ilIQ/fhxYKX3n9TfAiA979APyF7xmpos4QXGZ+ADe590IahxOKPl3oNZYMMP+g==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/webmcp-react@1.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":176310},"main":"./dist/index.cjs","pnpm":{"overrides":{"sharp":">=0.35.4","postcss":">=8.5.18","ip-address":">=10.3.1"},"onlyBuiltDependencies":["esbuild"]},"type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./types":{"types":"./dist/types.d.ts","import":"./dist/types.js","require":"./dist/types.cjs"}},"gitHead":"325d14f3b88a1cad9e9f73fb37f337190737656b","scripts":{"lint":"biome check .","test":"vitest run","build":"tsup","prepare":"husky","lint:fix":"biome check --write .","typecheck":"tsc --noEmit","dev:nextjs":"pnpm --filter webmcp-react-nextjs-example dev","test:watch":"vitest","dev:playground":"pnpm --filter webmcp-react-playground dev","prepublishOnly":"pnpm build","build:extension":"pnpm --filter webmcp-bridge-extension build","typecheck:extension":"pnpm --filter webmcp-bridge-extension typecheck"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:63935c2b-61a8-41f6-8278-b5bbd796f104"}},"repository":{"url":"git+https://github.com/agentcathq/webmcp-react.git","type":"git"},"_npmVersion":"11.19.0","description":"React hooks for exposing your app's functionality as WebMCP tools - transport-agnostic, SSR-safe, Strict Mode safe, W3C spec-aligned","directories":{},"lint-staged":{"*.json":["biome format --write --no-errors-on-unmatched"],"*.{ts,tsx}":["biome check --write --no-errors-on-unmatched"]},"sideEffects":false,"_nodeVersion":"24.21.0","dependencies":{"zod-to-json-schema":"^3.24.1"},"_hasShrinkwrap":false,"devDependencies":{"zod":"^4.4.3","tsup":"^8.5.1","husky":"^9.1.7","jsdom":"^26.1.0","react":"^19.2.8","vitest":"^3.2.7","react-dom":"^19.2.8","typescript":"^5.9.3","lint-staged":"^16.4.0","@types/react":"^19.2.18","@biomejs/biome":"^2.0.0","@types/react-dom":"^19.2.4","@testing-library/react":"^16.3.2","@testing-library/jest-dom":"^6.9.1"},"peerDependencies":{"zod":"^3.25.0 || ^4.0.0","react":">=18.0.0","react-dom":">=18.0.0"},"_npmOperationalInternal":{"tmp":"tmp/webmcp-react_1.2.0_1790171795339_0.4533129045231201","host":"s3://npm-registry-packages-npm-production"}},"1.2.1":{"name":"webmcp-react","version":"1.2.1","keywords":["webmcp","mcp","model-context-protocol","react","hooks","ai","document.modelContext","w3c"],"author":{"name":"Kashish Hora"},"license":"MIT","_id":"webmcp-react@1.2.1","maintainers":[{"name":"agentcathq","email":"alerts@mcpcat.io"}],"contributors":[{"name":"Naseem Alnaji"}],"homepage":"https://github.com/agentcathq/webmcp-react","bugs":{"url":"https://github.com/agentcathq/webmcp-react/issues"},"dist":{"shasum":"3508a028877735135893909b328a2f83a396858b","tarball":"https://registry.npmjs.org/webmcp-react/-/webmcp-react-1.2.1.tgz","fileCount":15,"integrity":"sha512-0y64Q74cJfWGPR6VDnC55KnH1qtT/ZDC1lb/D1sR0gkFNXd+hniZ6KImH94c+qOD2F+Y95J3NVnXFkaycAH87g==","signatures":[{"sig":"MEUCIA445qaud3athrxvhLI5U65gZVnPuPQAGTwcF4kRmJcPAiEAn+uj/lTSBTjrXLidmymanD20pSsjsHQy/eP5pHyeMbM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIQC/vxeDrDfmLSpnEjjn6Ou2szEwau988g7i88JpWyxYDgIgYWxvQ6uyoc/ePe9Dzsq7/BHfelOtg8YbZKyHE8Q+FWM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/webmcp-react@1.2.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":178588},"main":"./dist/index.cjs","pnpm":{"overrides":{"sharp":">=0.35.4","postcss":">=8.5.18","ip-address":">=10.3.1"},"onlyBuiltDependencies":["esbuild"]},"type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./types":{"types":"./dist/types.d.ts","import":"./dist/types.js","require":"./dist/types.cjs"}},"gitHead":"2798e681540bfd0823978e2370afe691b729d95d","scripts":{"lint":"biome check .","test":"vitest run","build":"tsup","prepare":"husky","lint:fix":"biome check --write .","typecheck":"tsc --noEmit","dev:nextjs":"pnpm --filter webmcp-react-nextjs-example dev","test:watch":"vitest","dev:playground":"pnpm --filter webmcp-react-playground dev","prepublishOnly":"pnpm build","build:extension":"pnpm --filter webmcp-bridge-extension build","typecheck:extension":"pnpm --filter webmcp-bridge-extension typecheck"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"63935c2b-61a8-41f6-8278-b5bbd796f104"}},"repository":{"url":"git+https://github.com/agentcathq/webmcp-react.git","type":"git"},"_npmVersion":"11.19.0","description":"React hooks for exposing your app's functionality as WebMCP tools - transport-agnostic, SSR-safe, Strict Mode safe, W3C spec-aligned","directories":{},"lint-staged":{"*.json":["biome format --write --no-errors-on-unmatched"],"*.{ts,tsx}":["biome check --write --no-errors-on-unmatched"]},"sideEffects":false,"_nodeVersion":"24.21.0","dependencies":{"zod-to-json-schema":"^3.24.1"},"_hasShrinkwrap":false,"devDependencies":{"zod":"^4.4.3","tsup":"^8.5.1","husky":"^9.1.7","jsdom":"^26.1.0","react":"^19.2.8","vitest":"^3.2.7","react-dom":"^19.2.8","typescript":"^5.9.3","lint-staged":"^16.4.0","@types/react":"^19.2.18","@biomejs/biome":"^2.0.0","@types/react-dom":"^19.2.4","@testing-library/react":"^16.3.2","@testing-library/jest-dom":"^6.9.1"},"peerDependencies":{"zod":"^3.25.0 || ^4.0.0","react":">=18.0.0","react-dom":">=18.0.0"},"_npmOperationalInternal":{"tmp":"tmp/webmcp-react_1.2.1_1790815875708_0.45741811735864757","host":"s3://npm-registry-packages-npm-production"}},"1.3.1":{"_id":"webmcp-react@1.3.1","bugs":{"url":"https://github.com/agentcathq/webmcp-react/issues"},"dist":{"shasum":"d3988b6e53540595e0f1495c38870128b0f97fbc","tarball":"https://registry.npmjs.org/webmcp-react/-/webmcp-react-1.3.1.tgz","fileCount":15,"integrity":"sha512-UD6QpukJTXrWcLYaco9Q+0opUiedPSXgdx1RwpVkyMIA3NHOZGWdIwDSXkIJV5vzYKcDLerl8WHYXdxZwTGFZQ==","signatures":[{"sig":"MEYCIQDylRSKzhhk8R87F5ZPq2B0JYyw9o/cT7fPRXS5ipF5YwIhAICees/DU/1zthrKPa72aYcL/9eJ1tAgyVMaoYiCYW1y","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCONaC6rV4osFuFr3YczRHvDcB+sPCUCIvr3d5lUam4fAIgKovROpTRPk6d49aZ/l/81J9nXO47Zmf8gwB7BJ38qe4="}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/webmcp-react@1.3.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":180696},"main":"./dist/index.cjs","name":"webmcp-react","pnpm":{"overrides":{"sharp":">=0.35.5","postcss":">=8.5.18","ip-address":">=10.3.1","tinypool@1":">=2.1.2"},"onlyBuiltDependencies":["esbuild"]},"type":"module","types":"./dist/index.d.ts","author":{"name":"Kashish Hora"},"module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./types":{"types":"./dist/types.d.ts","import":"./dist/types.js","require":"./dist/types.cjs"}},"gitHead":"740c5b450559c513a7eb198a1e4dffcfc0ddd8b7","license":"MIT","scripts":{"lint":"biome check .","test":"vitest run","build":"tsup","prepare":"husky","lint:fix":"biome check --write .","typecheck":"tsc --noEmit","dev:nextjs":"pnpm --filter webmcp-react-nextjs-example dev","test:watch":"vitest","dev:playground":"pnpm --filter webmcp-react-playground dev","prepublishOnly":"pnpm build","build:extension":"pnpm --filter webmcp-bridge-extension build","typecheck:extension":"pnpm --filter webmcp-bridge-extension typecheck"},"version":"1.3.1","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"63935c2b-61a8-41f6-8278-b5bbd796f104"}},"homepage":"https://github.com/agentcathq/webmcp-react","keywords":["webmcp","mcp","model-context-protocol","react","hooks","ai","document.modelContext","w3c"],"repository":{"url":"git+https://github.com/agentcathq/webmcp-react.git","type":"git"},"_npmVersion":"11.19.0","description":"React hooks for exposing your app's functionality as WebMCP tools - transport-agnostic, SSR-safe, Strict Mode safe, W3C spec-aligned","directories":{},"lint-staged":{"*.json":["biome format --write --no-errors-on-unmatched"],"*.{ts,tsx}":["biome check --write --no-errors-on-unmatched"]},"maintainers":[{"name":"agentcathq","email":"alerts@mcpcat.io"}],"sideEffects":false,"_nodeVersion":"24.21.0","contributors":[{"name":"Naseem Alnaji"}],"dependencies":{"zod-to-json-schema":"^3.24.1"},"_hasShrinkwrap":false,"devDependencies":{"zod":"^4.6.6","tsup":"^8.5.1","husky":"^9.1.7","jsdom":"^26.1.0","react":"^19.2.8","vitest":"^3.2.7","react-dom":"^19.2.8","typescript":"^5.9.3","lint-staged":"^16.4.0","@types/react":"^19.2.18","@biomejs/biome":"^2.0.0","@types/react-dom":"^19.2.4","@testing-library/react":"^16.3.2","@testing-library/jest-dom":"^6.9.1"},"peerDependencies":{"zod":"^3.25.0 || ^4.0.0","react":">=18.0.0","react-dom":">=18.0.0"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/webmcp-react_1.3.1_1793110173082_0.884767475337373"}}},"time":{"created":"2026-02-17T17:42:28.059Z","modified":"2026-10-27T14:09:33.758Z","0.0.1":"2026-02-17T17:42:28.274Z","0.1.0":"2026-03-02T11:52:36.953Z","0.2.0":"2026-06-25T11:42:31.993Z","1.1.0":"2026-09-03T22:04:28.059Z","1.2.0":"2026-09-23T13:56:35.430Z","1.2.1":"2026-10-01T00:51:15.788Z","1.3.1":"2026-10-27T14:09:33.178Z"},"bugs":{"url":"https://github.com/agentcathq/webmcp-react/issues"},"author":{"name":"Kashish Hora"},"license":"MIT","homepage":"https://github.com/agentcathq/webmcp-react","keywords":["webmcp","mcp","model-context-protocol","react","hooks","ai","document.modelContext","w3c"],"repository":{"url":"git+https://github.com/agentcathq/webmcp-react.git","type":"git"},"description":"React hooks for exposing your app's functionality as WebMCP tools - transport-agnostic, SSR-safe, Strict Mode safe, W3C spec-aligned","contributors":[{"name":"Naseem Alnaji"}],"maintainers":[{"name":"agentcathq","email":"alerts@mcpcat.io"}],"readme":"# webmcp-react\n\nReact hooks for exposing typed tools on `document.modelContext`, aligned with the current [WebMCP](https://github.com/webmachinelearning/webmcp) specification.\n\n[![npm version](https://img.shields.io/npm/v/webmcp-react)](https://www.npmjs.com/package/webmcp-react)\n[![npm downloads](https://img.shields.io/npm/dm/webmcp-react)](https://www.npmjs.com/package/webmcp-react)\n[![license](https://img.shields.io/npm/l/webmcp-react)](./LICENSE)\n[![CI](https://github.com/agentcathq/webmcp-react/actions/workflows/ci.yml/badge.svg)](https://github.com/agentcathq/webmcp-react/actions/workflows/ci.yml)\n[![TypeScript](https://img.shields.io/badge/TypeScript-strict-blue.svg)](./tsconfig.json)\n\n- **Zod-first.** Define inputs with Zod and get full type inference in handlers\n- **JSON Schema support.** Pass raw JSON Schema when you do not use Zod\n- **Built-in polyfill.** Installs a lightweight polyfill when native WebMCP is unavailable\n- **SSR-safe.** Works with Next.js, Remix, and other server-rendering frameworks\n- **StrictMode-safe.** Prevents duplicate registrations and orphaned tools\n- **Spec-aligned.** Tracks the WebMCP specification and native Chrome behavior release by release\n\n## Requirements\n\n- React 18 or later\n- Zod 3.25 or later, or Zod 4, as a peer dependency. Tools can also be defined with [JSON Schema](#json-schema).\n\n## Install\n\n```bash\nnpm install webmcp-react zod\n```\n\n## Quick start\n\nWrap your app in `<WebMCPProvider>` and register tools with `useMcpTool`:\n\n```tsx\nimport { WebMCPProvider, useMcpTool } from \"webmcp-react\";\nimport { z } from \"zod\";\n\nfunction SearchTool() {\n  useMcpTool({\n    name: \"search\",\n    description: \"Search the catalog\",\n    input: z.object({ query: z.string() }),\n    handler: async ({ query }) => ({\n      content: [{ type: \"text\", text: `Results for: ${query}` }],\n    }),\n  });\n  return null;\n}\n\nexport default function App() {\n  return (\n    <WebMCPProvider name=\"my-app\" version=\"1.0\">\n      <SearchTool />\n    </WebMCPProvider>\n  );\n}\n```\n\nThe tool is now registered on `document.modelContext` and any WebMCP-compatible agent can call it.\n\n### Agent skills\n\nThis repository ships [agent skills](./skills) that install webmcp-react and scaffold tools for you. Install them with the [skills CLI](https://skills.sh):\n\n```bash\nnpx skills add agentcathq/webmcp-react\n```\n\nThe skills work with Cursor, Claude Code, GitHub Copilot, Cline, and [18+ other agents](https://vercel.com/docs/agent-resources/skills).\n\n## Playground\n\nTry it live: [**WebMCP Wordle Demo**](https://agentcathq.github.io/webmcp-react/playground/)\n\nThe playground is a fully playable Wordle clone built on `webmcp-react` hooks. Tools register and unregister as the game moves through its phases (idle, playing, won, lost). You can make guesses with the keyboard or through an AI agent. A DevPanel shows the current tool state, and an easy-mode toggle enables a hint tool.\n\nTo play with an AI agent:\n\n- **Codex.** Open the demo in Codex and ask it to play. Codex discovers and calls the page's WebMCP tools directly.\n- **Claude, Cursor, and other MCP clients.** Install the [WebMCP Bridge extension](https://chromewebstore.google.com/detail/webmcp-bridge/chgjbookknohehmaocfijekhaocaanaf), open the demo in Chrome, and activate the extension for the page.\n\n## How it works\n\n[WebMCP](https://github.com/webmachinelearning/webmcp) is a proposed web standard from the W3C Web Machine Learning Community Group. It adds `document.modelContext` to the browser, an API that lets any page expose typed, callable tools to AI agents. Chrome ships the API in [Early Preview](https://developer.chrome.com/blog/webmcp-epp).\n\nThis library provides the React bindings for that API. `<WebMCPProvider>` installs a polyfill when native support is absent, and each `useMcpTool` call registers a tool that agents can discover and execute.\n\n![How webmcp-react works](./docs/architecture.svg)\n\n## Connect to AI clients\n\nAgents with built-in WebMCP browser support, such as Codex, discover and call tools directly from the page. Clients that cannot access `document.modelContext` directly, such as Claude Code and Cursor, connect through the [WebMCP Bridge extension](https://chromewebstore.google.com/detail/webmcp-bridge/chgjbookknohehmaocfijekhaocaanaf), which exposes your registered tools to any MCP client.\n\n1. Install the extension from the [Chrome Web Store](https://chromewebstore.google.com/detail/webmcp-bridge/chgjbookknohehmaocfijekhaocaanaf).\n2. Configure your MCP client. See the [extension setup guide](./extension/README.md) for details.\n\nThe extension will be deprecated when Chrome provides native bridging to desktop clients.\n\n### Testing in Chrome\n\nGoogle's [WebMCP extension](https://github.com/GoogleChromeLabs/webmcp-extension) lists a page's tools and runs an agent against them from a side panel, which is handy while building tools. It only sees tools registered through Chrome's native API, so on a page running the polyfill it finds nothing. Turn on `chrome://flags/#enable-webmcp-testing` (the extension needs Chrome 155 or newer) and `<WebMCPProvider>` will use the native API instead of the polyfill.\n\n## Usage\n\n### Execution state\n\n`useMcpTool` returns reactive state you can use to build UI around tool execution:\n\n```tsx\nfunction TranslateTool() {\n  const { state, execute } = useMcpTool({\n    name: \"translate\",\n    description: \"Translate text to Spanish\",\n    input: z.object({ text: z.string() }),\n    handler: async ({ text }) => {\n      const result = await translate(text, \"es\");\n      return { content: [{ type: \"text\", text: result }] };\n    },\n  });\n\n  return (\n    <div>\n      <button onClick={() => execute({ text: \"Hello\" })} disabled={state.isExecuting}>\n        {state.isExecuting ? \"Translating...\" : \"Translate\"}\n      </button>\n      {state.lastResult && <p>{state.lastResult.content[0].text}</p>}\n      {state.error && <p className=\"error\">{state.error.message}</p>}\n    </div>\n  );\n}\n```\n\n### Cancellation\n\nEach execution receives its own `AbortSignal`. Pass it to `fetch` and other cancellable work. Chrome 153+ aborts the signal when the agent cancels the call. On older browsers the library substitutes a never-aborting signal, so the second argument is always safe to use:\n\n```tsx\nuseMcpTool({\n  name: \"fetch_report\",\n  description: \"Fetch a report by ID\",\n  input: z.object({ id: z.string() }),\n  handler: async ({ id }, { signal }) => {\n    const res = await fetch(`/api/reports/${id}`, { signal });\n    return { content: [{ type: \"text\", text: await res.text() }] };\n  },\n});\n```\n\n### Title and annotations\n\nGive a tool a human-friendly display `title`, and describe its behavior to agents with `annotations`. The current WebMCP specification defines four annotations: `readOnlyHint`, `untrustedContentHint`, `consequentialHint` and `debugging`. Set `consequentialHint` on tools that do something hard to undo, like placing an order, so agents know to check with the user first.\n\n```tsx\nuseMcpTool({\n  name: \"search_users\",\n  title: \"Search users\",\n  description: \"Find users by name or email\",\n  input: z.object({ query: z.string() }),\n  annotations: {\n    readOnlyHint: true,\n  },\n  handler: async ({ query }) => { /* ... */ },\n});\n```\n\n### Dynamic tools\n\nTools register on mount and unregister on unmount. Render them conditionally like any React component:\n\n```tsx\nfunction App({ user }) {\n  return (\n    <WebMCPProvider name=\"app\" version=\"1.0\">\n      <PublicTools />\n      {user.isAdmin && <AdminTools />}\n    </WebMCPProvider>\n  );\n}\n```\n\n### Callbacks\n\nRun side effects on success or failure:\n\n```tsx\nuseMcpTool({\n  name: \"checkout\",\n  description: \"Complete a purchase\",\n  input: z.object({ cartId: z.string() }),\n  handler: async ({ cartId }) => { /* ... */ },\n  onSuccess: (result) => analytics.track(\"checkout_complete\"),\n  onError: (error) => toast.error(error.message),\n});\n```\n\n`onError` fires when the handler throws. A handler that returns `{ isError: true }` on its own still counts as a success, so `onSuccess` fires for it.\n\n### JSON Schema\n\nPass `inputSchema` directly to define a tool without Zod:\n\n```tsx\nuseMcpTool({\n  name: \"calculate\",\n  description: \"Basic arithmetic\",\n  inputSchema: {\n    type: \"object\",\n    properties: {\n      a: { type: \"number\" },\n      b: { type: \"number\" },\n      op: { type: \"string\", enum: [\"add\", \"subtract\", \"multiply\", \"divide\"] },\n    },\n    required: [\"a\", \"b\", \"op\"],\n  },\n  handler: async (args) => {\n    const { a, b, op } = args as { a: number; b: number; op: string };\n    const result = { add: a + b, subtract: a - b, multiply: a * b, divide: a / b }[op];\n    return { content: [{ type: \"text\", text: String(result) }] };\n  },\n});\n```\n\n### TypeScript\n\n`webmcp-react` already types `document.modelContext`, so theres no need to add Google's `webmcp-types` as well. The two packages declare the same global differently and clash if you install both, see [TypeScript and webmcp-types](./docs/api.md#typescript-and-webmcp-types) for details and a workaround.\n\n### SSR\n\nThe library works with Next.js, Remix, and any server-rendering framework. The build includes a `\"use client\"` banner, so no extra configuration is needed.\n\n## Browser support\n\n| Environment | Behavior |\n| --- | --- |\n| Chrome with native `document.modelContext` | The library uses the native API. The polyfill is not installed. |\n| All other browsers | The library installs its polyfill, which implements the registration and consumer APIs. |\n\nThe polyfill follows native Chrome behavior. See the [polyfill section of the API reference](./docs/api.md#polyfill-behavior) for the exact Chrome versions each behavior tracks.\n\n## Versioning and stability\n\n`webmcp-react` follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html). Breaking changes to the public API bump the major version. Every release is documented in the [changelog](./CHANGELOG.md), including the WebMCP specification and Chrome changes it tracks.\n\n`outputSchema` and `structuredContent` are documented library extensions to the WebMCP specification. They are part of the public API and follow the same versioning policy.\n\n## API\n\nSee the [full API reference](./docs/api.md).\n\n## Contributing\n\nBug reports, feature requests, and pull requests are welcome. Read the [contributing guide](./CONTRIBUTING.md) before you open a pull request. This project follows the [Contributor Covenant Code of Conduct](./CODE_OF_CONDUCT.md).\n\n## License\n\n[MIT](./LICENSE)\n","readmeFilename":"README.md"}