Introduction

The architecture of DeepSeek Harness (DSH) emphasizes pluggability and configuration-driven design. MemOS is an independent memory service, typically requiring interaction with agents through specific APIs or protocols. This plugin provides a configuration-layer solution, intended to bridge MemOS’s memory capabilities into DSH’s agent environment via the MCP protocol, enabling direct invocation of persistent memory tools.

Core Features

This plugin provides 16 tools, covering core operations of the MemOS memory service:
* CRUD: add_memory (add memory), search_memories (semantic search), get_memory (get), update_memory (update), delete_memory (delete).
* Cube management: create_cube, register_cube, share_cube.
* Interaction and control: chat (memory-enhanced chat), control_memory_scheduler (scheduler control).

Prerequisites

Before installation, ensure the following environment is ready:
1. DeepSeek Harness CLI: the dsh command-line tool is installed.
2. MemOS environment: the MemOS code is checked out, and the Docker stack is running.
3. Python version: the Python version in the MemOS virtual environment must be ≥ 3.10.
4. Network reachability: the LLM and embedding gateway must be accessible from the machine where the MCP subprocess runs.

Installation and Configuration

The installation process consists of three steps: preparing the MemOS environment, adding the plugin, and configuring parameters.

1. Start the MemOS Infrastructure

Ensure the MemOS Docker Compose stack is running to provide Neo4j, Qdrant, and the MemOS API service.

docker compose -f C:\path\to\MemOS\docker\docker-compose.yml up -d

2. Initialize the MemOS Side

Run the installation script in the plugin directory. This creates a virtual environment, installs dependencies, applies source-code patches, and downloads the local tokenizer.

.\setup.ps1 --memos C:\path\to\MemOS

3. Install the Plugin

Add the plugin from the current directory to the specified DSH Profile (for example, web).

dsh plugin --profile web add ./dsh-memos-bridge

4. Configure Environment Variables

The plugin reads environment variables at startup to locate the MemOS environment.

setx MEMOS_PYTHON "C:\path\to\MemOS\.venv\Scripts\python.exe"
setx MEMOS_HOME   "C:\path\to\MemOS"

Or use a POSIX shell:

export MEMOS_PYTHON=/path/to/MemOS/.venv/bin/python
export MEMOS_HOME=/path/to/MemOS

5. Verify Installation

Restart DSH and inspect the configuration output to confirm that the id: memos-mcp line exists.

dsh --profile web --dump-config
dsh --profile web

After restarting, the tools will appear in the agent tool list under the mcp__memos__* namespace.

How It Works

This plugin is essentially a configuration-layer bundle and does not modify DSH core code.
1. Inserts configuration lines via cordis.patch.yml.
2. Mounts the @deepseek-ai/dsh-mcp-client plugin bundled with the DSH CLI.
3. Starts the MemOS MCP server using the stdio protocol (python -m memos.api.mcp_serve).
4. The MemOS subprocess connects to the Neo4j graph database and Qdrant vector store, and exposes memory tools to the agent.

Notes

  • Runtime permissions: The plugin runs with the permissions of the current DSH process. Ensure the process can access the MemOS code paths and configuration files.
  • Neo4j dependency: When the MCP server starts, it checks Neo4j. If the connection fails, it reports an error and exits (though the client’s reconnection strategy may attempt recovery).
  • Endpoint override: In a host runtime environment, you may need to configure env to override MemOS’s default .env endpoints (such as OPENAI_API_BASE) so that the LLM and embedding gateway are accessible.
  • Source code review: Before installation, review the source code and license (MIT), especially the modification logic applied to the MemOS source code by scripts/patch_memos.py.

Summary

dsh-memos-bridge lowers the barrier to integrating MemOS with DSH, converting long-term memory capabilities into native agent tools through a standardized MCP interface. For building agent applications that require persistent memory capabilities, this is a ready-to-use solution.

View the directory page
View the GitHub repository