← Back to SiYuan Note

Install SiYuan Note

Pick your client, copy the command, done.

1

Add it to Claude Code

claude mcp add -e "SIYUAN_TOKEN=${SIYUAN_TOKEN}" siyuan-note -- npx -y @fromsko/siyuan-mcp-server
Required:SIYUAN_TOKEN

Environment Variables

Set these before running SiYuan Note.

VariableDescriptionRequired
SIYUAN_TOKENSiYuan Note API token for authenticationYes

Available Tools (6)

Once configured, SiYuan Note gives your AI agent access to:

notebook.*Manage notebooks including creation, deletion, and renaming.
name
filetree.*Perform document operations such as creating, editing, and deleting files.
notebookpathmarkdown
block.*Execute block-level operations including inserting, updating, and deleting content blocks.
blockIddata
search.*Perform full-text searches and SQL queries.
querymethod
template.*Create and render templates.
templateId
sql.*Execute complex database queries.
sql

Try It Out

After setup, try these prompts with your AI agent:

Create a new notebook named 'AI Research' in my SiYuan Note.
Search for all notes containing 'machine learning' and summarize the findings.
Create a new document in the 'Daily' notebook with the title 'Meeting Notes' and add a summary of today's tasks.
Run a SQL query to find all blocks tagged with #todo.
Prerequisites & system requirements
  • An MCP-compatible client (Claude Code, Cursor, Windsurf, Claude Desktop, or Codex)
  • Node.js 18+ with npm/npx installed
  • Docker installed and running
  • SIYUAN_TOKEN — SiYuan Note API token for authentication
Alternative installation methods

pnpm

pnpm add -g @fromsko/siyuan-mcp-server

npx

npx @fromsko/siyuan-mcp-server

Docker

docker pull fromsko/siyuan-mcp-server

Keep this setup from going cold

Save the docs, env vars, and workflow around SiYuan Note in Conare so Claude Code, Codex, and Cursor remember it next time.

Remember this setup