Skip to content

Deployment

This page covers installation, connection modes, and environment-specific setup.

When to read this page: you need to connect an MCP client or configure the plugin for local, WSL, Docker, or LAN usage.

Related pages:

Installation

Marketplace

  1. Open SiYuan Note
  2. Go to Settings -> Marketplace
  3. Search for SiYuan Sisyphus
  4. Install and enable the plugin

From Source

bash
git clone https://github.com/yangtaihong59/siyuan-plugins-mcp-sisyphus.git
cd siyuan-plugins-mcp-sisyphus
pnpm install
pnpm build
pnpm make-link

Connection Modes

ScenarioRecommended ModeWhy
Desktop local machineHTTP or stdioBoth are supported directly
Docker / remote SiYuanstdioPlugin-side HTTP server is not the best fit
WSL / cross-machineHTTPEasier cross-environment connectivity
stdio-only MCP clientmcp-remote bridgeReuses the HTTP endpoint

HTTP Mode

Plugin-side settings:

  • Host: 127.0.0.1 by default, 0.0.0.0 for remote access
  • Port: 36806
  • Keep bearer token enabled
  • Start the server and optionally enable auto-start

Client config (Claude Code, Cursor, Cline, etc.):

json
{
  "mcpServers": {
    "siyuan": {
      "type": "http",
      "url": "http://127.0.0.1:36806/mcp",
      "headers": { "Authorization": "Bearer <token>" }
    }
  }
}

Cherry Studio uses streamableHttp:

json
{
  "mcpServers": {
    "siyuan": {
      "type": "streamableHttp",
      "url": "http://127.0.0.1:36806/mcp",
      "headers": {
        "Content-Type": "application/json",
        "Authorization": "Bearer <token>"
      }
    }
  }
}

Notes:

  • Claude Code requires "type": "http"
  • Cherry Studio requires "type": "streamableHttp"
  • When binding to 0.0.0.0, keep token auth enabled

stdio Mode

Use mcp-server.cjs as a subprocess and point it at the SiYuan API.

json
{
  "mcpServers": {
    "siyuan": {
      "command": "node",
      "args": ["/path/to/mcp-server.cjs"],
      "env": {
        "SIYUAN_API_URL": "http://127.0.0.1:6806",
        "SIYUAN_TOKEN": "xxxxxx"
      }
    }
  }
}

Notes:

  • 6806 is the SiYuan API port, not the MCP port
  • mcp-server.cjs is usually under {workspace}/data/plugins/siyuan-plugins-mcp-sisyphus/
  • stdio serves one client process at a time

mcp-remote Bridge

Use this when your client supports stdio only:

json
{
  "mcpServers": {
    "siyuan": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "http://127.0.0.1:36806/mcp",
        "--header",
        "Authorization: Bearer <token>"
      ]
    }
  }
}

Environment Variables

Core:

VariableDefaultPurpose
SIYUAN_API_URLhttp://127.0.0.1:6806SiYuan API endpoint
SIYUAN_TOKENnoneSiYuan API token
SIYUAN_MCP_TRANSPORTstdioTransport mode

HTTP mode:

VariableDefaultPurpose
SIYUAN_MCP_HOST127.0.0.1Bind host
SIYUAN_MCP_PORT36806Bind port
SIYUAN_MCP_TOKENnoneBearer token
SIYUAN_MCP_PATH/mcpHTTP endpoint path

Deployment Scenarios

Docker

  • Expose SiYuan port 6806
  • Run mcp-server.cjs on the client side
  • Keep the SiYuan API token enabled
  • Do not expose 6806 publicly without extra protection

WSL

  • Bind plugin HTTP server to 0.0.0.0
  • Use the Windows host IP from WSL
  • Keep bearer token enabled

LAN

  • Bind to 0.0.0.0
  • Open firewall access for 36806
  • Use the host machine LAN IP
  • Keep bearer token enabled

Released under the MIT License.