{"_id":"@dhso/siyuan-mcp-server","_rev":"2-529b9d304c123760501f13cf4001ca2d","name":"@dhso/siyuan-mcp-server","dist-tags":{"latest":"1.2.4"},"versions":{"1.2.3":{"name":"@dhso/siyuan-mcp-server","version":"1.2.3","keywords":["siyuan","siyuan-note","mcp","model-context-protocol","claude"],"author":{"url":"https://github.com/onigeya","name":"onigeya"},"license":"ISC","_id":"@dhso/siyuan-mcp-server@1.2.3","maintainers":[{"name":"dhso","email":"dhso@163.com"}],"homepage":"https://github.com/onigeya/siyuan-mcp-server#readme","bugs":{"url":"https://github.com/onigeya/siyuan-mcp-server/issues"},"dist":{"shasum":"f6e9d87766cdb1c8a666937a1f217a6dff213564","tarball":"https://registry.npmjs.org/@dhso/siyuan-mcp-server/-/siyuan-mcp-server-1.2.3.tgz","fileCount":45,"integrity":"sha512-HSMqJt9G4yFuXsu1dJy8uC/C6ZZbPNgQmeG/owTtD7K0wH0b6ipjPtm4NW47Am9vkj3Ra+kZYuEyN0p/1g58Jw==","signatures":[{"sig":"MEYCIQDSFVTVAsYl+BoQYz7WdNPBCB8+WuzS29zK5P+kCqNRuwIhAK73NqUFpimsh/KSr3oSt3uOCdKhAxi2WsSVRhK1nCZD","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":104034},"main":"./dist/server.js","type":"module","_from":"file:dhso-siyuan-mcp-server-1.2.3.tgz","types":"./dist/server.d.ts","module":"./dist/server.js","exports":{".":{"types":"./dist/server.d.ts","import":"./dist/server.js","default":"./dist/server.js"},"./tools":{"types":"./dist/tools/index.d.ts","import":"./dist/tools/index.js","default":"./dist/tools/index.js"}},"private":false,"scripts":{"dev":"node --loader ts-node/esm src/server.ts","test":"node --experimental-vm-modules node_modules/jest/bin/jest.js","build":"tsc","clean":"rimraf dist","start":"node dist/server.js","test:watch":"node --experimental-vm-modules node_modules/jest/bin/jest.js --watch"},"_npmUser":{"name":"dhso","email":"dhso@163.com"},"_resolved":"/tmp/5fb670eee363415dd253ee92fd951675/dhso-siyuan-mcp-server-1.2.3.tgz","_integrity":"sha512-HSMqJt9G4yFuXsu1dJy8uC/C6ZZbPNgQmeG/owTtD7K0wH0b6ipjPtm4NW47Am9vkj3Ra+kZYuEyN0p/1g58Jw==","repository":{"url":"git+https://github.com/onigeya/siyuan-mcp-server.git","type":"git"},"_npmVersion":"10.9.3","description":"思源笔记MCP服务器","directories":{},"_nodeVersion":"22.20.0","dependencies":{"zod":"^3.24.2","axios":"^1.8.4","@modelcontextprotocol/sdk":"^1.8.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","rimraf":"^6.0.1","ts-jest":"^29.1.2","ts-node":"^10.9.2","typescript":"^5.8.2","@types/jest":"^29.5.12","@types/node":"^22.13.14","@jest/globals":"^29.7.0"},"_npmOperationalInternal":{"tmp":"tmp/siyuan-mcp-server_1.2.3_1761533762851_0.9164577890427306","host":"s3://npm-registry-packages-npm-production"}},"1.2.4":{"name":"@dhso/siyuan-mcp-server","version":"1.2.4","description":"思源笔记MCP服务器","type":"module","private":false,"main":"./dist/server.js","module":"./dist/server.js","types":"./dist/server.d.ts","exports":{".":{"types":"./dist/server.d.ts","import":"./dist/server.js","default":"./dist/server.js"},"./tools":{"types":"./dist/tools/index.d.ts","import":"./dist/tools/index.js","default":"./dist/tools/index.js"}},"publishConfig":{"access":"public"},"keywords":["siyuan","siyuan-note","mcp","model-context-protocol","claude"],"author":{"name":"onigeya","url":"https://github.com/onigeya"},"repository":{"type":"git","url":"git+https://github.com/onigeya/siyuan-mcp-server.git"},"bugs":{"url":"https://github.com/onigeya/siyuan-mcp-server/issues"},"homepage":"https://github.com/onigeya/siyuan-mcp-server#readme","license":"ISC","dependencies":{"@modelcontextprotocol/sdk":"^1.8.0","axios":"^1.8.4","zod":"^3.24.2"},"devDependencies":{"@jest/globals":"^29.7.0","@types/jest":"^29.5.12","@types/node":"^22.13.14","jest":"^29.7.0","rimraf":"^6.0.1","ts-jest":"^29.1.2","ts-node":"^10.9.2","typescript":"^5.8.2"},"scripts":{"build":"tsc","start":"node dist/server.js","dev":"node --loader ts-node/esm src/server.ts","clean":"rimraf dist","test":"node --experimental-vm-modules node_modules/jest/bin/jest.js","test:watch":"node --experimental-vm-modules node_modules/jest/bin/jest.js --watch"},"_id":"@dhso/siyuan-mcp-server@1.2.4","_integrity":"sha512-/tCWA5cTsYmQNo5siMugadyuRce0TAfkHX+MwiJe6tswFb3Q+6oE8t6/+4fYUaUpj2Zsl5o42lO8vQPxwFcSXA==","_resolved":"/tmp/0a3115eccd667095775a076ff04775da/dhso-siyuan-mcp-server-1.2.4.tgz","_from":"file:dhso-siyuan-mcp-server-1.2.4.tgz","_nodeVersion":"22.20.0","_npmVersion":"10.9.3","dist":{"integrity":"sha512-/tCWA5cTsYmQNo5siMugadyuRce0TAfkHX+MwiJe6tswFb3Q+6oE8t6/+4fYUaUpj2Zsl5o42lO8vQPxwFcSXA==","shasum":"2e913feebcd3b72677a481567b19175ff149f709","tarball":"https://registry.npmjs.org/@dhso/siyuan-mcp-server/-/siyuan-mcp-server-1.2.4.tgz","fileCount":45,"unpackedSize":104034,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIA7J2E6bzCk1C/ju/ei03o+M3sBQZqU/jDNervBqGyYWAiEA26UXQK4natccrX1Yjw1HQUIJuaWJi0FzHpzOnqqS288="}]},"_npmUser":{"name":"dhso","email":"dhso@163.com"},"directories":{},"maintainers":[{"name":"dhso","email":"dhso@163.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/siyuan-mcp-server_1.2.4_1761535165360_0.5975005237581537"},"_hasShrinkwrap":false}},"time":{"created":"2025-10-27T02:56:02.768Z","modified":"2025-10-27T03:19:25.768Z","1.2.3":"2025-10-27T02:56:03.083Z","1.2.4":"2025-10-27T03:19:25.566Z"},"bugs":{"url":"https://github.com/onigeya/siyuan-mcp-server/issues"},"author":{"name":"onigeya","url":"https://github.com/onigeya"},"license":"ISC","homepage":"https://github.com/onigeya/siyuan-mcp-server#readme","keywords":["siyuan","siyuan-note","mcp","model-context-protocol","claude"],"repository":{"type":"git","url":"git+https://github.com/onigeya/siyuan-mcp-server.git"},"description":"思源笔记MCP服务器","maintainers":[{"name":"dhso","email":"dhso@163.com"}],"readme":"# SiYuan Note MCP Server\n[![smithery badge](https://smithery.ai/badge/@onigeya/siyuan-mcp-server)](https://smithery.ai/server/@onigeya/siyuan-mcp-server)\n\n一个 MCP 服务器实现，提供与思源笔记系统的集成，使 AI 模型能够访问和操作笔记数据。\n\nAn MCP server implementation that provides integration with the SiYuan Note system, enabling AI models to access and manipulate note data.\n\n## 功能特性 | Features\n\n* 笔记本管理 | Notebook Management\n* 文档操作 | Document Operations\n* 内容块控制 | Block Control\n* 文件和资源管理 | File and Asset Management\n* SQL 查询支持 | SQL Query Support\n* 属性管理 | Attribute Management\n* 导出和转换 | Export and Conversion\n* 系统功能 | System Functions\n\n## 命令列表 | Command List\n\n所有命令都支持使用 `help` 查询获取详细说明。例如：\n\nAll commands support detailed documentation via the `help` command. For example:\n\n```json\n{\n  \"type\": \"help\",\n  \"params\": {\n    \"type\": \"block.insertBlock\"\n  }\n}\n```\n\n### 资源管理 | Asset Management\n\n* `assets.uploadAssets` - 上传资源文件 | Upload assets\n\n### 属性管理 | Attribute Management\n\n* `attr.setBlockAttrs` - 设置块属性 | Set block attributes\n* `attr.getBlockAttrs` - 获取块属性 | Get block attributes\n\n### 内容块操作 | Block Operations\n\n* `block.insertBlock` - 插入内容块 | Insert a block\n* `block.updateBlock` - 更新内容块 | Update block content\n* `block.deleteBlock` - 删除内容块 | Delete a block\n* `block.moveBlock` - 移动内容块 | Move a block\n* `block.getBlockKramdown` - 获取块的 Markdown 内容 | Get block Kramdown content\n\n### 格式转换 | Format Conversion\n\n* `convert.pandoc` - 使用 Pandoc 转换内容 | Convert content using Pandoc\n\n### 导出功能 | Export Functions\n\n* `export.exportNotebook` - 导出笔记本 | Export notebook\n* `export.exportDoc` - 导出文档 | Export document\n\n### 文件操作 | File Operations\n\n* `file.getFile` - 获取文件内容 | Get file content\n* `file.putFile` - 写入文件内容 | Put file content\n* `file.removeFile` - 删除文件 | Remove file\n* `file.readDir` - 读取目录内容 | List files in directory\n\n### 文档树操作 | File Tree Operations\n\n* `filetree.createDocWithMd` - 使用 Markdown 创建文档 | Create document with Markdown\n* `filetree.renameDoc` - 重命名文档 | Rename document\n* `filetree.removeDoc` - 删除文档 | Remove document\n* `filetree.moveDocs` - 移动文档 | Move documents\n* `filetree.getHPathByPath` - 获取文档可读路径 | Get document HPath by path\n* `filetree.getHPathByID` - 通过 ID 获取文档可读路径 | Get document HPath by ID\n\n### 网络代理 | Network Proxy\n\n* `network.forwardProxy` - 网络请求代理 | Forward proxy request\n\n### 笔记本管理 | Notebook Management\n\n* `notebook.lsNotebooks` - 列出所有笔记本 | List all notebooks\n* `notebook.openNotebook` - 打开笔记本 | Open notebook\n* `notebook.closeNotebook` - 关闭笔记本 | Close notebook\n* `notebook.renameNotebook` - 重命名笔记本 | Rename notebook\n* `notebook.createNotebook` - 创建笔记本 | Create notebook\n* `notebook.removeNotebook` - 删除笔记本 | Remove notebook\n* `notebook.getNotebookConf` - 获取笔记本配置 | Get notebook configuration\n* `notebook.setNotebookConf` - 设置笔记本配置 | Set notebook configuration\n\n### 通知提醒 | Notifications\n\n* `notification.pushMsg` - 发送消息通知 | Push message notification\n* `notification.pushErrMsg` - 发送错误通知 | Push error message notification\n\n### 查询功能 | Query Functions\n\n* `query.sql` - 执行 SQL 查询 | Execute SQL query\n* `query.block` - 通过 ID 查询块 | Query block by ID\n\n### 搜索功能 | Search Functions\n\n* `search.fullTextSearch` - 全文搜索 | Full text search\n\n### SQL 查询 | SQL Query\n\n* `sql.sql` - 执行 SQL 查询 | Execute SQL query\n\n### 系统功能 | System Functions\n\n* `system.getBootProgress` - 获取启动进度 | Get boot progress\n* `system.getVersion` - 获取系统版本 | Get system version\n* `system.getCurrentTime` - 获取当前时间 | Get current time\n\n### 模板功能 | Template Functions\n\n* `template.renderTemplate` - 渲染模板 | Render template\n* `template.renderSprig` - 渲染 Sprig 模板 | Render Sprig template\n\n## 使用说明 | Usage\n\n### 环境变量配置 | Environment Variables\n\n服务器需要配置以下环境变量：\nThe server requires the following environment variables:\n\n* `SIYUAN_TOKEN` - 思源笔记 API 令牌（必需）| SiYuan Note API token (required)\n  * 在思源笔记设置 - 关于 中查看 | Check in SiYuan Note Settings - About\n  * 用于 API 认证 | Used for API authentication\n\n* `SIYUAN_API_URL` - 思源笔记 API 地址（可选）| SiYuan Note API URL (optional)\n  * 默认值: `http://localhost:6806` | Default: `http://localhost:6806`\n  * 如果思源笔记运行在不同的主机或端口上，请设置此变量 | Set this variable if SiYuan Note runs on a different host or port\n\n* `MODE` - 运行模式，默认读写\n  * READ - 只读模式\n\n### 在 Claude Desktop 中使用 | Using in Claude Desktop\n\n将以下配置添加到 `claude_desktop_config.json`：\nAdd the following configuration to `claude_desktop_config.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"siyuan\": {\n      \"command\": \"npx\",\n      \"args\": [\n        \"-y\",\n        \"@onigeya/siyuan-mcp-server\"\n      ],\n      \"env\": {\n        \"SIYUAN_TOKEN\": \"your-siyuan-token\",\n        \"MODE\": \"READ\"\n      }\n    }\n  }\n}\n```\n\n### 本地运行 | Local Run\n\n1. 安装依赖 | Install dependencies:\n```bash\npnpm install\n```\n\n2. 设置环境变量 | Set environment variables:\n```bash\n# Windows\nset SIYUAN_TOKEN=your-siyuan-token\n\n# Linux/macOS\nexport SIYUAN_TOKEN=your-siyuan-token\n```\n\n3. 启动服务 | Start service:\n```bash\npnpm start\n```\n\n### Docker 运行 | Docker Run\n\n```bash\ndocker run --rm -i \\\n  -e SIYUAN_TOKEN=your-siyuan-token \\\n  -e MODE=\"READ\" \\\n  mcp/siyuan\n```\n\n## 构建 | Build\n\n### 环境要求 | Requirements\n\n* Node.js >= 23.10.0\n* pnpm\n\n### 本地构建 | Local Build\n\n```bash\npnpm build\n```\n\n### Docker 构建 | Docker Build\n\n```bash\ndocker build -t mcp/siyuan .\n```\n\n## 许可证 | License\n\n本项目基于 ISC 许可证发布。这意味着你可以自由使用、修改和分发本软件，但需要遵守 ISC 许可证的条款和条件。详细信息请参见项目仓库中的 LICENSE 文件。\n\nThis project is released under the ISC License. This means you can freely use, modify, and distribute this software, subject to the terms and conditions of the ISC License. For detailed information, please refer to the LICENSE file in the project repository.\n\n## 相关资源 | Related Resources\n\n- [思源笔记 | SiYuan Note](https://github.com/siyuan-note/siyuan)\n- [Model Context Protocol](https://modelcontextprotocol.io/)\n- [思源笔记 API 文档 | SiYuan Note API Documentation](https://github.com/siyuan-note/siyuan/blob/master/API.md)","readmeFilename":"README.md"}