Skip to content

Add-On Authoring Guide

This guide explains how to create, package, and ship a template add-on pack for the satware(r) AI OnlyOffice MCP server.

A customer image extends the base image and merges the add-on at build time:

FROM satware/onlyoffice-mcp:1.3.0-base AS base
COPY ./my-addon/ /tmp/addon/
RUN node dist/scripts/bake-addon.js /tmp/addon

Your add-on directory needs an addon.json manifest and optional templates/, assets/, and fonts/ subdirectories.

The addon.json file sits at the root of your add-on directory:

{
"$schema": "./addon.schema.json",
"id": "worms",
"version": "1.0.0",
"minBaseVersion": "1.3.0",
"label": "Stadt Worms Template Pack",
"description": "Corporate templates for Stadt Worms municipal administration",
"priority": 10,
"suppressedIds": ["beschlussvorlage"],
"languages": ["de"]
}
Field Type Required Description
id string Yes Lowercase ASCII slug. Unique across loaded add-ons.
version string Yes Semver version of this add-on pack.
minBaseVersion string Yes Minimum base image version (X.Y.Z).
label string Yes Human-readable display name.
description string No Longer description.
priority number No Merge precedence (default: 10). Higher wins on id collision.
suppressedIds string[] No Base template IDs to hide.
languages string[] No BCP-47 language codes (e.g. ["de"]).
my-addon/
addon.json
templates/
registry.json
my_template/
v1.0/
template.docbuilder
schema.json
assets/
my_category/
logo.base64
fonts/
montserrat-regular.ttf

suppressedIds hides base templates your add-on supersedes:

  • Soft-disable: files stay on disk, hidden from API only
  • Absolute: applied after override (even add-on-provided ids are removed)
  • Idempotent: unknown ids produce a warning, not an error

Same-id add-on template wins over base. Resolution: higher priority wins; on tie, add-on wins over base.

  • Formats: TTF, OTF, WOFF
  • Install path: /usr/share/fonts/truetype/addons/
  • Licensing: You are responsible for font license compliance
  • minBaseVersion must be plain X.Y.Z (no pre-release suffixes)
  • Comparison uses semver rules
  • Mismatch = add-on rejected; server continues with base only
  • Base image tags are immutable - never retag

Use the upstream tests/fixtures/synthetic-addon/ as a reference fixture. Test the merge locally:

Terminal window
node dist/scripts/bake-addon.js ./my-addon --templates-dir ./templates --output /tmp/baked
cat /tmp/baked/registry.json | jq '.templates | keys'
  1. Create addon.json manifest
  2. Set minBaseVersion to your current base version
  3. Move templates into templates/, assets into assets/, fonts into fonts/
  4. Add suppressedIds for replaced base templates
  5. Test with bake-addon locally
  6. Switch Dockerfile to FROM base + COPY + RUN bake-addon