Plugin overview
Plugins add domain-specific Lua functions without expanding the MCP tool list. They are opt-in Python files.
Activation boundary
Section titled “Activation boundary”The runtime scans exactly $MEMSCOPE_HOME/plugins/*.py:
- the scan is nonrecursive;
- filenames sort before import and registration;
- underscore-prefixed files are excluded; and
- bundled
_contribfiles are catalog/install sources, not a second automatic root.
A file becomes active because it is present in the activated directory. It does not activate because a target DLL, process module, or package resource exists.
List and install bundled sources explicitly:
memscope-mcp list-pluginsmemscope-mcp install-plugin il2cppmemscope-mcp install-plugin netcapThe default install refuses to overwrite an existing file. --force explicitly overwrites the activated copy. A package upgrade preserves saved scripts and activated plugin copies; it does not rewrite scripts or refresh plugin files implicitly.
Bundled reference plugins
Section titled “Bundled reference plugins”| Plugin | Focus | Entry source |
|---|---|---|
il2cpp |
Unity IL2CPP strings, arrays, lists, dictionaries, and thread-local native-call guidance. | il2cpp.py |
netcap |
Winsock hooks, packet analysis, stream assembly, framing, searches, and durable recordings. | netcap.py |
Plugins use core capabilities such as memory reads, strict scans, native calls, and inline hooks. They do not add direct MCP methods; their functions are available through lua only after successful activation.
Execution and state
Section titled “Execution and state”An activated plugin runs as executable Python in the server process. It can read target memory through its session, invoke any operation exposed by its imports, write local data, and register arbitrary Lua callbacks. Keep plugin state on the instance and bind it to the ExtensionContext session. Use on_process_detaching to release target hooks, allocations, files, and buffers.
See Plugin authoring, Plugin lifecycle, Plugin upgrading, and the security model.