productivity

SiYuan

xgq18237

by xgq18237

Integrate SiYuan with leading case note software like therapynotes com for easy note creation, editing, and organization

Integrates with SiYuan note-taking application to enable complete knowledge management operations including note creation, editing, searching, and organization through TypeScript-based API connectivity.

github stars

42

0 commentsdiscussion

Both formats append explainx.ai attribution and the canonical URL for this MCP server listing.

Works with local and remote SiYuan instancesDocker and npx deployment optionsSupports HTTPS reverse proxy setups

best for

  • / Knowledge workers using SiYuan for note-taking
  • / Automating note management workflows
  • / Integrating SiYuan with AI assistants

capabilities

  • / Create and edit SiYuan notes
  • / Search through knowledge base content
  • / Organize notes and notebooks
  • / Access SiYuan API functionality
  • / Manage note metadata and attributes

what it does

Connects to your SiYuan note-taking application to manage notes programmatically. Enables complete knowledge base operations through API integration.

about

SiYuan is a community-built MCP server published by xgq18237 that provides AI assistants with tools and capabilities via the Model Context Protocol. Integrate SiYuan with leading case note software like therapynotes com for easy note creation, editing, and organization It is categorized under productivity.

how to install

You can install SiYuan in your AI client of choice. Use the install panel on this page to get one-click setup for Cursor, Claude Desktop, VS Code, and other MCP-compatible clients. This server runs locally on your machine via the stdio transport.

license

MIT

SiYuan is released under the MIT license. This is a permissive open-source license, meaning you can freely use, modify, and distribute the software.

readme

思源笔记 MCP 服务器 / SiYuan MCP Server

<div align="center">

English | 中文

</div>

English Version

A Model Context Protocol (MCP) server for SiYuan Note, providing complete SiYuan API functionality.

🚀 Quick Start

Using npx (Recommended)

# Run directly (local SiYuan)
npx -y siyuan-mcp@latest

# Set environment variables for local access
SIYUAN_HOST=127.0.0.1 SIYUAN_PORT=6806 SIYUAN_TOKEN=your-token npx -y siyuan-mcp@latest

# For remote SiYuan behind HTTPS reverse proxy
SIYUAN_URL=https://siyuan.example.com SIYUAN_TOKEN=your-token npx -y siyuan-mcp@latest

Using Docker

# Pull image
docker pull zhizhiqq/siyuan-mcp:latest

# Run container
docker run -d \
  -e SIYUAN_HOST=127.0.0.1 \
  -e SIYUAN_PORT=6806 \
  -e SIYUAN_TOKEN=your-token \
  --name siyuan-mcp-server \
  zhizhiqq/siyuan-mcp:latest

Configure MCP Client

Cursor Configuration
  1. Open Cursor settings (Ctrl/Cmd + ,)
  2. Search for "MCP" or "Model Context Protocol"
  3. Click "Add Server" or "添加服务器"
  4. Configure server information:
{
  "mcpServers": {
    "siyuan-mcp": {
      "command": "npx",
      "args": ["-y", "siyuan-mcp@latest"],
      "env": {
        "SIYUAN_HOST": "127.0.0.1",
        "SIYUAN_PORT": "6806",
        "SIYUAN_TOKEN": "your-api-token-here"
      }
    }
  }
}
Claude Desktop Configuration
  1. Open Claude Desktop settings
  2. Go to "Model Context Protocol" settings
  3. Add new MCP server:
{
  "mcpServers": {
    "siyuan-mcp": {
      "command": "npx",
      "args": ["-y", "siyuan-mcp@latest"],
      "env": {
        "SIYUAN_HOST": "127.0.0.1",
        "SIYUAN_PORT": "6806",
        "SIYUAN_TOKEN": "your-api-token-here"
      }
    }
  }
}
Remote Access via HTTPS (Reverse Proxy)

If your SiYuan instance is behind a reverse proxy (e.g., Traefik, nginx) with HTTPS:

{
  "mcpServers": {
    "siyuan-mcp": {
      "command": "npx",
      "args": ["-y", "siyuan-mcp@latest"],
      "env": {
        "SIYUAN_URL": "https://siyuan.example.com",
        "SIYUAN_TOKEN": "your-api-token-here"
      }
    }
  }
}
Docker Configuration

