Office
Office is a portable Agent Plugin for creating, importing, inspecting, editing, previewing, validating, searching, and exporting editable PowerPoint presentations. It uses semantic HTML with inline CSS as the authoring surface and domOXML as the presentation compiler.
Capabilities
- Persistent PPTX workspaces with immutable revisions and optimistic concurrency
- Batch presentation, slide, and stable-element editing
- PPTX import with warnings and preservation metadata
- Single-slide and bounded contact-sheet PNG previews
- domOXML representation/editability/source-retention validation
- SQLite FTS presentation search
- Immutable PPTX export through MCP binary resources
How it works
HTML + inline CSS → domOXML typed IR → editable PPTX + PNG + validation
Office never exposes OOXML to the model. Stable prs_, rev_, sld_, and server-owned el_ identifiers make repeated edits compact and safe.
Installation
An Agent Plugins client loads plugin.json, mcp.json, and the presentation skill. The development launcher requires Python 3.12+, uv, and Chromium:
cd server
uv sync --frozen --extra dev
uv run playwright install chromium
OFFICE_DATA_DIR=/path/to/private/state uv run --frozen python -m office_mcp
The source launcher is the current alpha distribution strategy. A future release may bundle a cross-platform runtime without changing the plugin contract.
Usage
Ask an agent to create a deck, import a PPTX, refresh metrics, reuse a slide layout, preview a presentation, or validate/export a revision. The bundled presentations Agent Skill teaches creation, editing, visual review, imported-deck handling, presentation design, and optional design-atlas inspiration through progressive-disclosure references, while the MCP provides the typed execution surface. See the skill and its source provenance.
Tools
The server exposes twenty high-level operations: nine presentation_*, six slide_*, and five element_* tools. See the design contract and generated API reference.
Resources
Office exposes office://capabilities plus presentation metadata, outline, validation, preview, immutable revision/file, slide structure/source/preview, and element resources. Presentation roots are listed with true opaque cursor pagination.
Storage
OFFICE_DATA_DIR points to private plugin state containing SQLite, revisions, previews, exports, assets, scratch, and runtime data. It is not a universal user filesystem. Standalone deletion is a documented hard delete.
Security
Model-authored source is sanitised and limited to inline CSS. JavaScript, active content, event handlers, dangerous URLs, stylesheet injection, and caller-owned Office/domOXML metadata are rejected. Render-time network assets are disabled; use bounded raster data: images or safe inline SVG. file: and https: PPTX input default off; when enabled they enforce containment or DNS-pinned SSRF/redirect/MIME/size policies. Imported PPTX packages receive path, relationship, active-content, type, XML, media, entry-count, compression-ratio, and decompressed-size checks.
Current limitations
Office follows domOXML's alpha capabilities and does not claim first-class chart authoring, arbitrary animations, notes, audio/video insertion, or master authoring. PowerPoint has one presentation-wide slide size: differing per-slide overrides can be previewed, but validation fails and export gives an actionable error until they are normalized. Imported theme/transition semantics are represented through domOXML's normalized inline source where its reverse API does not expose separate metadata. domOXML's public API does not yet accept its preservation fragments on a modified reverse-import render; Office therefore guarantees byte-identical untouched import export and explicitly blocks export after content edits when such fragments exist, preventing silent loss.
Development
Run uv run ruff check ., uv run ruff format --check ., uv run pyright, and uv run pytest. Integration tests use real Chromium and PPTX packages. Generate API docs with uv run office-docs ../API_REFERENCE.md.
python -m office_mcp --transport streamable-http is a loopback-only development surface. A remote service must compose create_server with authenticated RequestScopeProvider, tenant-safe store/output adapters, transport authorization, and a shared subscription bus; the bundled launcher intentionally refuses non-loopback binding.
License
MIT