Repository navigation
Built-in Office document tools (OfficeCLI integration) #12728
Description
Is your feature request related to a problem?
LocalAI models and agents cannot create or edit Office documents (.docx/.xlsx/.pptx) locally. Users must manually configure an external MCP server per model or per agent.
Describe the solution
I don't know if anybody thinked about before, but my proposal is to integrate OfficeCLI (Apache 2.0, single self-contained binary, built-in MCP stdio server + HTML/PNG rendering engine) as an optional built-in tool surface, following the existing LocalAI Assistant pattern:
- In-process / managed MCP surface — analogous to
LocalAIAssistantHolder+metadata.localai_assistant: anofficemodality (e.g.metadata.office_documentsor aDisableOfficeToolsapp flag) that registers OfficeCLI's MCP tools for any model without per-model YAML. - Lifecycle management — LocalAI provisions/launches the
officeclistdio server itself (auto-download binary or bundled), instead of requiring users to hand-write anmcp.stdioblock. - Agent integration — expose the same surface to the Agent pool as a built-in action / default agent-scoped MCP server, respecting
allowed_tools,excluded_toolsand a read-only mode (mirroringDisableMutatinginpkg/mcp/localaitools). - Skill prompt injection — reuse the MCP prompt-injection path to surface OfficeCLI's SKILL.md guidance to the model when the modality is active.
Why it fits
- The existing MCP executor (
NewToolExecutor,DiscoverMCPTools,ExecuteTool) already supports stdio servers and the server-side tool loop across /v1/chat/completions, Anthropic Messages, Open Responses (stream + background). - OfficeCLI's MCP tool has a single
commandstring param — trivially compatible with the genericCallToolpath. - Distributed mode: the tool would execute on agent workers via
ExecuteMCPToolCallRemote, so the binary only needs to exist on worker nodes.
Workaround today
Manually adding OfficeCLI as mcp.stdio in the model YAML or as an agent-scoped stdio server — but this requires installing the binary yourself and repeating the config per model/agent.
Security considerations
- File-system access should be sandboxed/scoped (configurable working dir).
- Read-only mode (view/get/query/validate only) for untrusted contexts.
- Disabled by default, opt-in flag — same posture as the LocalAI Assistant.
Other considerations
Integrate office features is so important to a professional and enterprise use of LocalAI.
Activity
mudler commentedon Oct 16, 2026
This is a good idea - and can be expanded further when Addons are landing ( #12702 )