Siyuan MCP Plus
Provides tools for interacting with the SiYuan Note API, including notebook, document, block, attribute, path, SQL, file, export, template, asset, and system operations.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Siyuan MCP Plus / 思源笔记 MCP 增强版
English
Overview
siyuan-mcp-plus is an enhanced MCP (Model Context Protocol) server for SiYuan Note, providing complete SiYuan API functionality with cloud support, improved error handling, and cleaner output.
Features
Complete SiYuan API Coverage - 52 tools covering notebooks, documents, blocks, SQL, files, templates, and more
Cloud Native Support - Full support for SiYuan Cloud (
your-cloud.com) and self-hosted instancesClean JSON-RPC Output - No debug logs contaminating stdout, production-ready
Structured Error Handling - Clear error messages with API codes and endpoints
Bilingual Documentation - All tool descriptions in Chinese and English
Path Normalization - Automatic
.mdsuffix handling for document pathsIcon Support - Full support for notebook emoji icons via Unicode code points
Auto Markdown Detection - Block insert/prepend/append tools automatically detect markdown content
Installation
npm install -g siyuan-mcp-plusOr use with npx:
npx siyuan-mcp-plusConfiguration
Environment Variables:
Variable | Default | Description |
|
| SiYuan API URL |
| (empty) | API Token |
For SiYuan Cloud / 思源云配置:
SIYUAN_URL=https://your-cloud.com SIYUAN_TOKEN=your_token siyuan-mcp-plusFor Local Instance / 本地实例配置:
SIYUAN_TOKEN=your_local_token siyuan-mcp-plusAPI Endpoint Notes
This server uses the official SiYuan API endpoints. Reference: SiYuan Official API.
Some common mistakes in third-party implementations are corrected here:
Category | Wrong (Common Mistake) | Correct (Official) |
Block Attributes |
|
|
Block Attributes |
|
|
Notifications |
|
|
Notifications |
|
|
Template |
|
|
Pandoc Export |
|
|
System |
|
|
File |
|
|
All other endpoints follow the official API specification exactly.
Tools Overview (52 tools)
Tool | Description |
Notebook / 笔记本管理 | |
| List all notebooks, returns notebook ID, name, icon and other information |
| Open a specified notebook to make it accessible |
| Close a specified notebook |
| Create a new notebook |
| Remove a notebook (use with caution) |
| Rename a notebook |
| Get notebook configuration (includes icon, etc.) |
| Save notebook configuration (can set icon, use Unicode code point string like "1f527") |
Document / 文档管理 | |
| Create a new document in the specified notebook with Markdown content. Path should not include .md suffix |
| Rename a document by path |
| Rename a document by its ID |
| Remove a document by path (use with caution) |
| Remove a document by ID (permanent deletion, cannot be recovered, use with caution) |
| Move documents to another notebook or folder |
| Move documents by ID to another notebook |
Block / 块级操作 | |
| Insert a block at the specified position (auto markdown detection) |
| Insert a block at the beginning of parent block (auto markdown detection) |
| Append a block at the end of parent block (auto markdown detection) |
| Update block content |
| Delete a block |
| Move a block to a new position |
| Get block kramdown source code |
| Get child blocks of a specified block |
| Fold a block |
| Unfold a block |
| Transfer block reference |
Attribute / 属性管理 | |
| Get block attributes |
| Set block attributes |
Path / 路径查询 | |
| Get human-readable path by storage path |
| Get human-readable path by ID |
| Get storage path by ID |
| Get IDs by human-readable path |
SQL / 数据库查询 | |
| Execute SQL query (read-only, recommend using SELECT statements) |
| Flush all pending transactions |
File / 文件操作 | |
| Read file content |
| Write file content |
| Remove a file (use with caution) |
| Rename a file |
| List files in a directory |
Export / 导出 | |
| Export document as Markdown text |
| Export resource files used by a document |
| Convert document format using Pandoc |
Template / 模板 | |
| Render SiYuan template |
| Render Sprig template function |
Asset / 资源 | |
| Upload asset file to SiYuan Note |
System / 系统 | |
| Get SiYuan Note version |
| Get system current time |
| Get SiYuan Note boot progress |
| Check SiYuan Note connection status and API availability |
| Get workspace and connection information |
| Push notification message |
| Push error message notification |
MCP Configuration Example
mcporter:
{
"mcpServers": {
"siyuan": {
"command": "siyuan-mcp-plus",
"env": {
"SIYUAN_URL": "https://your-cloud.com",
"SIYUAN_TOKEN": "your_token_here"
}
}
}
}OpenClaw:
{
"siyuan": {
"command": "npx",
"args": ["-y", "siyuan-mcp-plus"],
"env": {
"SIYUAN_URL": "https://your-cloud.com",
"SIYUAN_TOKEN": "your_token_here"
}
}
}Notebook Icon Format
To set notebook icons, use Unicode code point strings (not emoji characters):
Icon | Code Point |
🔧 |
|
🔑 |
|
📚 |
|
🖥 |
|
🛠 |
|
📝 |
|
📖 |
|
Development
# Install dependencies
npm install
# Build
npm run build
# Run in development mode
npm run dev
# Run in development with npx
npx tsx src/index.tsLicense
MIT
Related MCP server: SiYuan Note MCP Server
中文
概述
siyuan-mcp-plus 是思源笔记的增强版 MCP(Model Context Protocol)服务器,提供完整的思源 API 功能,支持云端、优化错误处理、干净的输出格式。
特性
**完整 API 覆盖 - 52 个工具,覆盖笔记本、文档、块、SQL、文件、模板等
云端原生支持 - 完美支持思源云(
your-cloud.com)和自托管实例干净的 JSON-RPC 输出 - 无调试日志污染 stdout,生产环境可用
结构化错误处理 - 清晰的错误信息,包含 API 状态码和端点
双语文档 - 所有工具描述均有中英文
路径规范化 - 自动处理文档路径的
.md后缀图标支持 - 支持通过 Unicode 码点设置笔记本 emoji 图标
安装
npm install -g siyuan-mcp-plus或使用 npx 直接运行:
npx siyuan-mcp-plus配置
环境变量:
变量 | 默认值 | 说明 |
|
| 思源 API 地址 |
| (空) | API 令牌 |
思源云配置:
SIYUAN_URL=https://your-cloud.com SIYUAN_TOKEN=你的令牌 siyuan-mcp-plus本地实例配置:
SIYUAN_TOKEN=你的本地令牌 siyuan-mcp-plusAPI 端点说明
本服务使用官方思源 API 端点。参考:思源官方 API 文档。
已修正第三方实现中的常见错误:
类别 | 错误(常见错误) | 正确(官方) |
块属性 |
|
|
块属性 |
|
|
通知 |
|
|
通知 |
|
|
模板 |
|
|
Pandoc 导出 |
|
|
系统 |
|
|
文件 |
|
|
其他所有端点均严格遵循官方 API 规范。
工具概览(52 个工具)
工具 | 描述 |
Notebook / 笔记本管理 | |
| 列出所有笔记本,返回笔记本 ID、名称、图标等信息 |
| 打开指定笔记本,使其可以被访问 |
| 关闭指定笔记本 |
| 创建新笔记本 |
| 删除笔记本(谨慎操作) |
| 重命名笔记本 |
| 获取笔记本配置(包含图标等) |
| 保存笔记本配置(可设置图标,图标使用 Unicode 码点字符串如 "1f527") |
Document / 文档管理 | |
| 在指定笔记本中创建新文档,支持 Markdown 内容。路径不要包含 .md 后缀 |
| 通过路径重命名文档 |
| 通过文档 ID 重命名文档 |
| 通过路径删除文档(谨慎操作) |
| 通过文档 ID 删除文档(彻底删除,无法恢复,谨慎操作) |
| 移动文档到其他笔记本或文件夹 |
| 通过 ID 移动文档到其他笔记本 |
Block / 块级操作 | |
| 在指定位置插入块(支持 markdown 自动识别) |
| 在父块内最前面插入块(支持 markdown 自动识别) |
| 在父块内最后面追加块(支持 markdown 自动识别) |
| 更新块内容 |
| 删除块 |
| 移动块到新位置 |
| 获取块的 Kramdown 源码 |
| 获取指定块的子块列表 |
| 折叠块 |
| 展开块 |
| 转移块引用 |
Attribute / 属性管理 | |
| 获取块属性 |
| 设置块属性 |
Path / 路径查询 | |
| 通过存储路径获取可读路径 |
| 通过 ID 获取可读路径 |
| 通过 ID 获取存储路径 |
| 通过可读路径获取 ID |
SQL / 数据库查询 | |
| 执行 SQL 查询(只读,建议使用 SELECT 语句) |
| 提交所有挂起的事务 |
File / 文件操作 | |
| 读取文件内容 |
| 写入文件内容 |
| 删除文件(谨慎操作) |
| 重命名文件 |
| 列出目录中的文件 |
Export / 导出 | |
| 导文档为 Markdown 文本 |
| 导出文档使用的资源文件 |
| 使用 Pandoc 转换文档格式 |
Template / 模板 | |
| 渲染思源模板 |
| 渲染 Sprig 模板函数 |
Asset / 资源 | |
| 上传资源文件到思源笔记 |
System / 系统 | |
| 获取思源笔记版本 |
| 获取系统当前时间 |
| 获取思源笔记启动进度 |
| 检查思源笔记连接状态和 API 可用性 |
| 获取工作空间和连接信息 |
| 推送通知消息 |
| 推送错误消息通知 |
Changelog
v1.0.5 (2026-04-10)
Block tools auto markdown detection:
insert_block,prepend_block,append_blocknow accept amarkdownparameter. When provided,dataTypeis automatically set to"markdown". This fixes issues when calling via mcporter CLI wheredataTypewas required but not easily passable.
v1.0.4 (2026-04-07)
Fixed 6 API endpoint errors (attr, notification, template/render, convert/pandoc, system/bootProgress, file path)
v1.0.2 (2026-03-27)
Fixed shebang in dist/index.js for global CLI usage
开发
# 安装依赖
npm install
# 构建
npm run build
# 开发模式运行
npm run dev
# 使用 npx tsx 运行
npx tsx src/index.ts许可证
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
AI access to your aNotepad online notes: read, search, write, and organize via 22 tools.
Let your assistant read, build and organize your knowledge maps: blocks, links, tables and notes.
Turn your notes, links and conversations into a Living Brain your AI tools share and build on.
Persistent memory and knowledge management for AI agents with semantic search and 50+ tools.
Related MCP Servers
- AlicenseNot gradedqualityFmaintenanceEnables interaction with SiYuan Note through its API for comprehensive note management. Supports searching, creating, editing documents, managing notebooks, and daily notes operations through natural language commands.15Apache 2.0
- AlicenseCqualityCmaintenanceEnables AI assistants to interact with SiYuan Note for comprehensive notebook management, document editing, and block-level content operations. It supports advanced features like full-text search and SQL queries via secure API integration.335 npm40ISC
- AlicenseBqualityDmaintenanceEnables AI assistants to create, read, update, and manage SiYuan notes, supporting notebook management, document operations, block editing, database attribute views, search, file operations, and export.111MIT
- AlicenseBqualityCmaintenanceEnables AI assistants to interact with SiYuan Note through its API, supporting notebook and document management, block operations, search, file operations, and more.69137 npm75MIT