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.
-
Desktop
Search forsiyuan-codex-bridge(categorized as Memory) in the DSH plugin market and install it. -
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.
- 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.
- Operation levels
The plugin supports three operation levels. Each level is revalidated on everytools/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"
}
- Token resolution
The plugin resolves the API Token in the following order: - The environment variable
SIYUAN_API_TOKEN - The configuration in
~/.config/dsh-siyuan/config.json - SiYuan workspace configuration (
api.tokenread from~/.config/siyuan/workspace.json)
Core Features¶
The plugin mainly includes the following capabilities:
-
MCP tool registration
Registers the 29 official SiYuan capability-group tools with themcp__siyuan__*prefix. -
Skill
Adds thesiyuanskill, supporting natural-language control of SiYuan permissions in conversation (for example,$siyuan-readonlyswitches to read-only mode). -
AI tools
Adds theaitool 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 -
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).