If you use Docker to run the service, you can configure the client to connect to the Docker container:

Cursor Docker Configuration

{
  "mcpServers": {
    "siyuan-mcp": {
      "command": "docker",
      "args": ["run", "--rm", "-e", "SIYUAN_HOST=127.0.0.1", "-e", "SIYUAN_PORT=6806", "-e", "SIYUAN_TOKEN=your-api-token-here", "zhizhiqq/siyuan-mcp:latest"],
      "env": {}
    }
  }
}

Claude Desktop Docker Configuration

{
  "mcpServers": {
    "siyuan-mcp": {
      "command": "docker",
      "args": ["run", "--rm", "-e", "SIYUAN_HOST=127.0.0.1", "-e", "SIYUAN_PORT=6806", "-e", "SIYUAN_TOKEN=your-api-token-here", "zhizhiqq/siyuan-mcp:latest"],
      "env": {}
    }
  }
}

Note: When using Docker configuration, ensure Docker is installed and running.

🔧 Environment Variables

VariableDescriptionDefaultRequired
SIYUAN_URLFull URL for SiYuan (e.g., https://siyuan.example.com). If set, overrides HOST/PORT.-No
SIYUAN_HOSTSiYuan server address127.0.0.1No
SIYUAN_PORTSiYuan server port6806No
SIYUAN_TOKENAPI token-Yes

Note: Use SIYUAN_URL when connecting to a SiYuan instance behind an HTTPS reverse proxy. When SIYUAN_URL is set, SIYUAN_HOST and SIYUAN_PORT are ignored.

📋 Common Issues

Q: What if the connection fails?

A: Please check the following steps:

  1. Ensure SiYuan Note is running
  2. Check if the API token is correct
  3. Confirm there are open notebooks in SiYuan Note
  4. Restart SiYuan Note and Cursor

Q: How to get the correct API token?

A:

  1. Open SiYuan Note
  2. Go to SettingsAboutAPI Token
  3. Click Generate Token or copy existing token
  4. Ensure the token format is correct (usually a string of alphanumeric characters)

Q: Why use -y parameter with npx?

A: The -y parameter automatically confirms package installation without prompting for user input, which is essential for MCP client configurations where interactive prompts would cause connection failures.

Q: How to connect to SiYuan behind a reverse proxy with HTTPS?

A: Use the SIYUAN_URL environment variable instead of SIYUAN_HOST and SIYUAN_PORT:

SIYUAN_URL=https://siyuan.example.com SIYUAN_TOKEN=your-token npx -y siyuan-mcp@latest

🎯 Features

📚 Notebook Management

Notebooks are the basic organizational units of SiYuan Note, each containing multiple documents.

  • list_notebooks - List all notebooks, get notebook IDs and names
  • open_notebook - Open specified notebook, activate workspace
  • close_notebook - Close specified notebook, release resources
  • rename_notebook - Rename notebook, update display name
  • create_notebook - Create new notebook, support custom names
  • remove_notebook - Delete notebook, clean related data
  • get_notebook_conf - Get notebook configuration information
  • set_notebook_conf - Save notebook configuration, custom settings

📄 Document Management

Documents are specific content units in notebooks, supporting hierarchical structure and path management.

  • create_doc - Create new document in specified notebook, support Markdown content
  • rename_doc - Rename document, keep content unchanged
  • rename_doc_by_id - Rename by document ID, precise operation
  • remove_doc - Delete document, clean file system
  • remove_doc_by_id - Delete by document ID, precise operation
  • move_docs - Move documents to other locations or notebooks
  • move_docs_by_id - Move by document ID, precise operation
  • get_hpath_by_path - Get human-readable path by path
  • get_hpath_by_id - Get human-readable path by ID
  • get_path_by_id - Get storage path by ID
  • get_ids_by_hpath - Get IDs by human-readable path

🧩 Block Operations

Blocks are the smallest content units in SiYuan Note, supporting flexible editing, reorganization, and referencing.

  • insert_block - Insert block, support specified position and data type
  • prepend_block - Insert prepend child block, add content at parent block beginning
  • append_block - Insert append child block, add content at parent block end
  • update_block - Update block content, support Markdown and DOM formats
  • delete_block - Delete block, clean related references
  • move_block - Move block to new position, support hierarchical adjustment
  • get_block_kramdown - Get block kramdown source code, for export
  • get_child_blocks - Get child block list, traverse block structure
  • fold_block - Fold block, hide child content
  • unfold_block - Unfold block, show child content
  • transfer_block_ref - Transfer block reference, maintain reference relationships

🏷️ Attribute Operations

Block attributes are used to store metadata and custom information, supporting key-value pair storage.

  • set_block_attrs - Set block attributes, support custom key-value pairs
  • get_block_attrs - Get block attributes, read metadata information

🔍 Search and Query

Get data from SiYuan Note through SQL queries, supporting complex query conditions.

  • sql_query - Execute SQL queries, support all SQLite syntax
  • flush_transaction - Commit transactions, ensure data persistence

📁 File Operations

Manage files and directories in SiYuan Note workspace, support resource management.

  • get_file - Get file content, read file data
  • remove_file - Delete file, clean storage space
  • rename_file - Rename file, update file path
  • read_dir - List directory content, browse file structure
  • put_file - Write file, create or update file content

📤 Export Functions

Export SiYuan Note content to various formats, support backup and sharing.

  • export_md_content - Export Markdown text, maintain format
  • export_resources - Export files and directories, include resource files

📢 Notification Functions

Push messages and error prompts to users, provide operation feedback.

  • push_msg - Push messages, display success prompts
  • push_err_msg - Push error messages, display error information

💻 System Information

Get SiYuan Note system status and runtime information, monitor system health.

  • get_version - Get SiYuan Note version information
  • get_current_time - Get system current time
  • get_boot_progress - Get boot progress, monitor boot status
  • check_siyuan_status - Check SiYuan Note status and API availability
  • get_workspace_info - Get workspace and connection information

🎨 Template Functions

Use template system to create dynamic content, support variable substitution.

  • render_template - Render template files, support external templates
  • render_sprig - Render Sprig templates, support inline template syntax

🔄 Conversion Functions

Use Pandoc for document format conversion, support multiple output formats.

  • pandoc_convert - Pandoc conversion, support multiple document formats

📎 Resource Files

Manage resource files in SiYuan Note, support batch upload.

  • upload_asset - Upload resource files, support batch operations

🔧 Core Features

🚀 High Performance

  • Asynchronous Processing: All API calls use asynchronous processing for faster response
  • Batch Operations: Support batch document movement and block operations for improved efficiency
  • Transaction Management: Built-in transaction mechanism ensures data consistency

🛡️ Secure and Reliable

  • Authentication: Support API token authentication to protect data security
  • Error Handling: Comprehensive error handling mechanism provides detailed error information
  • **Pa

FAQ

What is the SiYuan MCP server?
SiYuan is a Model Context Protocol (MCP) server profile on explainx.ai. MCP lets AI hosts (e.g. Claude Desktop, Cursor) call tools and resources through a standard interface; this page summarizes categories, install hints, and community ratings.
How do MCP servers relate to agent skills?
Skills are reusable instruction packages (often SKILL.md); MCP servers expose live capabilities. Teams frequently combine both—skills for workflows, MCP for APIs and data. See explainx.ai/skills and explainx.ai/mcp-servers for parallel directories.
How are reviews shown for SiYuan?
This profile displays 39 aggregated ratings (sample rows for discoverability plus signed-in user reviews). Average score is about 4.7 out of 5—verify behavior in your own environment before production use.

Use Cases

Extended AI Capabilities

Add new capabilities to Claude beyond text generation

Example

Access external data sources, execute code, interact with tools and services

Transform Claude from chatbot to action-taking agent

Context Enhancement

Provide Claude with access to relevant context and data

Example

Load project documentation, access knowledge bases, query databases

Get more accurate, context-aware responses

Workflow Automation

Automate multi-step workflows combining AI and external tools

Example

Research → Summarize → Create document → Send notification

Complete complex tasks end-to-end without manual steps

Implementation Guide

Prerequisites

  • Claude Desktop 0.7.0+ or Cursor IDE with MCP support
  • Basic understanding of MCP architecture and capabilities
  • Access credentials for integrated services (if required)
  • Willingness to experiment and iterate on configuration

Time Estimate

15-60 minutes depending on server complexity

Installation Steps

  1. 1.Install MCP server: npm install -g [package-name] or via GitHub
  2. 2.Add server configuration to ~/.claude/mcp.json
  3. 3.Provide required credentials and configuration
  4. 4.Restart Claude Desktop to load new server
  5. 5.Test basic functionality with simple prompts
  6. 6.Explore capabilities and experiment with use cases
  7. 7.Document successful patterns for reuse

Troubleshooting

  • MCP server not loading: Check config syntax, verify installation
  • Connection errors: Check network, firewall, credentials
  • Feature not working: Read server docs, check required parameters
  • Performance issues: Monitor resource usage, check for network latency
  • Conflicts with other servers: Check port assignments, namespace collisions

Best Practices

✓ Do

  • +Read server documentation thoroughly before setup
  • +Start with simple use cases to validate functionality
  • +Test in non-production environment first
  • +Monitor resource usage and performance
  • +Keep servers updated for bug fixes and new features
  • +Document configuration for team members
  • +Use environment variables for sensitive configuration

✗ Don't

  • Don't grant overly permissive access to MCP servers
  • Don't skip reading security considerations in docs
  • Don't expose sensitive data without proper controls
  • Don't run untrusted MCP servers without code review
  • Don't ignore error messages—investigate root cause

💡 Pro Tips

  • Combine multiple MCP servers for powerful workflows
  • Create custom MCP servers for your specific needs
  • Share successful configurations with team
  • Use MCP inspector for debugging
  • Join MCP community for tips and troubleshooting

Technical Details

Architecture

Model Context Protocol standardizes how AI hosts (Claude, Cursor) communicate with external tools and data sources through server implementations.

Protocols

  • Model Context Protocol (MCP)
  • JSON-RPC 2.0
  • stdio or HTTP transport

Compatibility

  • Claude Desktop
  • Cursor IDE
  • Custom MCP clients

When to Use This

✓ Use When

Use when you need Claude to access external data, execute actions, or integrate with tools. Best for extending AI capabilities beyond conversation.

✗ Avoid When

Avoid when native integrations exist (use official APIs directly), for real-time critical systems, or when security/compliance requires zero external dependencies.

Integration

  • Tool composition: Chain multiple MCP tools in workflows
  • Context augmentation: Provide AI with relevant external data
  • Action delegation: Let AI execute tasks on external systems
  • Bidirectional sync: Keep AI context and external systems in sync

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.

List & Promote Your MCP Server

Share your MCP server with the developer community

GET_STARTED →
MCP server reviews

Ratings

4.739 reviews
  • Layla Martin· Dec 28, 2024

    Strong directory entry: SiYuan surfaces stars and publisher context so we could sanity-check maintenance before adopting.

  • Shikha Mishra· Dec 4, 2024

    I recommend SiYuan for teams standardizing on MCP; the explainx.ai page compares cleanly with sibling servers.

  • Kaira Reddy· Dec 4, 2024

    SiYuan has been reliable for tool-calling workflows; the MCP profile page is a good permalink for internal docs.

  • Emma Chen· Dec 4, 2024

    We evaluated SiYuan against two servers with overlapping tools; this profile had the clearer scope statement.

  • Rahul Santra· Nov 23, 2024

    According to our notes, SiYuan benefits from clear Model Context Protocol framing — fewer ambiguous “AI plugin” claims.

  • Layla Jackson· Nov 23, 2024

    SiYuan is among the better-indexed MCP projects we tried; the explainx.ai summary tracks the official description.

  • Arya Ghosh· Nov 19, 2024

    We wired SiYuan into a staging workspace; the listing’s GitHub and npm pointers saved time versus hunting across READMEs.

  • Pratham Ware· Oct 14, 2024

    SiYuan is among the better-indexed MCP projects we tried; the explainx.ai summary tracks the official description.

  • Kiara Huang· Oct 14, 2024

    According to our notes, SiYuan benefits from clear Model Context Protocol framing — fewer ambiguous “AI plugin” claims.

  • Arya Bhatia· Oct 10, 2024

    SiYuan reduced integration guesswork — categories and install configs on the listing matched the upstream repo.

showing 1-10 of 39

1 / 4