{"_id":"@autoexpect/mcp-sseclient-browser","_rev":"7-f95a4e2972216ee0ac5d5dbb0479abef","name":"@autoexpect/mcp-sseclient-browser","dist-tags":{"latest":"1.1.8"},"versions":{"1.1.0":{"name":"@autoexpect/mcp-sseclient-browser","version":"1.1.0","_id":"@autoexpect/mcp-sseclient-browser@1.1.0","maintainers":[{"name":"autoexpect","email":"rui.crater@gmail.com"}],"dist":{"shasum":"92ca2dbd93fc010bf6a00a54a5152516ec36775f","tarball":"https://registry.npmjs.org/@autoexpect/mcp-sseclient-browser/-/mcp-sseclient-browser-1.1.0.tgz","fileCount":10,"integrity":"sha512-p+WIWY3nQPZmoZOTbA+SzmUG9uQLcQ8tyII/7hP4xOpo9Nbda+VEu8SAzzvCijbt59Dh5mYGP9Bcc9incS3gtA==","signatures":[{"sig":"MEUCIQDBSZ+EYbu5Apktp0h9KBHW9JgxP3aR5IuEihbCHKZBaAIgU+BZWlueCucyGH5joXhQAgSizgtHHxpJLqrQQpqCXYk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":27064},"main":"dist/index.js","module":"./dist/index.js","exports":{".":{"import":"./dist/index.js"}},"gitHead":"3e8d80dd3e8b301027a22131780ce464bbfe0eb6","scripts":{"test":"echo \"No tests specified\" && exit 0","build":"npx tsc"},"_npmUser":{"name":"autoexpect","email":"rui.crater@gmail.com"},"_npmVersion":"10.9.0","description":"A browser-optimized SSEClient module for managing Server-Sent Events.","directories":{},"_nodeVersion":"22.12.0","browserslist":["last 2 versions","not dead"],"dependencies":{"openai":"^4.96.0","@modelcontextprotocol/sdk":"^1.10.2"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^4.0.0","@types/node":"^22.14.1"},"_npmOperationalInternal":{"tmp":"tmp/mcp-sseclient-browser_1.1.0_1746030270230_0.8021979110856274","host":"s3://npm-registry-packages-npm-production"}},"1.1.1":{"name":"@autoexpect/mcp-sseclient-browser","version":"1.1.1","_id":"@autoexpect/mcp-sseclient-browser@1.1.1","maintainers":[{"name":"autoexpect","email":"rui.crater@gmail.com"}],"dist":{"shasum":"2e8f12202c5cf2b0d891b2fc789406e9ccf9920d","tarball":"https://registry.npmjs.org/@autoexpect/mcp-sseclient-browser/-/mcp-sseclient-browser-1.1.1.tgz","fileCount":10,"integrity":"sha512-nnwqV5JlZNrlrAV4LI7wtU7IBSHtbb+oaDh4m5Njv+tEsxtASOocl53Sn8ttNosevSSwfLI1meZcdQQlpFZ3dg==","signatures":[{"sig":"MEUCIHE+oksRkSqt0BcGUarKizRLmhXHz/a4mvpPvwDTXGHZAiEA9v26JnPDRQKnZHlcywvlLBpd/8JrjcRz+aW24j4AJ2s=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":27021},"main":"dist/index.js","module":"./dist/index.js","exports":{".":{"import":"./dist/index.js"}},"gitHead":"3e8d80dd3e8b301027a22131780ce464bbfe0eb6","scripts":{"test":"echo \"No tests specified\" && exit 0","build":"npx tsc"},"_npmUser":{"name":"autoexpect","email":"rui.crater@gmail.com"},"_npmVersion":"10.9.0","description":"A browser-optimized SSEClient module for managing Server-Sent Events.","directories":{},"_nodeVersion":"22.12.0","browserslist":["last 2 versions","not dead"],"dependencies":{"openai":"^4.96.0","@modelcontextprotocol/sdk":"^1.10.2"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^4.0.0","@types/node":"^22.14.1"},"_npmOperationalInternal":{"tmp":"tmp/mcp-sseclient-browser_1.1.1_1746065380361_0.2867370863778491","host":"s3://npm-registry-packages-npm-production"}},"1.1.2":{"name":"@autoexpect/mcp-sseclient-browser","version":"1.1.2","_id":"@autoexpect/mcp-sseclient-browser@1.1.2","maintainers":[{"name":"autoexpect","email":"rui.crater@gmail.com"}],"dist":{"shasum":"aec7256d3f65671919369b7729b39c879bbfb4cb","tarball":"https://registry.npmjs.org/@autoexpect/mcp-sseclient-browser/-/mcp-sseclient-browser-1.1.2.tgz","fileCount":10,"integrity":"sha512-bSczXcc9LCqpVmXfGioccHKaNBL/KFA5ZYNFGrospIH0d9Sou3BwyUsYm21DRb+KsBnFV8vGR0XgXV32Tn20zA==","signatures":[{"sig":"MEYCIQDsFOkesZOfEW/jEZUsJ4P35k30KNAJadWykEQnqFmQKwIhAPnQntIVSkO/kGO878gwBUgkiofrJxxvbodyIg4tAiyM","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":28096},"main":"dist/index.js","module":"./dist/index.js","exports":{".":{"import":"./dist/index.js"}},"gitHead":"c1e76c5d70c1ad0c069a8900ac744541cb0dc261","scripts":{"test":"echo \"No tests specified\" && exit 0","build":"npx tsc"},"_npmUser":{"name":"autoexpect","email":"rui.crater@gmail.com"},"_npmVersion":"10.9.0","description":"A browser-optimized SSEClient module for managing Server-Sent Events.","directories":{},"_nodeVersion":"22.12.0","browserslist":["last 2 versions","not dead"],"dependencies":{"openai":"^4.96.0","@modelcontextprotocol/sdk":"^1.10.2"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^4.0.0","@types/node":"^22.14.1"},"_npmOperationalInternal":{"tmp":"tmp/mcp-sseclient-browser_1.1.2_1746346428065_0.5690373065695264","host":"s3://npm-registry-packages-npm-production"}},"1.1.3":{"name":"@autoexpect/mcp-sseclient-browser","version":"1.1.3","_id":"@autoexpect/mcp-sseclient-browser@1.1.3","maintainers":[{"name":"autoexpect","email":"rui.crater@gmail.com"}],"dist":{"shasum":"273cc6adeda81943db6ac8d41e345d470934d1df","tarball":"https://registry.npmjs.org/@autoexpect/mcp-sseclient-browser/-/mcp-sseclient-browser-1.1.3.tgz","fileCount":10,"integrity":"sha512-CiS72Itdf3x3jSHnHFQBfhjvjJWN6HETBTs/VXgiwU65iQp5QlvRfnl0v6TgHU3prai2JESchjJfPtHcl9IaIQ==","signatures":[{"sig":"MEUCIQDsn80qGHkK5HGhR5s5nqEMCGoeNU7VvfuqOnUrBouSgAIgY9HqM38f023cx04WBRv8fnPXMIeg3xcLeLr48O3SNes=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":28215},"main":"dist/index.js","module":"./dist/index.js","engines":{"node":">=22.0.0"},"exports":{".":{"import":"./dist/index.js"}},"gitHead":"6b79b1d31f1c786cbff30f49a2dcc7387e9a89d6","scripts":{"test":"echo \"No tests specified\" && exit 0","build":"npx tsc","postinstall":"patch-package"},"_npmUser":{"name":"autoexpect","email":"rui.crater@gmail.com"},"_npmVersion":"10.9.0","description":"A browser-optimized SSEClient module for managing Server-Sent Events.","directories":{},"_nodeVersion":"22.12.0","browserslist":["last 2 versions","not dead"],"dependencies":{"openai":"^4.96.0","@modelcontextprotocol/sdk":"^1.10.2"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^4.0.0","@types/node":"^22.14.1","patch-package":"^8.0.0"},"_npmOperationalInternal":{"tmp":"tmp/mcp-sseclient-browser_1.1.3_1746606443377_0.4488018010694246","host":"s3://npm-registry-packages-npm-production"}},"1.1.5":{"name":"@autoexpect/mcp-sseclient-browser","version":"1.1.5","_id":"@autoexpect/mcp-sseclient-browser@1.1.5","maintainers":[{"name":"autoexpect","email":"rui.crater@gmail.com"}],"dist":{"shasum":"6401742ffc64dbf16e69038d2ba5275ff9e8a4c7","tarball":"https://registry.npmjs.org/@autoexpect/mcp-sseclient-browser/-/mcp-sseclient-browser-1.1.5.tgz","fileCount":10,"integrity":"sha512-MT/48I8pOvowKwkIzx0N7FjiFXnGL/5T8LmORm61wS+u2AUKDnWLmM3rhJDzwgwOf8gaKknDEsrv0rSbWPNcIQ==","signatures":[{"sig":"MEUCIDiz6JEXfw28/3AtxEMLUsP6B2nfv+JdVuvD4Gh4djCyAiEA489cMawSBdAaGgPoTFGfBkMzLRb0lPVqovmreyqAl/A=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":29053},"main":"dist/index.js","module":"./dist/index.js","engines":{"node":">=22.0.0"},"exports":{".":{"import":"./dist/index.js"}},"gitHead":"66b5fc338bb8c8d7e83de3cbd6cdd1f00f9159e4","scripts":{"test":"echo \"No tests specified\" && exit 0","build":"npx tsc","postinstall":"patch-package"},"_npmUser":{"name":"autoexpect","email":"rui.crater@gmail.com"},"_npmVersion":"10.9.0","description":"A browser-optimized SSEClient module for managing Server-Sent Events.","directories":{},"_nodeVersion":"22.12.0","browserslist":["last 2 versions","not dead"],"dependencies":{"openai":"^4.96.0","@modelcontextprotocol/sdk":"^1.10.2"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^4.0.0","@types/node":"^22.14.1","patch-package":"^8.0.0"},"_npmOperationalInternal":{"tmp":"tmp/mcp-sseclient-browser_1.1.5_1746635221334_0.41878482771526926","host":"s3://npm-registry-packages-npm-production"}},"1.1.7":{"name":"@autoexpect/mcp-sseclient-browser","version":"1.1.7","_id":"@autoexpect/mcp-sseclient-browser@1.1.7","maintainers":[{"name":"autoexpect","email":"rui.crater@gmail.com"}],"dist":{"shasum":"65a7fb64d2e3ad3ecb2f5456e6e720c7e1c258dd","tarball":"https://registry.npmjs.org/@autoexpect/mcp-sseclient-browser/-/mcp-sseclient-browser-1.1.7.tgz","fileCount":10,"integrity":"sha512-kKN4NMAhIM2NdLk9ef3WUaPGd8vpNWJrXDIrJcYwQCHpp24657Jdv1oEwh8kKIKq7lyXjr4ay3Ifd/h1aqExMA==","signatures":[{"sig":"MEUCIQCvKBQ+wa6gRNrgluY2pORN7u5uu2FDrTGuzklDppx7mQIgM/RGksyOOxMfWqJeBJj+1lH5pC9YJ1ldsZ+9w6D4JKo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":29131},"main":"dist/index.js","module":"./dist/index.js","engines":{"node":">=22.0.0"},"exports":{".":{"import":"./dist/index.js"}},"gitHead":"99980f84416bbfe956bc53d67210c2c30bd5cafa","scripts":{"test":"echo \"No tests specified\" && exit 0","build":"npx tsc","postinstall":"patch-package"},"_npmUser":{"name":"autoexpect","email":"rui.crater@gmail.com"},"_npmVersion":"10.9.0","description":"A browser-optimized SSEClient module for managing Server-Sent Events.","directories":{},"_nodeVersion":"22.12.0","browserslist":["last 2 versions","not dead"],"dependencies":{"openai":"^4.96.0","@modelcontextprotocol/sdk":"^1.10.2"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^4.0.0","@types/node":"^22.14.1","patch-package":"^8.0.0"},"_npmOperationalInternal":{"tmp":"tmp/mcp-sseclient-browser_1.1.7_1746866234238_0.30359104018685334","host":"s3://npm-registry-packages-npm-production"}},"1.1.8":{"name":"@autoexpect/mcp-sseclient-browser","version":"1.1.8","description":"A browser-optimized SSEClient module for managing Server-Sent Events.","main":"dist/index.js","module":"./dist/index.js","exports":{".":{"import":"./dist/index.js"}},"scripts":{"build":"npx tsc","test":"echo \"No tests specified\" && exit 0","postinstall":"patch-package"},"dependencies":{"@modelcontextprotocol/sdk":"^1.10.2","openai":"^4.96.0"},"devDependencies":{"@types/node":"^22.14.1","patch-package":"^8.0.0","typescript":"^4.0.0"},"browserslist":["last 2 versions","not dead"],"engines":{"node":">=22.0.0"},"_id":"@autoexpect/mcp-sseclient-browser@1.1.8","gitHead":"6ed8a97f1d5b6091706bb1fa842ddfb616dbf3d6","_nodeVersion":"22.12.0","_npmVersion":"10.9.0","dist":{"integrity":"sha512-nZeDALrkriuPNpOL20YlW6+H0LAGIhpQX2NhukBW62q4KE9D+Sa+gwu1uuufUO2uDYO338/eOAQdqAnBIqcqzg==","shasum":"b18b683adbbfcc5690f0b6425ca33a0ec12d3bae","tarball":"https://registry.npmjs.org/@autoexpect/mcp-sseclient-browser/-/mcp-sseclient-browser-1.1.8.tgz","fileCount":10,"unpackedSize":30132,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIDwJgI9dOv4jpCmmSrkWSSGQvg+rqWmTyKTNFpiMlkDPAiAYo4R+WBLz60ZxS5IaWjd6vBCkBM8SiQu8lPOCy9ONKw=="}]},"_npmUser":{"name":"autoexpect","email":"rui.crater@gmail.com"},"directories":{},"maintainers":[{"name":"autoexpect","email":"rui.crater@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/mcp-sseclient-browser_1.1.8_1746878440395_0.9722141109339373"},"_hasShrinkwrap":false}},"time":{"created":"2025-04-30T16:24:30.129Z","modified":"2025-05-10T12:00:40.780Z","1.1.0":"2025-04-30T16:24:30.502Z","1.1.1":"2025-05-01T02:09:40.602Z","1.1.2":"2025-05-04T08:13:48.259Z","1.1.3":"2025-05-07T08:27:23.559Z","1.1.5":"2025-05-07T16:27:01.514Z","1.1.7":"2025-05-10T08:37:14.419Z","1.1.8":"2025-05-10T12:00:40.594Z"},"description":"A browser-optimized SSEClient module for managing Server-Sent Events.","maintainers":[{"name":"autoexpect","email":"rui.crater@gmail.com"}],"readme":"\n# MCP-CLIENT-BROSWER\n\n**mcp-client-browser** is a TypeScript library that brings MCP (Model Control Protocol) support to the browser. It enables seamless interaction with large language models (LLMs) through an MCP server, leveraging [Cherry Studio](https://github.com/CherryHQ/cherry-studio)'s prompt templates and communication logic.\n\n## ✨ Features\n\n- 🌐 Runs entirely in the browser (no backend required)\n- ⚡ Communicates with MCP-compatible servers\n- 🧠 Built-in support for Cherry Studio's MCP prompt format\n- 🛠️ Simple, extendable, and TypeScript-friendly API\n- 📦 Designed for easy integration into modern web apps\n\n## 🚀 Getting Started\n\n### Installation\n\n```bash\nnpm i @autoexpect/mcp-sseclient-browser\n```\n\n### Usage\n\n```javascript\nlet mcpClient = new MCPClient(\n  [\n    {\n      url: new URL('/api/mcps/sse', window.location.origin)\n    }\n  ],\n  {\n    baseUrl: window.location.origin + \"/v1\",\n    apiKey: \"sk-default\",\n    model: \"deepseek-v3\",\n  }\n);\nawait mcpClient.connect();\nawait mcpClient.processQueryStream(\n  \"System Prompt\",\n  \"User Prompt\",\n  true,\n  (chunk) => {\n  },\n  (fullResponse) => {\n  }\n);\n```\n\n> ✅ Make sure your MCP server supports CORS and the Cherry prompt specification.\n\n## 💡 Use Cases\n\n- AI chatbots powered by LLMs directly in the browser\n- Embedding customizable prompt workflows into frontend apps\n- Creating interactive educational or creative writing tools\n\n## 🧩 Integrations\n\n- [Cherry Studio](https://github.com/CherryHQ/cherry-studio): Easily plug in Cherry-style prompt templates\n- Compatible with most OpenAI-compatible or custom MCP servers\n\n## 🛡️ Security & Privacy\n\nThis library does **not** store user data. All interactions happen directly between the browser and the configured MCP server.\n\n## 📄 License\n\nMIT License","readmeFilename":"README.md"}