{"_id":"@curiositymcp/mcp-frontend-server","_rev":"5-5197efebf0f52771b2e23a623c374597","name":"@curiositymcp/mcp-frontend-server","dist-tags":{"latest":"0.2.0"},"versions":{"0.0.1":{"name":"@curiositymcp/mcp-frontend-server","version":"0.0.1","keywords":["curiosity","mcp","frontend","server"],"author":"","license":"MIT","_id":"@curiositymcp/mcp-frontend-server@0.0.1","maintainers":[{"name":"joshivaibhavs","email":"joshi93vaibhav@gmail.com"}],"dist":{"shasum":"4699b4f9560c3f7055df2976429d4d4dc7abfc2d","tarball":"https://registry.npmjs.org/@curiositymcp/mcp-frontend-server/-/mcp-frontend-server-0.0.1.tgz","fileCount":4,"integrity":"sha512-vM6EABoAFOPEVLUNw/rN+tPlNQz8Xgn/SDZcQBz5TNSjjy4mJa21dMWwnQNMzipo90/8HnJiVFeYCnC8M327Cg==","signatures":[{"sig":"MEYCIQDr8cu7zP/6Ues7qv83sFwKX0+5O5JOIhWMdnhXDuAaYwIhAOoi56oVptt7I4fcxgzVvKdTLvrtxHhQkrrRqqDrbRhI","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":19253},"main":"dist/index.umd.js","types":"dist/index.d.ts","module":"dist/index.mjs","gitHead":"af1904a7e8d97e5a89270225672514de86ae373c","scripts":{"test":"jest","build":"esbuild src/index.ts --bundle --platform=browser --format=esm --outfile=dist/index.mjs && esbuild src/index.ts --bundle --platform=browser --format=iife --global-name=CuriosityMPC --outfile=dist/index.umd.js"},"_npmUser":{"name":"joshivaibhavs","email":"joshi93vaibhav@gmail.com"},"_npmVersion":"10.8.2","description":"A frontend implementation of the Curiosity MCP server.","directories":{},"_nodeVersion":"20.18.0","_hasShrinkwrap":false,"devDependencies":{"jest":"^30.0.5","esbuild":"^0.25.8","ts-jest":"^29.4.0","typescript":"^5.9.2","@types/jest":"^30.0.0","jest-environment-jsdom":"^30.0.5"},"_npmOperationalInternal":{"tmp":"tmp/mcp-frontend-server_0.0.1_1754134357492_0.260069730691052","host":"s3://npm-registry-packages-npm-production"}},"0.0.2":{"name":"@curiositymcp/mcp-frontend-server","version":"0.0.2","keywords":["curiosity","mcp","frontend","server"],"author":"","license":"MIT","_id":"@curiositymcp/mcp-frontend-server@0.0.2","maintainers":[{"name":"joshivaibhavs","email":"joshi93vaibhav@gmail.com"}],"dist":{"shasum":"0ea368926a87de9895e72a2943c8bd8388eff3f4","tarball":"https://registry.npmjs.org/@curiositymcp/mcp-frontend-server/-/mcp-frontend-server-0.0.2.tgz","fileCount":4,"integrity":"sha512-hC+j1ncMJWbLi8kO9+q/6kbQDkTB9iLd08WFsGqI6mtFtiwH2l8Z6A4AvGCJ+LOu2jdqXWajGnHzLUBLvuz78w==","signatures":[{"sig":"MEUCIDmlAVOj/9vMKB8U0666OwWPif5P2u81wBCfQKwGT+LCAiEA647iNLzQvIpi28JTMe2LP4tgQgHE60OBtQWAVuDiGWU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":19259},"main":"dist/index.umd.js","types":"dist/index.d.ts","module":"dist/index.mjs","gitHead":"f158999ec89a339dbe8150ade71eec44a57ad716","scripts":{"test":"jest","build":"esbuild src/index.ts --bundle --platform=browser --format=esm --outfile=dist/index.mjs && esbuild src/index.ts --bundle --platform=browser --format=iife --global-name=CuriosityMPC --outfile=dist/index.umd.js"},"_npmUser":{"name":"joshivaibhavs","email":"joshi93vaibhav@gmail.com"},"_npmVersion":"10.8.2","description":"A frontend implementation of the Curiosity MCP server.","directories":{},"_nodeVersion":"20.18.0","_hasShrinkwrap":false,"devDependencies":{"jest":"^30.0.5","esbuild":"^0.25.8","ts-jest":"^29.4.0","typescript":"^5.9.2","@types/jest":"^30.0.0","jest-environment-jsdom":"^30.0.5"},"_npmOperationalInternal":{"tmp":"tmp/mcp-frontend-server_0.0.2_1754134679195_0.9097231756209052","host":"s3://npm-registry-packages-npm-production"}},"0.1.0":{"name":"@curiositymcp/mcp-frontend-server","version":"0.1.0","keywords":["curiosity","mcp","frontend","server"],"author":{"name":"Vaibhav Joshi"},"license":"MIT","_id":"@curiositymcp/mcp-frontend-server@0.1.0","maintainers":[{"name":"joshivaibhavs","email":"joshi93vaibhav@gmail.com"}],"homepage":"https://github.com/joshivaibhavs/CuriosityMCP#readme","bugs":{"url":"https://github.com/joshivaibhavs/CuriosityMCP/issues"},"dist":{"shasum":"6628c7fafda150119af944184d6824accc1e2e15","tarball":"https://registry.npmjs.org/@curiositymcp/mcp-frontend-server/-/mcp-frontend-server-0.1.0.tgz","fileCount":4,"integrity":"sha512-f5UUijW14BoPPYTkIZa5f/dX0rZ2Z6ax4uKA/qclUNav+j6g3X1JhRfmP3OmmxBnJ1V+VbxBzastCLlozju/BA==","signatures":[{"sig":"MEUCIQCu1I2QrGFsyQ/HkGoWM+AwqrKtpyx2+zfNH6RmVc/LgAIgC5eIbBf2vlIZw6ZGvC0tcS4y9JZPHhX5xRuDhpAfF9c=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":21854},"main":"dist/index.umd.js","types":"dist/index.d.ts","module":"dist/index.mjs","gitHead":"36b71ebdb053a08a684ac84662986d7be68e10bf","scripts":{"test":"jest","build":"esbuild src/index.ts --bundle --platform=browser --format=esm --outfile=dist/index.mjs && esbuild src/index.ts --bundle --platform=browser --format=iife --global-name=CuriosityMPC --outfile=dist/index.umd.js"},"_npmUser":{"name":"joshivaibhavs","email":"joshi93vaibhav@gmail.com"},"repository":{"url":"git+https://github.com/joshivaibhavs/CuriosityMCP.git","type":"git"},"_npmVersion":"10.8.2","description":"A frontend implementation of the Curiosity MCP server.","directories":{},"_nodeVersion":"20.19.4","_hasShrinkwrap":false,"devDependencies":{"jest":"^30.0.5","esbuild":"^0.25.8","ts-jest":"^29.4.0","typescript":"^5.9.2","@types/jest":"^30.0.0","jest-environment-jsdom":"^30.0.5"},"_npmOperationalInternal":{"tmp":"tmp/mcp-frontend-server_0.1.0_1754294590587_0.47609498215962964","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@curiositymcp/mcp-frontend-server","version":"0.1.1","keywords":["curiosity","mcp","frontend","server"],"author":{"name":"Vaibhav Joshi"},"license":"MIT","_id":"@curiositymcp/mcp-frontend-server@0.1.1","maintainers":[{"name":"joshivaibhavs","email":"joshi93vaibhav@gmail.com"}],"homepage":"https://github.com/joshivaibhavs/CuriosityMCP#readme","bugs":{"url":"https://github.com/joshivaibhavs/CuriosityMCP/issues"},"dist":{"shasum":"8007e4be76356fd2360e177beac937142db0de44","tarball":"https://registry.npmjs.org/@curiositymcp/mcp-frontend-server/-/mcp-frontend-server-0.1.1.tgz","fileCount":4,"integrity":"sha512-I7qo3+TyJtjrCZpzXa8top3W0mcA2DjbcHI+PJIrKmEPnlqFSXZU0ojJ7tpAtYxU1P8kmx9/6lXEudIP0j1LJQ==","signatures":[{"sig":"MEQCIFvSBy6MoU2mGsSKltX22lV13Q5zMIq4+pGIaDmMAp+wAiAzZUjhO5dkokQLX0/jiwT1rF7GtD4YPr4lL1TPle3mOQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":21854},"main":"dist/index.umd.js","types":"dist/index.d.ts","module":"dist/index.mjs","gitHead":"a0432d0e4d04cbe356da2ad7ab243fa11cdc9bc3","scripts":{"test":"jest","build":"esbuild src/index.ts --bundle --platform=browser --format=esm --outfile=dist/index.mjs && esbuild src/index.ts --bundle --platform=browser --format=iife --global-name=CuriosityMCP --outfile=dist/index.umd.js"},"_npmUser":{"name":"joshivaibhavs","email":"joshi93vaibhav@gmail.com"},"repository":{"url":"git+https://github.com/joshivaibhavs/CuriosityMCP.git","type":"git"},"_npmVersion":"10.8.2","description":"A frontend implementation of the Curiosity MCP server.","directories":{},"_nodeVersion":"20.19.4","_hasShrinkwrap":false,"devDependencies":{"jest":"^30.0.5","esbuild":"^0.25.8","ts-jest":"^29.4.0","typescript":"^5.9.2","@types/jest":"^30.0.0","jest-environment-jsdom":"^30.0.5"},"_npmOperationalInternal":{"tmp":"tmp/mcp-frontend-server_0.1.1_1754295150408_0.021725390676237355","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@curiositymcp/mcp-frontend-server","version":"0.2.0","description":"A frontend implementation of the Curiosity MCP server.","main":"dist/index.umd.js","module":"dist/index.mjs","types":"dist/index.d.ts","scripts":{"test":"jest","build":"esbuild src/index.ts --bundle --platform=browser --format=esm --outfile=dist/index.mjs && esbuild src/index.ts --bundle --platform=browser --format=iife --global-name=CuriosityMCP --outfile=dist/index.umd.js","build/watch":"rm -rf dist && esbuild src/index.ts --bundle --platform=browser --format=esm --outfile=dist/index.mjs --watch && esbuild src/index.ts --bundle --platform=browser --format=iife --global-name=CuriosityMCP --outfile=dist/index.umd.js --watch"},"keywords":["curiosity","mcp","frontend","server"],"repository":{"type":"git","url":"git+https://github.com/joshivaibhavs/CuriosityMCP.git"},"homepage":"https://github.com/joshivaibhavs/CuriosityMCP#readme","author":{"name":"Vaibhav Joshi"},"license":"MIT","devDependencies":{"@types/jest":"^30.0.0","esbuild":"^0.25.8","jest":"^30.0.5","jest-environment-jsdom":"^30.0.5","ts-jest":"^29.4.0","typescript":"^5.9.2"},"_id":"@curiositymcp/mcp-frontend-server@0.2.0","gitHead":"31ca7700bf141534ed88534840f397a16e660924","bugs":{"url":"https://github.com/joshivaibhavs/CuriosityMCP/issues"},"_nodeVersion":"20.19.4","_npmVersion":"10.8.2","dist":{"integrity":"sha512-zT0DZWNBFrsW+h0HHQT7FDKFwznrG+tpljDJRY4VTV0gXceBu5VtfHS/hwEHnzMKkJCYdE/hBWxPNRltZNmk3Q==","shasum":"8102ffaaf784b7b5b5511cca3b42b4f23c6c07fb","tarball":"https://registry.npmjs.org/@curiositymcp/mcp-frontend-server/-/mcp-frontend-server-0.2.0.tgz","fileCount":4,"unpackedSize":27604,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCg/4NEHRkB1fAlpuxnjvQDfUs7vJcxrcD9NtIAv9yXVAIgaXBtO2VP0KPfQcwr1LbT+1AYQTmnBJFZZX6mLZ/dNa0="}]},"_npmUser":{"name":"joshivaibhavs","email":"joshi93vaibhav@gmail.com"},"directories":{},"maintainers":[{"name":"joshivaibhavs","email":"joshi93vaibhav@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/mcp-frontend-server_0.2.0_1755088154766_0.7844609205556046"},"_hasShrinkwrap":false}},"time":{"created":"2025-08-02T11:32:37.389Z","modified":"2025-08-13T12:29:15.148Z","0.0.1":"2025-08-02T11:32:37.731Z","0.0.2":"2025-08-02T11:37:59.371Z","0.1.0":"2025-08-04T08:03:10.760Z","0.1.1":"2025-08-04T08:12:30.603Z","0.2.0":"2025-08-13T12:29:14.956Z"},"bugs":{"url":"https://github.com/joshivaibhavs/CuriosityMCP/issues"},"author":{"name":"Vaibhav Joshi"},"license":"MIT","homepage":"https://github.com/joshivaibhavs/CuriosityMCP#readme","keywords":["curiosity","mcp","frontend","server"],"repository":{"type":"git","url":"git+https://github.com/joshivaibhavs/CuriosityMCP.git"},"description":"A frontend implementation of the Curiosity MCP server.","maintainers":[{"name":"joshivaibhavs","email":"joshi93vaibhav@gmail.com"}],"readme":"# Curiosity MCP Frontend Server\n\nA simple, embeddable chat UI component that connects to a streaming AI backend and supports frontend tools.\n\n**Public Beta Notice**\n\nThis is a public beta release of the Curiosity MCP Frontend Server library. It is intended for testing and feedback purposes. While it should work in most cases, it may not be fully stable and could break in some instances. Please use with caution and report any issues you encounter.\n\n## Automate your users' journeys with a chat agent!\n\n### Demo\n\n![Curiosity MCP Frontend Demo](./assets/Curiosity-MCP-demo.gif)\n\n## Installation\n\n```bash\nnpm insatll @curiositymcp/mcp-frontend-server\n```\n\n## Quick Start\n\n1.  **Create an HTML file** with a container element for the chat UI.\n\n    ```html\n    <!DOCTYPE html>\n    <html lang=\"en\">\n      <head>\n        <title>Curiosity Example</title>\n        <style>\n          /* Give the container a defined size */\n          #chat-container {\n            width: 400px;\n            height: 600px;\n            border: 1px solid #ccc;\n            border-radius: 8px;\n          }\n        </style>\n      </head>\n      <body>\n        <div id=\"chat-container\"></div>\n        <script src=\"./node_modules/@curiositymcp/mcp-frontend-server/dist/index.umd.js\"></script>\n        <script src=\"./main.js\"></script>\n      </body>\n    </html>\n    ```\n\n2.  **Create a JavaScript file** (`main.js`) to initialize the UI, register a backend, and add tools.\n\n    ```javascript\n    // Get the container element\n    const chatContainer = document.getElementById('chat-container');\n\n    // 1. Initialize the Curiosity UI\n    const curiosity = new CuriosityMCP.Curiosity(chatContainer);\n\n    // 2. Create and register a mock AI backend\n    const mockAIBackend = {\n      async *streamMessage(messages) {\n        const message = messages[messages.length - 1];\n        // Check if the user is asking to use a tool\n        if (message.toLowerCase().includes('change background')) {\n          // AI decides to use a tool\n          yield JSON.stringify({ toolUse: true, toolName: 'changeBackgroundColor', args: { color: 'lightblue' } });\n          return;\n        }\n\n        // Otherwise, stream a simple response\n        const response = `You said: \"${message}\". I am a mock AI.`;\n        for (const char of response) {\n          yield char;\n          await new Promise((resolve) => setTimeout(resolve, 50)); // Simulate streaming delay\n        }\n      },\n    };\n    curiosity.registerAIBackend(mockAIBackend);\n\n    // 3. Create and register a tool\n    const changeColorTool = new CuriosityMCP.ActionTool({\n      name: 'changeBackgroundColor',\n      description: 'Changes the background color of the page body.',\n      action: ({ color }) => {\n        document.body.style.backgroundColor = color;\n      },\n    });\n    curiosity.registerTool(changeColorTool);\n\n    console.log('Curiosity UI initialized.');\n    ```\n\n3.  **Open the HTML file** in your browser. You should see the chat interface. Try typing \"change background\" to see the tool in action!\n","readmeFilename":"README.md"}