{"_id":"@asd345gh/mcpkit","name":"@asd345gh/mcpkit","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@asd345gh/mcpkit","version":"1.0.0","description":"Shared browser automation and MCP server utilities for CLI tools","type":"module","main":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./browser":{"types":"./dist/browser/index.d.ts","import":"./dist/browser/index.js"},"./mcp":{"types":"./dist/mcp/index.d.ts","import":"./dist/mcp/index.js"},"./utils":{"types":"./dist/utils/index.d.ts","import":"./dist/utils/index.js"}},"scripts":{"build":"tsc","dev":"tsc --watch","prepublishOnly":"npm run build"},"keywords":["mcp","model-context-protocol","puppeteer","browser","automation"],"author":{"name":"Joo","email":"1546635571@qq.com"},"license":"MIT","peerDependencies":{"@modelcontextprotocol/sdk":"^1.0.4","puppeteer-core":"^24.0.0"},"devDependencies":{"@modelcontextprotocol/sdk":"^1.0.4","@types/node":"^24.10.0","puppeteer-core":"^24.29.1","typescript":"^5.3.3"},"engines":{"node":">=18.0.0"},"gitHead":"5ea18a7402a783bc56c56713a61e44ffb52a9293","_id":"@asd345gh/mcpkit@1.0.0","_nodeVersion":"24.13.0","_npmVersion":"11.6.2","dist":{"integrity":"sha512-u2OKpBqXkjTkYQXxvEWOrlK3WOtFexukdqRZE0PP9BbG9OYVpkGoMw1+YkRLJXa2C/BnSQOdyxQRlxtfnJynFA==","shasum":"99473def89e1243480178c5787532cfa6e4b98e8","tarball":"https://registry.npmjs.org/@asd345gh/mcpkit/-/mcpkit-1.0.0.tgz","fileCount":26,"unpackedSize":20818,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDbBt/X9Avgz7z/uMOHxWwDEUv/fAoqoKydsdCAV8xl/wIhAOS4fvI6s/v8A+D4ct/+JLYPAdXuVs+3PBN59++7nkQL"}]},"_npmUser":{"name":"asd345gh","email":"2892811270@qq.com"},"directories":{},"maintainers":[{"name":"asd345gh","email":"2892811270@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/mcpkit_1.0.0_1771936779003_0.6372640442909223"},"_hasShrinkwrap":false}},"time":{"created":"2026-02-24T12:39:38.920Z","1.0.0":"2026-02-24T12:39:39.144Z","modified":"2026-02-24T12:39:39.407Z"},"maintainers":[{"name":"asd345gh","email":"2892811270@qq.com"}],"description":"Shared browser automation and MCP server utilities for CLI tools","keywords":["mcp","model-context-protocol","puppeteer","browser","automation"],"author":{"name":"Joo","email":"1546635571@qq.com"},"license":"MIT","readme":"# @asd345gh/mcpkit\n\nShared browser automation and MCP (Model Context Protocol) server utilities for CLI tools.\n\n## Installation\n\n```bash\nnpm install @asd345gh/mcpkit\n```\n\n## Modules\n\n### Browser Module (`@asd345gh/mcpkit/browser`)\n\nPuppeteer browser automation utilities with cross-platform Chrome detection.\n\n```typescript\nimport { launchBrowser, withBrowser, findChromePath } from '@asd345gh/mcpkit/browser';\n\n// Auto-detect Chrome path\nconst chromePath = findChromePath();\n\n// Launch browser with persistent user data\nconst browser = await launchBrowser({\n  headless: false,\n  appName: 'my-cli',\n});\n\n// Auto-manage browser lifecycle\nawait withBrowser({ appName: 'my-cli' }, async (page) => {\n  await page.goto('https://example.com');\n  // Browser auto-closes after callback\n});\n```\n\n### MCP Server Module (`@asd345gh/mcpkit/mcp`)\n\nHelper utilities for creating MCP servers.\n\n```typescript\nimport { createMcpServer, createMcpTool } from '@asd345gh/mcpkit/mcp';\n\ncreateMcpServer({\n  name: 'my-server',\n  version: '1.0.0',\n  tools: {\n    myTool: {\n      definition: createMcpTool({\n        name: 'myTool',\n        description: 'My tool description',\n      }),\n      handler: async (args) => ({\n        content: [{ type: 'text', text: 'Result' }],\n      }),\n    },\n  },\n});\n```\n\n### Utils Module (`@asd345gh/mcpkit/utils`)\n\nFile-based caching utilities.\n\n```typescript\nimport { saveToCache, loadFromCache, loadFromCacheWithTtl } from '@asd345gh/mcpkit/utils';\n\n// Save to cache\nsaveToCache({ appName: 'my-cli' }, 'data.json', { key: 'value' });\n\n// Load from cache\nconst data = loadFromCache({ appName: 'my-cli' }, 'data.json');\n\n// Load with TTL (in seconds)\nconst freshData = loadFromCacheWithTtl({ appName: 'my-cli' }, 'data.json', 3600);\n```\n\n## Peer Dependencies\n\nThis package requires the following peer dependencies to be installed in your project:\n\n- `@modelcontextprotocol/sdk` (for MCP module)\n- `puppeteer-core` (for browser module)\n\n```bash\nnpm install @modelcontextprotocol/sdk puppeteer-core\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md","_rev":"1-3654a34efaf9099ab509514b9ea58f52"}