Introduction

The core idea of DeepSeek Harness (DSH) is “everything is a plugin”. SiYuan Notes provides an official MCP endpoint, but a bridge is needed between the DSH client and the SiYuan endpoint. The plugin exists as both a Codex bridge and a DSH plugin: it connects to the local SiYuan MCP endpoint, registers official tools as mcp__siyuan__*, and adds the siyuan skill and ai tool group.

Installation and Enablement

The plugin can be installed through the DSH desktop client or the command line.

  1. Desktop
    Search for siyuan-codex-bridge (categorized as Memory) in the DSH plugin market and install it.

  2. Command line
    Install from the GitHub source or the npm source:

   dsh plugin --profile web add github:greyoak111/siyuan-codex-bridge

Or use the npm source (prebuilt):

   dsh plugin --profile web add dsh-siyuan-notes

Configuration and Permissions

After installation, configure it in ~/.config/dsh-siyuan/config.json.

  1. Launch control
    By default, DSH does not automatically start the SiYuan app. If you want SiYuan to be launched automatically when invoked, add the following configuration:
   {
     "launchOnCall": true
   }

The default launch command is /Applications/SiYuan.app/Contents/MacOS/SiYuan. It can be customized via the environment variables SIYUAN_APP or SIYUAN_LAUNCH_COMMAND.

  1. Operation levels
    The plugin supports three operation levels. Each level is revalidated on every tools/call, so no restart is required.
    - readonly: search and read only (documents, blocks, outlines, backlinks, etc.).
    - authoring (default): allows creating, inserting, and updating blocks, and setting properties, on top of read-only access.
    - full: all official capabilities (deleting, moving, syncing, SQL, importing/exporting, etc.).

Set profile in config.json:

   {
     "profile": "readonly"
   }
  1. Token resolution
    The plugin resolves the API Token in the following order:
  2. The environment variable SIYUAN_API_TOKEN
  3. The configuration in ~/.config/dsh-siyuan/config.json
  4. SiYuan workspace configuration (api.token read from ~/.config/siyuan/workspace.json)

Core Features

The plugin mainly includes the following capabilities:

  1. MCP tool registration
    Registers the 29 official SiYuan capability-group tools with the mcp__siyuan__* prefix.

  2. Skill
    Adds the siyuan skill, supporting natural-language control of SiYuan permissions in conversation (for example, $siyuan-readonly switches to read-only mode).

  3. AI tools
    Adds the ai tool group, connecting SiYuan’s built-in AI to MCP. It includes the following actions:
    - chat: general question and answer
    - action: execute editor actions
    - editor: editor-style conversation
    - agent: start a built-in agent turn (supports streaming and approval)
    - status/confirm/answer/permission: read turn, approve, answer follow-up questions, and set permissions

  4. Independent proxies
    DSH uses a Node proxy (bridge/), while Codex uses a Python proxy (bin/); their policies and Tokens are independent.

State and Maintenance

The plugin directory will not be written to. Audit logs are located at ~/.config/dsh-siyuan/audit.jsonl.

Run the following command for diagnostics (does not print the Token):

node node_modules/.bin/dsh-siyuan-bridge --doctor

Ensure the environment meets the Node version requirement (Node >= 22).