Max Commander Plugin SDK Reference
Status: current public reference for Max Commander.
Get your extension listed
Prepare → Validate → Test → Submit → Sterling review → Publication
Submit one `.mcx` package containing your extension, listing text and artwork. Sterling reviews the package before it appears in the official catalog.
1. Prepare the required files
Your source directory must contain:
plugin.json identity, version, permissions and compatibilityindex.js extension codeREADME.md setup instructions and limitationscatalog.json public listing text and image declarationsmedia/icon.png required 512 × 512 static PNGIn plugin.json, set entryPoint to index.js, readme to README.md, minAppVersion to a numeric version such as 0.9.10, and platforms to ["windows"]. Declare the permissions your extension uses. Identity, author and version belong in this manifest.
In catalog.json, provide schema_version: 1, category, summary, description_markdown, changelog_markdown, icon and screenshots. Describe what the extension does, how to configure it and any limitations.
Screenshots are optional. Use an empty screenshots array when you have none. If included, use real app captures at media/screenshots/01.png through 08.png, numbered consecutively, and declare each image's caption and capture metadata.
See Build & Submit for a complete catalog.json example and screenshot metadata.
2. Validate and build the official package
Run these commands from the Plugin Author developer kit directory. Replace <source-directory> with your extension's source path.
node ./scripts/validate-plugin.mjs <source-directory> --official-release& ./scripts/pack-mcx.ps1 -PluginDirectory <source-directory> -OfficialReleaseThe packer validates the source and the completed archive. Its default output is:
plugins/packed/<id>-<version>-store.mcxAlternatively, use Export for store in Max Commander with the required catalog files and artwork. Ordinary Export to .mcx creates a local package; use the official export for catalog submission.
To check an existing archive:
node ./scripts/validate-plugin.mjs <archive.mcx> --official-release --archive3. Test the exact archive
Install the generated .mcx in a compatible Max Commander version. Review its permissions and verify navigation, commands, settings, previews and error handling. Test missing credentials, denied permissions and unavailable services where relevant. Package validation checks structure; it does not establish that the extension works correctly.
4. Submit for review
Contact Sterling to arrange submission of the single <id>-<version>-store.mcx archive. The listing text and images are already inside it. There is no public self-service publishing portal.
Sterling independently validates the archive and reviews it before publication. Passing the package validator does not automatically approve or publish a listing.
5. Publication and future updates
Once approved and published, the extension appears in the official catalog. Sterling hosts the package and its bundled images; you do not need to provide hosting URLs. Users install it through Max Commander's permission-review flow.
For every update, increment the version, rebuild, test and submit a new archive. This includes changes to listing text or images: an already published ID/version is immutable.
Package limits checklist
- Archive: only the required files and declared PNG media. No extra files, directory entries, links, unsafe paths or duplicate names.
- Listing JSON: UTF-8, maximum 256 KiB. Unknown catalog fields are rejected.
- Category and summary: maximum 64 and 240 characters respectively.
- Description: maximum 65,536 Unicode characters and 128 KiB UTF-8.
- Changelog: maximum 65,536 Unicode characters and 64 KiB UTF-8.
- Artwork: static PNG only; required icon is exactly 512 × 512 pixels. All images combined must fit within 4 MiB.
- Screenshots: up to eight; maximum 8,192 pixels per dimension and 32 million pixels per image. Declare every bundled image.
- Capture metadata: caption up to 240 characters; nonempty surface up to 120 characters; numeric app version; valid UTC RFC3339 capture timestamp ending in
Zwith optional one to three fractional digits. Capture metadata is your attestation that the screenshot is real.
Runtime Model
Script plugins run in an isolated Web Worker. A plugin script must return a provider object or assign it to self.provider.
const provider = { name: 'Example', scheme: 'example', type: 'filesystem', capabilities: { readonly: true }, async readDir(path) { return []; }, async getStat(path) { return { size: 0, is_dir: true, modified: new Date().toISOString() }; }, async readFile(path) { return ''; }, async getFolderSize(path) { return 0; }};self.provider = provider;return provider;The loader passes three globals into the plugin factory:
API: logging and host bridge helpersconfig: persisted plugin settings valuesid: plugin ID fromplugin.json
Provider Properties
type ProviderType = 'filesystem' | 'tool';type PreferredViewMode = 'normal' | 'thumbnails' | 'branch';type PreferredLocation = 'dialog' | 'panel' | 'settings';interface FileSystemProvider { type?: ProviderType; scheme: string; name: string; pluginUiVersion?: 1 | 2; iconUrl?: string; preferredLocation?: PreferredLocation; capabilities: { readonly: boolean; no_stream?: boolean; description?: string; preferredViewMode?: PreferredViewMode; }; customColumns?: Record<string, { label: string; width: number; type?: 'string' | 'number' | 'date' }>; i18n?: Record<string, Record<string, string>>;}The provider may also expose icon, version, author, description, showInToolsMenu, and shortcuts for editor/manifest convenience, but packaged installs are driven by plugin.json.
Required Filesystem Methods
Filesystem plugins should implement:
readDir(path: string): Promise<FileItem[]>;readFile(path: string): Promise<string | Uint8Array>;getStat(path: string): Promise<{ size: number; is_dir: boolean; modified: string }>;getFolderSize(path: string): Promise<number>;Writable providers may implement:
writeFile(path: string, content: Uint8Array): Promise<void>;createDir(path: string): Promise<void>;delete(path: string): Promise<void>;rename(oldPath: string, newPath: string): Promise<void>;Write methods are blocked by the host when capabilities.readonly is true.
Optional Methods
getThumbnail(path: string): Promise<string | undefined>;getMetadata(path: string): Promise<Record<string, any> | undefined>;resolvePath(path: string): Promise<Array<{ name: string; path: string }> | undefined>;getConfigSchema(): PluginConfigField[] | Promise<PluginConfigField[] | undefined>;executeItem(item: FileItem): boolean | Promise<boolean>;getItemActions(item: FileItem): PluginItemAction[] | Promise<PluginItemAction[] | undefined>;executeItemAction(actionId: string, item: FileItem): boolean | Promise<boolean>;getCommands(): PluginCommand[] | Promise<PluginCommand[] | undefined>;getUI(context?: PluginUIContext): Promise<UIBlock[]>;handleUIAction(actionId: string, data?: any, context?: PluginUIContext): Promise<void>;dispose(): void | Promise<void>;Return true from executeItem() or executeItemAction() when the plugin handled the action. Return false to let Max Commander continue with fallback behavior where applicable.
FileItem Shape
Max Commander accepts the panel item shape used by the app store:
interface FileItem { name: string; path: string; is_dir: boolean; size?: number; modified?: string; extra?: Record<string, any>;}Useful extra fields:
thumbnailUrl: URL or asset URL used by thumbnail/media-like viewsstreamUrl: media URL for viewer/player integrations- custom column values, such as
qbt_progress,yts_rating,steam_appid sortPriority: optional numeric priority used by sorting; lower values appear earlier
Use scheme-stable paths such as my://category@1/item-123. Avoid nested page paths if generic parent-path behavior would produce confusing breadcrumbs; flattening page roots keeps .. deterministic.
Config Fields
interface PluginConfigField { id: string; type: 'string' | 'password' | 'boolean' | 'number'; label: string; description?: string; required?: boolean; defaultValue?: any;}Settings values arrive as the config object passed into the plugin factory.
With explicit plugin.config.write, a provider call may persist ordinary, non-secret state using await API.appAPI.updateConfig(patch). The patch has no plugin-ID parameter. It must be a plain JSON object with finite numbers and no __proto__, prototype, or constructor key at any depth. MC shallow-merges it with existing config, preserves omitted keys, validates the complete result, and caps serialized UTF-8 at 256 KiB. A successful write durably persists and validates a replacement Worker before cutover; the calling Worker receives its ACK and finishes the outer RPC before retiring. Secrets remain in secure.vault.
Commands
Plugins with commands.palette can return command metadata:
getCommands: async () => [ { id: 'example.refresh', label: 'Example: Refresh', shortLabel: 'Refresh', icon: 'refresh', execute: async (args) => { await API.appAPI.refresh(); } }]Command IDs should use [plugin_id].[command_name]. Labels should use [Plugin Name]: [Action]. shortLabel is optional and should be a compact command-bar label without the plugin prefix.
When a plugin owns the active panel path (matching its declared scheme), Max Commander also presents these commands in a host-owned strip inside that panel. No new permission or manifest field is needed. The strip defaults to the bottom, can be moved to the top in Interface settings, and can be hidden/restored per plugin. Plugins without a panel still use Tools, Command Palette, and optional Feature Bar slots. Existing commands need no changes.
Panel command execution receives a serializable context:
interface PluginCommandContext { panelId?: 'left' | 'right'; path?: string; selectedItems?: FileItem[]; focusedItem?: FileItem | null;}For context-sensitive commands, optionally add isAvailable(context) to each command. Return true/false or { available: boolean, reason?: string }; reason becomes the disabled button tooltip. A failed availability check disables the command, and the worker rechecks availability immediately before execution. Global Command Palette, Tools, and Feature Bar entry points receive the active panel context when available; plugins should still handle missing fields. A panel context contains only the active panel's data, not the opposite panel.
Set suggestible: true only when a command has a meaningful relationship to the active ordinary folder, and implement isAvailable(context) for it. This is an opt-in for MC's learned contextual bar; command usage is retained locally by stable plugin and command IDs but disabled/uninstalled commands are never suggested. Optional suggestionVersion carries learning across compatible plugin updates; otherwise the installed plugin version is used. Change it when command semantics change. The host does not record command arguments, selected item names, or contents.
Dashboard UI Blocks And Plugin UI v2
Plugins with ui.dashboard can expose UI blocks via getUI() and receive actions in handleUIAction().
Supported blocks:
type UIBlock = | { type: 'header'; id: string; title: string; subtitle?: string } | { type: 'button'; id: string; label: string; variant?: 'primary' | 'secondary' | 'danger'; icon?: string; actionId: string } | { type: 'text'; id: string; content: string; style?: 'normal' | 'code' | 'hint' } | { type: 'notice'; id: string; title?: string; content: string; tone?: 'info' | 'success' | 'warning' | 'danger' } | { type: 'progress'; id: string; label: string; value: number; max: number } | { type: 'input'; id: string; label: string; placeholder?: string; actionId: string } | { type: 'form'; id: string; title?: string; actionId: string; submitLabel?: string; closeOnSubmit?: boolean; fields?: UIField[]; schema?: UIFormSchema; initialValues?: Record<string, any> } | { type: 'list'; id: string; label?: string; items: Array<{ id: string; title: string; subtitle?: string; value?: string; actionId?: string; data?: any }> } | { type: 'table'; id: string; label?: string; columns: Array<{ id: string; label: string }>; rows: Array<Record<string, any>>; actionId?: string } | { type: 'properties'; id: string; label?: string; items: Array<{ label: string; value?: string | number | boolean | null; sensitive?: boolean; copyable?: boolean }> } | { type: 'confirm'; id: string; title: string; content: string; actionId: string; confirmLabel?: string; danger?: boolean; data?: any } | { type: 'group'; id: string; label?: string; children: UIBlock[] };Inputs fire their action when the user presses Enter.
Use pluginUiVersion: 2 in plugin.json for forms, lists, tables, properties, notices, confirmations, and contextual dialogs. MC owns rendering and styling; plugins do not provide HTML or CSS. Set closeOnSubmit: true on a form when the dialog should dismiss after handleUIAction() completes successfully.
Host API
Host APIs live under API.appAPI. Permission checks happen in both the plugin worker and the host. The host binds immutable plugin identity and permissions to the Worker and never trusts a plugin-supplied ID.
API.appAPI.showProgress(title, progress);API.appAPI.refresh();await API.appAPI.navigate(path); // app.navigateawait API.appAPI.fillPanel(items); // panel.fillawait API.appAPI.showDialog(pluginId, context); // ui.dialogawait API.appAPI.showFileMetadata(item); // ui.dialogawait API.appAPI.openVideoPlayer(url); // media.openVideoPlayerawait API.appAPI.writeClipboard(text); // clipboard.writeconst text = await API.appAPI.readClipboardText(); // clipboard.read, direct action onlyawait API.appAPI.updateConfig(patch); // plugin.config.writeawait API.appAPI.readTextFile(path); // local.fs.readawait API.appAPI.readDirectory(path); // local.fs.readawait API.appAPI.getFileSize(path); // local.fs.readawait API.appAPI.pathExists(path); // local.fs.readawait API.appAPI.getImageDimensions(path); // local.fs.readawait API.appAPI.openPath(path); // shell.openawait API.appAPI.openUrl(url); // shell.openawait API.appAPI.localHttpRequest(request); // network.localhostconst feed = await API.appAPI.networkFetch({ url, accept }); // network.fetchconst assetUrl = await API.appAPI.toAssetUrl(path); // local.fs.readconst taskId = API.appAPI.startBackgroundTask(title); // background.taskawait API.appAPI.updateBackgroundTask(taskId, 42.5, 'Working...');await API.appAPI.finishBackgroundTask(taskId);await API.appAPI.secureVault.status(); // secure.vaultawait API.appAPI.secureVault.lock(); // secure.vaultawait API.appAPI.secureVault.list(); // secure.vaultawait API.appAPI.secureVault.load(key); // secure.vaultawait API.appAPI.secureVault.store(key, value); // secure.vaultawait API.appAPI.secureVault.delete(key); // secure.vaultIn 0.9.10, every host call is independently permission-gated after binding the Worker identity. showProgress() requires ui.dialog, refresh() requires app.navigate, and toAssetUrl() requires local.fs.read. Both transports share that gate; unknown methods are rejected. showDialog and UI updates may address only the originating plugin. Shell opens and clipboard writes require a current host-owned direct action; legacy fire-and-forget messages carry no direct-action authority.
Virtual rows must stay in their provider scheme; native/rooted targets require local.fs.read. Relative metadata/panel paths are bound to the originating provider. readFile returns string or Uint8Array, never an arbitrary object/local temporary-path handle. Filesystem read/write capabilities are enforced in the host proxy as well as SDK checks.
Background task IDs are local to the originating Worker. MC assigns private progress IDs, limits each Worker to 32 concurrent tasks, rejects foreign/native task IDs, and terminalizes outstanding jobs when that Worker is disposed.
readClipboardText() is allowed once per host-owned direct invocation: Dashboard/ToolDialog actions, Tool or Command Palette commands, item execution, and item actions. It is denied from listing, getUI, getMetadata, timers, and other passive work. The direct context expires with the outer RPC response, error, or ten-second timeout. MC returns plain text only, truncates safely at 64 KiB UTF-8, and reports native read failures concisely.
For updateBackgroundTask(), use progress 0..100 for determinate status. Use a negative progress value for indeterminate/live status.
The Worker seals fetch, XMLHttpRequest, WebSocket, EventSource and inherited/prototype routes before evaluating source. Reinitialization cannot change the original permission snapshot. network.http is required; loopback browser requests additionally require network.localhost. App-origin, asset and IPC URLs are rejected; relative/blob nested-worker/script URLs are unsupported. CORS and the app CSP still apply. Use the bounded native bridges for their documented purposes. This is browser/host API enforcement, not an OS-process or memory/CPU sandbox.
Plugin i18n resources live in mc-plugin-<encoded-plugin-id>, never the core translation namespace. Nested string trees and existing i18n:columns.key custom-column labels are supported within that plugin namespace. Labels cannot select another namespace or replace MC copy. Resource removal remains token-bound.
Public Internet Fetch Bridge
Use API.appAPI.networkFetch() only when public content such as RSS/Atom discovery cannot be read with worker fetch() because of CORS. Permission: network.fetch.
const response = await API.appAPI.networkFetch({ url: 'https://example.com/feed.xml', accept: 'application/atom+xml, application/rss+xml, application/xml, text/xml'});// { body, finalUrl, status, headers }The sole request field shape is { url, accept? }; unknown fields are rejected. The bridge makes only a GET and sends a stable, honest Max Commander User-Agent owned by the host. Plugins cannot set or override it. No cookies, Authorization, request body, plugin-supplied headers other than bounded Accept, or proxy traffic are sent. It accepts HTTP(S) public hosts only, rejects URL userinfo, literal/private/mixed DNS results, checks each redirect (maximum five), applies one 15-second deadline, caps the streamed body at 1.5 MiB, and exposes only content-type, content-length, etag, last-modified, and cache-control response headers. It is not localhost/LAN access, generic proxying, caching, or scheduling.
For public Reddit RSS feeds, this identity can avoid rejection of an unidentified HTTP client, but a feed can still return 403 or 429 under Reddit's access and rate policies. This API does not authenticate private feeds or provide Reddit OAuth; plugins should surface those statuses.
Localhost HTTP Bridge
Use API.appAPI.localHttpRequest() for local companion services that cannot be reached reliably through browser/WebView fetch() because of CORS, CSRF, origin, or cookie behavior.
Permission: network.localhost
const response = await API.appAPI.localHttpRequest({ method: 'POST', url: 'http://localhost:8080/api/v2/torrents/add', headers: { 'Content-Type': 'application/x-www-form-urlencoded', Cookie: 'SID=...' }, body: new URLSearchParams({ urls: magnetUrl }).toString(), timeoutMs: 15000});Security boundary:
- Only
localhost,127.0.0.1, and[::1]are allowed. - Both HTTP and HTTPS local URLs are accepted.
- Redirects are not followed.
- Dangerous headers are blocked by the native host.
- Responses are capped by the host.
- Plugins must manage cookies explicitly using returned response headers.
Permissions
Declared permissions live in plugin.json. The installer also infers permissions from code and rejects packages that use a gated API without declaring the required permission. clipboard.read and plugin.config.write must always be explicit; an otherwise empty permission list is not auto-filled for these APIs.
Current permission IDs:
filesystem.readfilesystem.writecommands.paletteui.dashboardui.dialogapp.navigatepanel.fillbackground.taskmedia.openVideoPlayernetwork.httpnetwork.localhostnetwork.fetchfiles.executelocal.fs.readshell.openclipboard.writeclipboard.readplugin.config.writesecure.vault
Dangerous permissions shown with stronger install warnings:
filesystem.writenetwork.httpnetwork.localhostnetwork.fetchfiles.executelocal.fs.readshell.openclipboard.writeclipboard.readplugin.config.writesecure.vault
MC does not expose generic plugin KV storage, a generic host internet proxy, scheduling, full-text indexing, OPML integration, or AI features. network.fetch is only the constrained public GET reader documented above.
Packaging
pack_plugin(id) creates:
plugins/packed/<id>.mcxThe current packer includes only direct files inside plugins/<id>/; it does not recurse into subfolders. This is intentional for development notes such as plugins/<id>/dev/SPEC.md.
Expected package contents:
plugin.jsonindex.jsREADME.mdDevelopment-only files should live under plugins/<id>/dev/ so they are not packaged.
Official catalog API
Official release manifests declare minAppVersion (numeric major.minor.patch) and platforms:["windows"]. Legacy local imports may omit these fields. Explicit plugin.catalog authorizes passive API.appAPI.getCatalogPluginStatus({id,version,sha256}) and direct-action-only API.appAPI.installCatalogPlugin({id,version,sha256}). The latter resolves {status:"installed"|"cancelled",id,version} only after host verification/permission review. Never supply URLs, bytes, paths, permission grants or activation flags. Updates retain config/status/vault; new installs offer an explicit enable choice. Media uses official digest-addressed PNG/JPEG/WebP routes and bounded host loading. All plugins remain Free; no account is required.