Motivation in genspark-ai/genoffice#338: agents asked to produce Word
documents today write python-docx or drive Office over COM. GenOffice
already ships a correct, fast docx engine, but only its in-app AI panel
can reach it. This exposes that capability to Claude Desktop, Cursor and
any MCP client.
The server lives in the shell main process, is off by default, binds
127.0.0.1 only and validates Host/Origin (it has no authentication).
Settings > General gets an enable switch, port, log toggle and a
capability summary.
Two things MCP adds beyond the existing genoffice CLI, one per the
maintainer's reply in #338:
- driving the editor the user has open: create_session opens a real docs
tab and the content tools push editor commands through a renderer
bridge, so the user watches each step instead of writing bytes behind
the UI;
- reaching clients that cannot run a shell: plus a legacy SSE transport
and a stdio bridge for clients that only speak stdio.
Headless generation and reading (create_docx / read_docx) delegate to the
bundled genoffice CLI rather than reimplementing conversion, so there is
one engine, not two.
Checked: npm run typecheck, npm run lint, npm run licenses, npm run
check:english-comments, npm run fixtures; apps/shell/tests/mcp plus
settings-mcp (71 tests) and the mcp-visible-doc e2e spec.