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.
You can install the MCP server plugin in one of two ways:
Download directly from the SiYuan marketplace (recommended)
Manual installation:
package.zip
from the Releases sectionworkspace/data/plugins/
directorysyplugin-anMCPServer
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.
The MCP server provides the following capabilities:
Search Functions:
Retrieve Functions:
Write Functions:
Different MCP clients require different configuration methods. This guide covers the most common scenarios.
Using Cherry Studio as an example:
Without Authorization:
streamablehttp
)http://127.0.0.1:16806/mcp
With Authorization Token:
streamablehttp
)http://127.0.0.1:16806/mcp
Authorization=Bearer yourTokenHere
If your MCP client only supports stdio communication, you'll need a conversion method:
Install Node.js from nodejs.org
Install the required package:
npm install -g mcp-remote@next
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:
AUTH_HEADER
Bearer yourTokenHere
You can find a list of compatible MCP clients at:
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.
The connection count shown in the plugin represents active SSE connections. Due to clients not disconnecting properly, this count may fluctuate.
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.
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.
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.
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": []
}
}
}
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.
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.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.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