animus-document-engine

animus-document-engine

MCP server for rendering, parsing, converting, and editing Office documents (Excel, PowerPoint, Word) from a structured JSON spec, using LibreOffice WASM for conversion and preview.

Category
Visit Server

README

animus-document-engine

An MCP (stdio) service that renders, parses, converts, and edits Office documents — Excel (.xlsx), PowerPoint (.pptx), Word (.docx) — from a structured JSON spec. It is identity-free and stateless: it never touches subjects, S3, or users. The animus-launchapp portal orchestrates it (storage + scoping + subjects); this engine is the reusable rendering core.

Part of REQUIREMENT-053 — Documents as subjects.

Why a spec

The spec is the source of truth. An AI authors a spec (not raw OOXML); a deterministic renderer turns it into a real file. Editing = mutate the spec and re-render — lossless, reviewable, and diffable. Binary payloads cross the MCP boundary as base64.

Tools

Tool In Out
render_document format, spec base64 OOXML bytes
parse_document format, bytes_base64 spec (xlsx only in v1)
apply_edits format, spec, ops[] edited, re-validated spec
convert_document bytes_base64, to base64 converted bytes (e.g. pdf)
preview_document bytes_base64, kind (pdf|png), page base64 PDF or PNG thumbnail

convert_document / preview_document use LibreOffice compiled to WebAssembly (@matbee/libreoffice-converter) — no native soffice needed. The ~112 MB WASM lives in this service, never in the portal image.

Spec shapes (v1)

// xlsx
{ "sheets": [ { "name": "Revenue",
                "columns": [ { "header": "Month" }, { "header": "USD" } ],
                "rows": [ ["Jul", 1200], ["Aug", 1500] ] } ] }

// pptx
{ "title": "Kickoff",
  "slides": [ { "title": "Agenda", "bullets": ["Scope", "Timeline"] },
              { "title": "Next", "body": "…", "notes": "speaker note" } ] }

// docx
{ "title": "Spec",
  "blocks": [ { "type": "heading", "level": 1, "text": "Overview" },
              { "type": "paragraph", "text": "…" },
              { "type": "bullets", "items": ["a", "b"] },
              { "type": "table", "rows": [["a","b"],["c","d"]] } ] }

apply_edits ops: {op:"set",path,value}, {op:"append",target,value}, {op:"remove",target,index}, {op:"replace",value} (target = sheets|slides|blocks).

Run

npm install
npm run build
node dist/index.js        # MCP stdio server

Wire it into an Animus workflow phase (or any MCP client) as a stdio server:

{ "mcpServers": { "document-engine": { "command": "node", "args": ["dist/index.js"] } } }

Dev

npm run dev        # tsx watch (stdio server)
npm run typecheck  # tsc --noEmit
npm run smoke      # render all 3 formats + xlsx parse/edit round-trip
tsx scripts/mcp-smoke.ts   # spawn the built server, call tools over MCP

Scope (v1) & roadmap

  • Generate all three formats — solid (pptxgenjs / docx / exceljs).
  • Parse — xlsx (data + headers). pptx/docx in-place parsing is DEFERRED to a future Python worker (python-pptx / python-docx are the only libraries that faithfully round-trip arbitrary decks/docs); the engine errors loudly rather than silently dropping content.
  • Convert/preview — via LibreOffice-WASM.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured