SiYuan Note-Taking MCP server

Integrates with SiYuan note-taking application to enable reading, writing, searching, and querying functionality directly within your knowledge management workflows.
Back to servers
Setup instructions
Provider
OpaqueGlass
Release date
May 05, 2025
Language
TypeScript
Stats
9 stars

This plugin provides a Model Context Protocol (MCP) server for SiYuan Note, allowing you to leverage MCP clients to interact with your SiYuan knowledge base through a standardized interface.

Getting Started

Installation

You can install the MCP server plugin in one of two ways:

  1. Download directly from the SiYuan marketplace (recommended)

  2. Manual installation:

    • Download the package.zip from the Releases section
    • Extract the contents to your workspace/data/plugins/ directory
    • Rename the folder to syplugin-anMCPServer
    • Enable the plugin in SiYuan settings

Once enabled, the plugin listens on 127.0.0.1:16806 by default. Use http://127.0.0.1:16806/sse as the server access address in your MCP clients.

Supported Features

The MCP server provides the following capabilities:

Search Functions:

  • Keyword search
  • SQL search

Retrieve Functions:

  • Fetch document content (kramdown format) by ID
  • List available notebooks
  • Get back links to a document

Write Functions:

  • Append content to your daily diary
  • Append content to a specific document (by ID)
  • Create new notes under a specified parent

Configuring MCP Clients

Different MCP clients require different configuration methods. This guide covers the most common scenarios.

For Clients Supporting Streamable HTTP

Using Cherry Studio as an example:

Without Authorization:

  • Type: Select Streamable HTTP (streamablehttp)
  • URL: http://127.0.0.1:16806/mcp
  • Headers: Leave empty

With Authorization Token:

  • Type: Select Streamable HTTP (streamablehttp)
  • URL: http://127.0.0.1:16806/mcp
  • Headers: Authorization=Bearer yourTokenHere

For Clients Supporting Only Stdio

If your MCP client only supports stdio communication, you'll need a conversion method:

  1. Install Node.js from nodejs.org

  2. Install the required package:

    npm install -g mcp-remote@next
    
  3. For 5ire or similar clients:

    Without Authorization:

    npx mcp-remote@next http://127.0.0.1:16806/mcp
    

    With Authorization Token:

    npx mcp-remote@next http://127.0.0.1:16806/mcp --header Authorization:${AUTH_HEADER}
    

    Set the environment variable:

    • Name: AUTH_HEADER
    • Value: Bearer yourTokenHere

Frequently Asked Questions

Common MCP Clients

You can find a list of compatible MCP clients at:

Authentication

Version 0.2.0 and later support authentication. After setting your authentication token in the plugin settings, configure your MCP client to include the Authorization: Bearer yourTokenHere header.

Connection Count

The connection count shown in the plugin represents active SSE connections. Due to clients not disconnecting properly, this count may fluctuate.

Docker Support

This plugin does not support running in Docker environments as it requires a Node.js environment. For SiYuan deployments in Docker, consider using alternative MCP implementations.

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "syplugin-anmcpserver" '{"type":"streamablehttp","url":"http://127.0.0.1:16806/mcp","headers":[]}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "syplugin-anmcpserver": {
            "type": "streamablehttp",
            "url": "http://127.0.0.1:16806/mcp",
            "headers": []
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "syplugin-anmcpserver": {
            "type": "streamablehttp",
            "url": "http://127.0.0.1:16806/mcp",
            "headers": []
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later