{"_id":"@curzbin/mcp-bisheng","_rev":"5-400be64b9a22d80dd624029dedf04c8f","name":"@curzbin/mcp-bisheng","dist-tags":{"latest":"0.2.0"},"versions":{"0.1.0":{"name":"@curzbin/mcp-bisheng","version":"0.1.0","_id":"@curzbin/mcp-bisheng@0.1.0","maintainers":[{"name":"curzbin","email":"zibin@wizthink.cn"}],"bin":{"mcp-bisheng":"dist/index.mjs"},"dist":{"shasum":"7479b4d9b3a28b950d4abcf7166b4c2179bdf566","tarball":"https://registry.npmjs.org/@curzbin/mcp-bisheng/-/mcp-bisheng-0.1.0.tgz","fileCount":23,"integrity":"sha512-0I4E1j1G5FR/EIGE7Dj+ftHtkUQctIHOhZi1P6gg0i18M3l7tUFTpuT+cN8lve7jjwlsSUtErDIoAS0JmLqlCQ==","signatures":[{"sig":"MEUCIQDRTH4lRYv+DPsQj6z7kAVTk08vVw/B8c3Q83puOIob4QIgUcozbsmrOEbZjSJ0O7oWEnDCvo+sIcxWCYFfZQnVwhA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1350985},"main":"dist/index.mjs","type":"module","module":"dist/index.mjs","exports":{".":{"import":"./dist/index.mjs"}},"gitHead":"251f97f2249d1f7bc9d10ca86be76fcbf1d4fd7f","private":false,"scripts":{"dev":"npx tsdown --watch","test":"vitest","build":"npx tsdown"},"_npmUser":{"name":"curzbin","email":"zibin@wizthink.cn"},"_npmVersion":"10.9.2","description":"中文 | [English](README_EN.md)","directories":{},"_nodeVersion":"22.16.0","dependencies":{"zod":"^3.23.0","pino":"^9.5.0","jsdom":"^27.4.0","turndown":"^7.1.2","playwright":"^1.57.0","turndown-plugin-gfm":"^1.0.2","@mozilla/readability":"0.6.0","@modelcontextprotocol/sdk":"^1.25.3"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^9.12.0","tsdown":"^0.20.0-beta.4","vitest":"^2.1.0","prettier":"^3.4.0","typescript":"^5.7.0","@types/node":"^22.10.0","@typescript-eslint/parser":"^8.8.0","@typescript-eslint/eslint-plugin":"^8.8.0"},"_npmOperationalInternal":{"tmp":"tmp/mcp-bisheng_0.1.0_1770290473496_0.5648867187994593","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@curzbin/mcp-bisheng","version":"0.1.1","_id":"@curzbin/mcp-bisheng@0.1.1","maintainers":[{"name":"curzbin","email":"zibin@wizthink.cn"}],"bin":{"mcp-bisheng":"dist/index.mjs"},"dist":{"shasum":"6c5feec28d093dcf1bd6d818479d5c0eb5ec2b87","tarball":"https://registry.npmjs.org/@curzbin/mcp-bisheng/-/mcp-bisheng-0.1.1.tgz","fileCount":23,"integrity":"sha512-OibYGxnlGwt56p64R/YVyKnS0xD3gzsB4qHsfe3blTPJW2STt+ilZhteA1Xt8y1IwUhUjPAknCiptuIGhd7gHA==","signatures":[{"sig":"MEUCIBu3dfsD0Izx3DEE1hHonbPPSE+WNgd20NAK5Rf+knCYAiEAiGg5t1CUm3ia6Dzh4HkE1W743a0/T5sqdlW063SaVn8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1351233},"main":"dist/index.mjs","type":"module","module":"dist/index.mjs","exports":{".":{"import":"./dist/index.mjs"}},"gitHead":"f503156e29e6a1090752efe200c9dc15bea9741c","private":false,"scripts":{"dev":"npx tsdown --watch","test":"vitest","build":"npx tsdown"},"_npmUser":{"name":"curzbin","email":"zibin@wizthink.cn"},"_npmVersion":"10.9.2","description":"中文 | [English](README_EN.md)","directories":{},"_nodeVersion":"22.16.0","dependencies":{"zod":"^3.23.0","pino":"^9.5.0","jsdom":"^27.4.0","turndown":"^7.1.2","playwright":"^1.57.0","turndown-plugin-gfm":"^1.0.2","@mozilla/readability":"0.6.0","@modelcontextprotocol/sdk":"^1.25.3"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^9.12.0","tsdown":"^0.20.0-beta.4","vitest":"^2.1.0","prettier":"^3.4.0","typescript":"^5.7.0","@types/node":"^22.10.0","@typescript-eslint/parser":"^8.8.0","@typescript-eslint/eslint-plugin":"^8.8.0"},"_npmOperationalInternal":{"tmp":"tmp/mcp-bisheng_0.1.1_1770349460197_0.04437255925870209","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@curzbin/mcp-bisheng","version":"0.1.2","_id":"@curzbin/mcp-bisheng@0.1.2","maintainers":[{"name":"curzbin","email":"zibin@wizthink.cn"}],"bin":{"mcp-bisheng":"dist/index.mjs"},"dist":{"shasum":"629f50fb3ac7370ed7b541269fd7140214362282","tarball":"https://registry.npmjs.org/@curzbin/mcp-bisheng/-/mcp-bisheng-0.1.2.tgz","fileCount":5,"integrity":"sha512-QDD3GEXM75XU6Z9lmcILztr/uXYNgYToqfZYv33dHbtsYxNGIZ9uL6SJe5GbNiEz2MN/kQC6vB7rMyJUfMaXhA==","signatures":[{"sig":"MEUCIEqGdrt+koa88VZ4LHYsAOua6OuY1n7xHBgHW/tq06V0AiEA2xULytOjfbcIkMOTRtToWrZ7xUgm1iYXpeR9pH1pBrk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":25025},"main":"dist/index.mjs","type":"module","module":"dist/index.mjs","exports":{".":{"import":"./dist/index.mjs"}},"gitHead":"f503156e29e6a1090752efe200c9dc15bea9741c","private":false,"scripts":{"dev":"npx tsdown --watch","test":"vitest","build":"npx tsdown"},"_npmUser":{"name":"curzbin","email":"zibin@wizthink.cn"},"_npmVersion":"10.9.2","description":"中文 | [English](README_EN.md)","directories":{},"_nodeVersion":"22.16.0","dependencies":{"zod":"^3.23.0","pino":"^9.5.0","jsdom":"^27.4.0","turndown":"^7.1.2","playwright":"^1.57.0","turndown-plugin-gfm":"^1.0.2","@mozilla/readability":"0.6.0","@modelcontextprotocol/sdk":"^1.25.3"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^9.12.0","tsdown":"^0.20.0-beta.4","vitest":"^2.1.0","prettier":"^3.4.0","typescript":"^5.7.0","@types/node":"^22.10.0","@typescript-eslint/parser":"^8.8.0","@typescript-eslint/eslint-plugin":"^8.8.0"},"_npmOperationalInternal":{"tmp":"tmp/mcp-bisheng_0.1.2_1770350117871_0.5973165025510065","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@curzbin/mcp-bisheng","version":"0.1.3","_id":"@curzbin/mcp-bisheng@0.1.3","maintainers":[{"name":"curzbin","email":"zibin@wizthink.cn"}],"bin":{"mcp-bisheng":"bin/mcp-bisheng.js"},"dist":{"shasum":"eb9511d2ee41bd3c8e175539cd1b9e1f6be6d524","tarball":"https://registry.npmjs.org/@curzbin/mcp-bisheng/-/mcp-bisheng-0.1.3.tgz","fileCount":6,"integrity":"sha512-JMiMJvos+2LKmtuQyoFI4FjwqxBn8XKKfqAs1gH7lmqL5zavj99L/8xjx+h+kBOdxHoNv4PhY6VwFjOzI8+xVA==","signatures":[{"sig":"MEQCIASdl3Fh60WC473WV2gsU6pO5xuUZtGWaA8lEh6o5iuZAiAqwu6bW84jjcxmjzRFg9641NzLAsYROPibNJ30FA0fFQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":25085},"main":"dist/index.mjs","type":"module","module":"dist/index.mjs","exports":{".":{"import":"./dist/index.mjs"}},"gitHead":"f503156e29e6a1090752efe200c9dc15bea9741c","private":false,"scripts":{"dev":"npx tsdown --watch","test":"vitest","build":"npx tsdown"},"_npmUser":{"name":"curzbin","email":"zibin@wizthink.cn"},"_npmVersion":"10.9.2","description":"中文 | [English](README_EN.md)","directories":{},"_nodeVersion":"22.16.0","dependencies":{"zod":"^3.23.0","pino":"^9.5.0","jsdom":"^27.4.0","turndown":"^7.1.2","playwright":"^1.57.0","turndown-plugin-gfm":"^1.0.2","@mozilla/readability":"0.6.0","@modelcontextprotocol/sdk":"^1.25.3"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^9.12.0","tsdown":"^0.20.0-beta.4","vitest":"^2.1.0","prettier":"^3.4.0","typescript":"^5.7.0","@types/node":"^22.10.0","@typescript-eslint/parser":"^8.8.0","@typescript-eslint/eslint-plugin":"^8.8.0"},"_npmOperationalInternal":{"tmp":"tmp/mcp-bisheng_0.1.3_1770350387720_0.6297448706284952","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@curzbin/mcp-bisheng","version":"0.2.0","repository":{"type":"git","url":"git+https://github.com/Curzibn/mcp-bisheng.git"},"private":false,"type":"module","main":"dist/index.mjs","module":"dist/index.mjs","bin":{"mcp-bisheng":"bin/mcp-bisheng.js"},"exports":{".":{"import":"./dist/index.mjs"}},"scripts":{"build":"npx tsdown","dev":"npx tsdown --watch","test":"vitest"},"dependencies":{"@modelcontextprotocol/sdk":"^1.25.3","@mozilla/readability":"0.6.0","jsdom":"^27.4.0","pino":"^9.5.0","playwright":"^1.57.0","turndown":"^7.1.2","turndown-plugin-gfm":"^1.0.2","zod":"^3.23.0"},"devDependencies":{"@types/node":"^22.10.0","@typescript-eslint/eslint-plugin":"^8.8.0","@typescript-eslint/parser":"^8.8.0","eslint":"^9.12.0","prettier":"^3.4.0","tsdown":"^0.20.0-beta.4","typescript":"^5.7.0","vitest":"^2.1.0"},"_id":"@curzbin/mcp-bisheng@0.2.0","gitHead":"b7e5706b79132ede3938b93d92a8656a02d4de0e","description":"中文 | [English](README_EN.md)","bugs":{"url":"https://github.com/Curzibn/mcp-bisheng/issues"},"homepage":"https://github.com/Curzibn/mcp-bisheng#readme","_nodeVersion":"20.20.0","_npmVersion":"10.8.2","dist":{"integrity":"sha512-XUSSKG+JOExIyADkmVMh8EF724xiQ5DdUw1f8CvpqLS4wXoeT2i5D2jlIIAGzZyaz16Hkh0tKiiQx0S3Ac/Rxg==","shasum":"0c4c6bf45d12eb9b1713c1b8417925853f6b2ad9","tarball":"https://registry.npmjs.org/@curzbin/mcp-bisheng/-/mcp-bisheng-0.2.0.tgz","fileCount":6,"unpackedSize":50253,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@curzbin%2fmcp-bisheng@0.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDpr5UZcQHGaTYIEClATwffs4UyXVRL9VAyAJCtkyFGugIgcbISSAzpQjJrC+7A62eO24hv8Rl9BfTcDOOZil2imJE="}]},"_npmUser":{"name":"curzbin","email":"zibin@wizthink.cn"},"directories":{},"maintainers":[{"name":"curzbin","email":"zibin@wizthink.cn"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/mcp-bisheng_0.2.0_1771147210695_0.47766583648876426"},"_hasShrinkwrap":false}},"time":{"created":"2026-02-05T11:21:13.275Z","modified":"2026-02-15T09:20:11.135Z","0.1.0":"2026-02-05T11:21:13.663Z","0.1.1":"2026-02-06T03:44:20.364Z","0.1.2":"2026-02-06T03:55:18.023Z","0.1.3":"2026-02-06T03:59:47.877Z","0.2.0":"2026-02-15T09:20:10.842Z"},"description":"中文 | [English](README_EN.md)","maintainers":[{"name":"curzbin","email":"zibin@wizthink.cn"}],"readme":"# BiSheng (毕昇)\n\n中文 | [English](README_EN.md)\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![npm version](https://img.shields.io/npm/v/@curzbin/mcp-bisheng.svg)](https://www.npmjs.com/package/@curzbin/mcp-bisheng)\n\n> **\"The movable type printing for the AI era.\"**\n> 像活字印刷术重新排列文字一样，BiSheng 将杂乱的现代网页重组为 AI 最易阅读的 Markdown。\n\nBiSheng（毕昇） 是一个基于 **MCP (Model Context Protocol)** 的高性能网页解析工具。它专为大语言模型（LLM）设计，解决了 AI 访问现代网页时的 **SPA 渲染**、**Token 浪费** 和 **反爬虫拦截** 三大难题。\n\n### 原始 HTML vs BiSheng Markdown\n\n| 原始网页 | BiSheng 输出 |\n| --- | --- |\n| ![原始 HTML](images/html.png) | ![BiSheng Markdown](images/bisheng.png) |\n\n## ✨ 核心特性 (Features)\n\n* **🖥️ 真浏览器渲染**: 基于 Playwright (Chromium)，完美支持 React/Vue 等 SPA 页面，自动处理懒加载。\n* **🧹 智能降噪**: 集成 Readability 算法，自动剔除广告、侧边栏，只保留核心正文。\n* **📝 完美 Markdown**: 保留代码块高亮、表格结构，自动修复相对链接。\n* **🛡️ 企业级控制**: 内置私有 IP 拦截（防 SSRF）、超时控制、图片资源限制。\n\n## 🛠️ 工具列表 (Tools)\n\nBiSheng 向 MCP 客户端暴露以下工具：\n\n### `read_url`\n\n使用无头浏览器渲染网页并返回 Markdown 格式的主内容。提供 `output_path` 时同时保存到本地文件。\n\n* **参数**:\n  * `url` (string, required): 目标网页地址，仅支持 http/https。\n  * `output_path` (string, optional): 保存 Markdown 的路径。相对路径从 MCP 进程工作目录解析，建议使用绝对路径。\n\n* **示例**:\n```json\n{ \"url\": \"https://react.dev/learn\" }\n```\n\n```json\n{ \"url\": \"https://example.com\", \"output_path\": \"d:\\\\output\\\\page.md\" }\n```\n\n### `scan_docs_toc`\n\n扫描文档网站的目录结构（TOC），返回包含标题和 URL 的结构化树。支持 SPA 单页应用（hash 路由）和传统多页站点。AI 可据此批量下载页面，组合为完整文档。\n\n* **参数**:\n  * `url` (string, required): 文档网站地址，仅支持 http/https。\n  * `max_depth` (integer, optional): 目录树最大扫描深度，默认 `10`。\n\n* **示例**:\n```json\n{ \"url\": \"https://developer.work.weixin.qq.com/document/path/90664\", \"max_depth\": 3 }\n```\n\n### `install_chromium`\n\n安装 Playwright 所需的 Chromium 浏览器。当 `read_url` 因 Chromium 未安装而失败时，可先调用此工具再重试。\n\n* **参数**:\n  * `with_deps` (boolean, optional): 是否同时安装系统依赖，默认 `false`。\n\n## 🚀 快速开始 (Quick Start)\n\n### 1. Claude Desktop (推荐)\n\n在 `claude_desktop_config.json` 中添加配置：\n\n```json\n{\n  \"mcpServers\": {\n    \"bisheng\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@curzbin/mcp-bisheng@0.2.0\"]\n    }\n  }\n}\n```\n\n在 Claude 中，你可以直接对模型说类似的话：\n\n```json\n{ \"tool\": \"read_url\", \"params\": { \"url\": \"https://react.dev/learn\" } }\n```\n\nClaude 会通过 MCP 调用 BiSheng，得到干净的 Markdown 文档后再继续对话和生成代码。\n\n### 2. 在 Cursor 中作为 MCP 工具使用\n\n在 Cursor 中，你可以在“Settings → MCP Servers”（或相应的 MCP 配置入口）中新增一个 Server，命令填写：\n\n```bash\n{\n  \"mcpServers\": {\n    \"bisheng\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@curzbin/mcp-bisheng@0.2.0\"]\n    }\n  }\n}\n```\n\n保存后，Cursor 会在本地通过 MCP 启动 BiSheng。此时你可以：\n\n- **在对话框中直接引用 URL**，让 Cursor 调用 `read_url`，把网页转成 Markdown 后再继续回答。\n- **结合 `output_path` 参数**，把外部文档抓取后直接保存到当前仓库，例如：\n\n```json\n{\n  \"tool\": \"read_url\",\n  \"params\": {\n    \"url\": \"https://example.com/docs\",\n    \"output_path\": \"docs/external/example-docs.md\"\n  }\n}\n```\n\n这样生成的 Markdown 会被 Cursor 索引，之后的任何对话都可以自动检索这些文档。\n\n### 3. Docker 运行\n\n适合部署在服务器或无法安装 Node.js 的环境。\n\n```bash\ndocker pull curzbin/mcp-bisheng:latest\n\ndocker run --rm -i curzbin/mcp-bisheng:latest\n```\n\n### 4. CLI 临时使用\n\n```bash\nnpx @curzbin/mcp-bisheng@0.2.0\n```\n\n## ⚙️ 配置 (Configuration)\n\n通过环境变量调整 BiSheng 行为：\n\n| 变量名 | 默认值 | 说明 |\n| --- | --- | --- |\n| `BROWSER_TIMEOUT_MS` | `30000` | 页面加载超时时间 (毫秒) |\n| `MAX_IMAGE_RESOURCES` | `50` | 单页最大图片资源数量 |\n| `MCP_SERVER_NAME` | `@curzbin/mcp-bisheng` | MCP 服务显示名称 |\n\n## 🏗️ 架构与开发\n\n本项目采用 TypeScript + Playwright 开发。\n\n```bash\npnpm install\npnpm dev\npnpm build\n```\n\n# ☕ 捐助\n\n如果这个项目对您有帮助，欢迎通过以下方式支持我的工作。您的支持是我持续改进和维护这个项目的动力。\n\n<div align=\"center\">\n<table>\n<tr>\n<td align=\"center\">\n<img src=\"images/alipay.png\" width=\"300\" alt=\"支付宝收款码\" />\n</td>\n<td width=\"50\"></td>\n<td align=\"center\">\n<img src=\"images/wechat.png\" width=\"300\" alt=\"微信收款码\" />\n</td>\n</tr>\n</table>\n</div>\n\n感谢您的支持！🙏","readmeFilename":"README.md","homepage":"https://github.com/Curzibn/mcp-bisheng#readme","repository":{"type":"git","url":"git+https://github.com/Curzibn/mcp-bisheng.git"},"bugs":{"url":"https://github.com/Curzibn/mcp-bisheng/issues"}}