SiYuan Note MCP Server
The SiYuan Note MCP Server provides an interface for AI models to interact with the SiYuan Note system with the following capabilities:
Notebook Management: Create, open, close, rename, and delete notebooks
Document Operations: Create, rename, move, and delete documents, manage content
Block Control: Insert, update, move, and delete content blocks, retrieve Kramdown content
File and Asset Management: Upload, read, write, and remove files and assets
Query Capabilities: Execute SQL queries and perform full-text searches
Attribute Management: Set and get block attributes
Export and Conversion: Export notebooks/documents and convert content using Pandoc
System Functions: Send notifications, get system version, boot progress, and current time
Command Discovery: List available commands by type/namespace and get command help
Provides full integration with SiYuan Note system, enabling access to notebook management, document operations, block control, file and asset management, SQL queries, attribute management, export and conversion features, and system functions.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@SiYuan Note MCP Servercreate a new note titled 'Meeting Notes' with today's date"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
SiYuan Note MCP Server
一个 MCP 服务器实现,提供与思源笔记系统的集成,使 AI 模型能够访问和操作笔记数据。
An MCP server implementation that provides integration with the SiYuan Note system, enabling AI models to access and manipulate note data.
功能特性 | Features
笔记本管理 | Notebook Management
文档操作 | Document Operations
内容块控制 | Block Control
文件和资源管理 | File and Asset Management
SQL 查询支持 | SQL Query Support
属性管理 | Attribute Management
导出和转换 | Export and Conversion
系统功能 | System Functions
Related MCP server: MCP Notes Server
命令列表 | Command List
所有命令都支持使用 help 查询获取详细说明。例如:
All commands support detailed documentation via the help command. For example:
{
"type": "help",
"params": {
"type": "block.insertBlock"
}
}资源管理 | Asset Management
assets.uploadAssets- 上传资源文件 | Upload assets
属性管理 | Attribute Management
attr.setBlockAttrs- 设置块属性 | Set block attributesattr.getBlockAttrs- 获取块属性 | Get block attributes
内容块操作 | Block Operations
block.insertBlock- 插入内容块 | Insert a blockblock.updateBlock- 更新内容块 | Update block contentblock.deleteBlock- 删除内容块 | Delete a blockblock.moveBlock- 移动内容块 | Move a blockblock.getBlockKramdown- 获取块的 Markdown 内容 | Get block Kramdown content
格式转换 | Format Conversion
convert.pandoc- 使用 Pandoc 转换内容 | Convert content using Pandoc
导出功能 | Export Functions
export.exportNotebook- 导出笔记本 | Export notebookexport.exportDoc- 导出文档 | Export document
文件操作 | File Operations
file.getFile- 获取文件内容 | Get file contentfile.putFile- 写入文件内容 | Put file contentfile.removeFile- 删除文件 | Remove filefile.readDir- 读取目录内容 | List files in directory
文档树操作 | File Tree Operations
filetree.createDocWithMd- 使用 Markdown 创建文档 | Create document with Markdownfiletree.renameDoc- 重命名文档 | Rename documentfiletree.removeDoc- 删除文档 | Remove documentfiletree.moveDocs- 移动文档 | Move documentsfiletree.getHPathByPath- 获取文档可读路径 | Get document HPath by pathfiletree.getHPathByID- 通过 ID 获取文档可读路径 | Get document HPath by ID
网络代理 | Network Proxy
network.forwardProxy- 网络请求代理 | Forward proxy request
笔记本管理 | Notebook Management
notebook.lsNotebooks- 列出所有笔记本 | List all notebooksnotebook.openNotebook- 打开笔记本 | Open notebooknotebook.closeNotebook- 关闭笔记本 | Close notebooknotebook.renameNotebook- 重命名笔记本 | Rename notebooknotebook.createNotebook- 创建笔记本 | Create notebooknotebook.removeNotebook- 删除笔记本 | Remove notebooknotebook.getNotebookConf- 获取笔记本配置 | Get notebook configurationnotebook.setNotebookConf- 设置笔记本配置 | Set notebook configuration
通知提醒 | Notifications
notification.pushMsg- 发送消息通知 | Push message notificationnotification.pushErrMsg- 发送错误通知 | Push error message notification
查询功能 | Query Functions
query.sql- 执行 SQL 查询 | Execute SQL queryquery.block- 通过 ID 查询块 | Query block by ID
搜索功能 | Search Functions
search.fullTextSearch- 全文搜索 | Full text search
SQL 查询 | SQL Query
sql.sql- 执行 SQL 查询 | Execute SQL query
系统功能 | System Functions
system.getBootProgress- 获取启动进度 | Get boot progresssystem.getVersion- 获取系统版本 | Get system versionsystem.getCurrentTime- 获取当前时间 | Get current time
模板功能 | Template Functions
template.renderTemplate- 渲染模板 | Render templatetemplate.renderSprig- 渲染 Sprig 模板 | Render Sprig template
使用说明 | Usage
环境变量配置 | Environment Variables
服务器需要配置以下环境变量: The server requires the following environment variables:
SIYUAN_TOKEN- 思源笔记 API 令牌(必需)| SiYuan Note API token (required)在思源笔记设置 - 关于 中查看 | Check in SiYuan Note Settings - About
用于 API 认证 | Used for API authentication
在 Claude Desktop 中使用 | Using in Claude Desktop
将以下配置添加到 claude_desktop_config.json:
Add the following configuration to claude_desktop_config.json:
{
"mcpServers": {
"siyuan": {
"command": "npx",
"args": [
"-y",
"@onigeya/siyuan-mcp-server"
],
"env": {
"SIYUAN_TOKEN": "your-siyuan-token"
}
}
}
}本地运行 | Local Run
安装依赖 | Install dependencies:
pnpm install设置环境变量 | Set environment variables:
# Windows
set SIYUAN_TOKEN=your-siyuan-token
# Linux/macOS
export SIYUAN_TOKEN=your-siyuan-token启动服务 | Start service:
pnpm startDocker 运行 | Docker Run
docker run --rm -i \
-e SIYUAN_TOKEN=your-siyuan-token \
mcp/siyuan构建 | Build
环境要求 | Requirements
Node.js >= 23.10.0
pnpm
本地构建 | Local Build
pnpm buildDocker 构建 | Docker Build
docker build -t mcp/siyuan .许可证 | License
本项目基于 ISC 许可证发布。这意味着你可以自由使用、修改和分发本软件,但需要遵守 ISC 许可证的条款和条件。详细信息请参见项目仓库中的 LICENSE 文件。
This 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.
相关资源 | Related Resources
Available Tools
3 toolsexecuteCommandC
执行指定的命令
| Name | Required | Description | Default |
|---|---|---|---|
| params | No | 命令参数 | |
| type | Yes | 命令类型 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. '执行指定的命令' (Execute the specified command) implies a potentially destructive or mutating operation, but provides zero information about permissions required, side effects, safety considerations, rate limits, or what happens upon execution. This leaves the agent completely in the dark about critical behavioral traits.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise - a single phrase in Chinese. While this represents severe under-specification rather than ideal conciseness, according to the scoring framework, conciseness is evaluated separately from completeness. The description contains zero wasted words and is front-loaded with its limited information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity of a command execution tool with no annotations, no output schema, and a description that provides almost no useful information, this description is completely inadequate. The agent cannot understand what commands are available, what they do, what permissions are required, what happens upon execution, or how to interpret results. This represents a critical failure in contextual completeness for a potentially powerful/destructive tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema description coverage is 100%, with both parameters ('type' and 'params') having descriptions in the schema. The tool description adds no additional meaning about parameters beyond what the schema already provides. According to scoring rules, when schema coverage is high (>80%), the baseline is 3 even with no parameter information in the description.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description '执行指定的命令' (Execute the specified command) is a tautology that essentially restates the tool name 'executeCommand' in Chinese. It provides no specific information about what kind of commands are executed, what resources are affected, or how this differs from sibling tools like 'queryCommands'. The purpose remains vague and indistinguishable from alternatives.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides absolutely no guidance on when to use this tool versus alternatives like 'queryCommands' or 'help'. There is no mention of appropriate contexts, prerequisites, or exclusions. The agent receives no help in determining when this tool is the correct choice among available options.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
helpC
获取命令的帮助信息
| Name | Required | Description | Default |
|---|---|---|---|
| type | Yes | 命令类型 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. The description only states what the tool does ('get help information') without adding context on behavioral traits such as whether it's read-only, if it requires specific permissions, what the output format might be, or any rate limits. It's minimal and doesn't compensate for the lack of annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence ('获取命令的帮助信息'), which is appropriately sized and front-loaded. It's concise with no wasted words, though it could be more informative. The structure is clear but minimal, earning a high score for efficiency.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity (a help tool with one parameter) and lack of annotations or output schema, the description is incomplete. It doesn't explain what 'help information' includes, how it relates to sibling tools, or what the tool returns. For a tool with no structured output and minimal behavioral context, it should provide more guidance to be fully helpful.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% description coverage, with the parameter 'type' described as '命令类型' (command type). The description adds no meaning beyond this, as it doesn't explain what 'type' entails or provide examples. With high schema coverage, the baseline is 3, and the description doesn't enhance or detract from the schema's information.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description '获取命令的帮助信息' translates to 'Get help information for commands,' which states a purpose but is vague. It specifies a verb ('获取' - get) and resource ('帮助信息' - help information), but doesn't clarify what 'commands' refer to or how this differs from siblings like 'executeCommand' or 'queryCommands.' It's not tautological, but lacks specificity for sibling differentiation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. There are sibling tools like 'executeCommand' and 'queryCommands,' but the description doesn't mention them or suggest contexts for usage (e.g., when you need help vs. executing a command). It's a basic statement of function with no exclusions or alternatives implied.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
queryCommandsC
查询可用的命令列表
| Name | Required | Description | Default |
|---|---|---|---|
| namespace | No | 命令命名空间过滤 | |
| type | No | 命令名称过滤 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. The description only states what the tool does ('查询可用的命令列表') without revealing any behavioral traits such as whether this is a read-only operation, what format the output returns, whether there are rate limits, authentication requirements, or error conditions. For a tool with no annotation coverage, this is a significant gap.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise - a single phrase '查询可用的命令列表' that directly states the tool's purpose with zero wasted words. It's appropriately sized for a simple query tool and front-loaded with the essential information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given that there are no annotations and no output schema, the description is incomplete. While the tool appears to be a simple read operation (querying available commands), the description doesn't explain what the return format looks like, whether results are filtered/paginated, or any other behavioral aspects. For a tool with 2 parameters and no structured output documentation, the description should provide more context about what users can expect.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% description coverage (both parameters 'namespace' and 'type' are documented in the schema as '命令命名空间过滤' and '命令名称过滤' respectively). The tool description adds no parameter information beyond what the schema already provides. According to the rules, when schema_description_coverage is high (>80%), the baseline is 3 even with no param info in the description.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description '查询可用的命令列表' (Query available command list) clearly states the tool's purpose with a specific verb ('查询' - query) and resource ('可用的命令列表' - available command list). It distinguishes from the sibling 'executeCommand' (which executes commands rather than listing them) and 'help' (which likely provides documentation rather than listing). However, it doesn't explicitly differentiate from 'help' which might overlap in functionality.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. It doesn't mention when to use 'queryCommands' versus 'executeCommand' or 'help', nor does it specify any prerequisites or contexts where this tool is particularly appropriate. The user must infer usage from the tool name alone.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
3 tool updates
v1.0.0- First observed
executeCommand - First observed
help - First observed
queryCommands
TDQS
The three tools have clearly distinct purposes: executeCommand performs actions, help provides documentation, and queryCommands lists available commands. There is no overlap in functionality, making it easy for an agent to select the correct tool for each task.
The tool names follow a consistent verb_noun pattern (executeCommand, queryCommands) with one minor deviation (help is a noun-only name). This small inconsistency does not significantly impact readability or predictability, as the naming is still clear and logical.
With only 3 tools, the server feels thin for a note-taking domain, as it lacks operations for creating, reading, updating, or deleting notes directly. While the tools provide a command-based interface, the count is borderline low for the apparent scope of managing notes in SiYuan.
The tool surface is significantly incomplete for a note-taking server. There are no tools for core CRUD operations on notes (e.g., create_note, get_note, update_note, delete_note), which are essential for agent workflows. The current tools only support command execution and help, leaving major gaps in functionality.
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Markdown-based note-taking with a hosted MCP server. Your notes serve you and your AI.
MCP server for AI dialogue using various LLM models via AceDataCloud
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Google Keep-style notes app with an MCP server for AI agents to read/write notes.
Related MCP Servers
- AlicenseAqualityDmaintenanceA simple note-taking MCP server for recording and managing notes with AI models.42236GPL 2.0
- AlicenseBqualityDmaintenanceAn MCP server for managing and persisting notes, offering CRUD operations, note summarization, and resource-based access via a note:// URI scheme.47MIT
- FlicenseNot gradedqualityDmaintenanceA simple note-taking MCP server that allows storing and summarizing notes with custom URI schemes and provides functionality to add notes and generate summaries with different detail levels.5-
- FlicenseCqualityDmaintenanceA simple MCP server implementing a note storage system with one tool to add notes and one prompt to summarize stored notes.42-
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/onigeya/siyuan-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server