Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Built-in Office document tools (OfficeCLI integration)

未关闭
#12,728 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
15/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
go
领域
ai, backend

调研方向

This is a design proposal, so start by reading how the existing pieces fit: LocalAIAssistantHolder and metadata.localai_assistant, DisableMutating in pkg/mcp/localaitools, and the MCP executor functions NewToolExecutor, DiscoverMCPTools, ExecuteTool and ExecuteMCPToolCallRemote. Done means maintainers agree on the modality shape, lifecycle, and sandboxing, not that code exists yet. Do not start an implementation until that is settled in the thread.

由索引模型根据 Issue 内容生成。

描述

enhancement

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:

  1. In-process / managed MCP surface — analogous to LocalAIAssistantHolder + metadata.localai_assistant: an office modality (e.g. metadata.office_documents or a DisableOfficeTools app flag) that registers OfficeCLI's MCP tools for any model without per-model YAML.
  2. Lifecycle management — LocalAI provisions/launches the officecli stdio server itself (auto-download binary or bundled), instead of requiring users to hand-write an mcp.stdio block.
  3. Agent integration — expose the same surface to the Agent pool as a built-in action / default agent-scoped MCP server, respecting allowed_tools, excluded_tools and a read-only mode (mirroring DisableMutating in pkg/mcp/localaitools).
  4. 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 command string param — trivially compatible with the generic CallTool path.
  • 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.

主要语言
Go
星标
49.5k
派生
4.5k
平均合并
23 小时 15 分钟
30 天内合并 PR
382

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

mudler/LocalAI 的其他 Issue

查看 mudler/LocalAI 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。