Nelson MCP — LibreOffice

io.github.quazardous由 GitHub 账号 quazardous 发布v0.14.5更新于 Nov 3, 2026

LibreOffice 内置的 MCP 服务器:智能体可读取并编辑你打开的 Writer 和 Calc 文档。

AI 翻译由 AI 模型根据下方的原文描述翻译,可能有误。

原文描述

An MCP server inside LibreOffice: agents read and edit your open Writer and Calc documents.

概览

Nelson MCP — LibreOffice 的本地 MCP 服务;无需登录;STDIO。

暂无 AI 概览:以下信息来自注册中心条目和服务本身。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Nelson MCP — LibreOffice,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

Nelson MCP

[CI]

A LibreOffice extension that turns your documents into an MCP server. External AI clients connect over HTTP and get full access to document tools — reading, editing, navigating, formatting, and more.

Works with any MCP-compatible client: Claude Code, OpenCode, Goose, ollmcp, etc.

How it works

Nelson MCP runs an HTTP server inside LibreOffice and speaks the Model Context Protocol. AI agents connect to it and use tools to interact with your open document — no copy-paste, no file export.

┌─────────────────┐     HTTP/MCP     ┌────────────────┐│  AI Client      │ ───────────────► │  LibreOffice   ││  (Claude Code,  │    tools/call    │  + Nelson MCP  ││  OpenCode…)     │ ◄─────────────── │                │└─────────────────┘   tool results   └────────────────┘

What it looks like

An agent writes a quarterly report into an empty Writer document, one tool call at a time:

[An agent builds a Q3 report in LibreOffice Writer through Nelson: text, heading colours, table shading, footer, and a comment, with each call listed in the Nelson MCP sidebar]

The finished report: the content as Markdown, heading colours with style_set, a shaded table, a Page {page} of {pages} footer, and a comment on the hiring line. The Nelson MCP sidebar logs every call. Select a call to see its caller, status, duration and parameters.

[A Writer report built by an agent, with the Nelson MCP sidebar listing each tool call]

Everything is set in Tools > Options > Nelson. For example, the HTTP page sets the port, the bind address and the access token:

[Options > Nelson > Http: server port, bind address, access token, allowed browser origins]

Features

  • 145 document tools — read content, edit text, manage styles, insert images, handle tables, charts, conditional formatting, hyperlinks, track changes, page headers/footers, navigate headings, search, and more. The list is filtered by the active document type, so a client sees only what applies (97 with a Writer document, 50 with Calc)
  • Self-configuring agents — with the config API on, an agent reads and changes Nelson's settings itself (read limits, exchange format, the name on its changes), while the settings that protect you stay reserved to Options. See Let the agent configure Nelson
  • Custom MCP endpoints — expose only the tools your agent needs. Built-in presets (minimal, writer-edit, writer-read, calc, gallery) or create your own filtered endpoints
  • Writer, Calc, Draw, Impress — tools adapt to the active document type
  • Calc =PROMPT() — call an LLM directly from a spreadsheet cell
  • Built-in launchers — launch Claude Code, Gemini CLI, or OpenCode directly from LibreOffice with one click. Nelson handles MCP config, prompt injection, and working directory setup automatically
  • AI image generation — generate and edit images from text prompts using Stable Diffusion (A1111/Forge), OpenAI, or AI Horde. One-click detect/install/launch for Automatic1111
  • Beginner-friendly setup — all tools come with install buttons, auto-detection of existing installations, and guided configuration. No manual config files to edit
  • Tunnels — expose the MCP server externally via ngrok, Cloudflare, bore, or Tailscale, behind an access token
  • SSL — optional HTTPS with auto-generated certificates
  • Modular — each feature is a self-contained module with its own config, services, and tools

Install

  1. Download the latest .oxt from the releases page
  2. In LibreOffice: Tools > Extension Manager > Add
  3. Restart LibreOffice
  4. The MCP server starts automatically (default: http://localhost:8766/mcp)

Quick start

Once installed, point your MCP client at the server:

json
{  "mcpServers": {    "nelson": {      "type": "http",      "url": "http://localhost:8766/mcp"    }  }}

Open a document in LibreOffice, then ask your AI client to read or edit it.

For AI agents: see QUICKSTART.md — a step-by-step guide for LLM agents on how to discover documents, navigate structure, and use tools effectively.

Let the agent configure Nelson

An agent doesn't have to stop and ask you to open Options. With the config API switched on, it reads and changes Nelson's settings itself, over the same HTTP server, and changes apply at once. For example, it can:

  • raise the read limit before a long document;
  • switch to HTML to rewrite a formatted one;
  • sign its tracked changes with its own name.

Switch it on in Tools > Options > Nelson > Http > Enable Config API, then:

bash
# Read one setting, a module, or everythingcurl 'http://localhost:8766/api/config?key=writer.max_content_chars'curl 'http://localhost:8766/api/config?module=writer'
# Change several at oncecurl -X POST http://localhost:8766/api/config \     -H 'Content-Type: application/json' \     -d '{"writer.max_content_chars": 200000, "writer.change_author": "AI agent"}'

Add -H 'Authorization: Bearer <token>' once an access token is set.

The API tunes how Nelson behaves. It can't undo what protects you. These settings are reserved to Options, and a request that touches one is refused with 403 and changes nothing:

  • http.*: the token, the address, allowed origins, SSL, and the config API switch itself;
  • tunnel.* and debug.*;
  • launcher.*: the commands Nelson runs;
  • *.instances: the folders tools can reach, and the AI providers' endpoints and keys;
  • core.force_track_changes.

Secrets such as the token and API keys read back as ***.

Security

Whoever can talk to Nelson can read and edit every document open in LibreOffice, and open any file your account can read. What stands between that and other people:

SituationProtection
Default: local onlyThe server binds to localhost. MCP clients on your machine need nothing.
Web pages in your browserRefused. A page you visit cannot call localhost:8766: browser origins are rejected unless you list them in Allowed Browser Origins.
An access token is setEvery request must carry it — Authorization: Bearer <token>, or ?token=<token> for clients that cannot set a header. The built-in launchers pass it for you.
Reachable from the network, or through a tunnelNelson refuses to bind anywhere but localhost, and refuses to start a tunnel, until a token is set.

Set the token in Options > Nelson MCP > HTTP > Access Token; it applies without a restart. The config API can't change it or any other protective setting (see above), but it still reads and changes the rest: keep it and the debug API off on any machine that is reachable from elsewhere.

Before exposing Nelson through a tunnel, read the warning at the top of docs/howto/connect-chatgpt-tailscale.md.

Modules

Around 30 modules; the main ones:

ModuleDescription
coreDocument access, config, events, formatting
docTools common to every document type — open, save, close, export, print, undo/redo, hyperlinks
writerContent editing, comments, styles, tables, images, headers/footers, change tracking
writer.navHeading tree, bookmarks, proximity navigation
writer.indexFull-text search with Snowball stemming
calcCells, sheets, formulas, charts, conditional formatting, comments
drawShapes, pages, slides, placeholders, master slides, transitions (Draw and Impress)
images / documentsImage and document gallery providers (browse and reuse existing assets)
ai_imagesAI image generation and editing (Stable Diffusion, OpenAI, AI Horde)
aiAI text providers, behind the Calc =PROMPT() function
launcherLaunch Claude Code, Gemini CLI or OpenCode from LibreOffice
panelSidebar panels — MCP action log, running jobs
batchMulti-tool execution with variable chaining
httpShared HTTP server with optional SSL
mcpMCP JSON-RPC protocol handler
tunnelTunnel manager (ngrok, Cloudflare, bore, Tailscale)

Turning off what you do not use

Nelson ships a lot of tools, but a client never sees all of them, and most of the narrowing happens on its own. In order of how much they cut:

LeverWhat it doesWhere
Document typeThe tool list follows the active document — about 97 tools for Writer, 50 for Calc, out of 145. Automatic, and clients are notified when it changesnothing to configure
Unconfigured features hide themselvesGallery and AI-image tools disappear entirely until you configure a gallery or an image provider. Launchers and tunnels expose no tools at allnothing to configure
Custom endpointsExpose exactly the tools you choose on their own URL, e.g. 8 tools on /mcp/minimal. The surest way to keep a small model on the railsOptions > Nelson MCP > MCP
PresetsReady-made endpoint tool lists: minimal, writer-edit, writer-read, calc, galleryOptions > Nelson MCP > MCP
Feature switchesTurn off the MCP server, the HTTP config API, or the debug API outrightOptions, per module
Provider selectionPick which tunnel, launcher or AI provider is usedOptions, per module
Startup scanningStop the image and document folder indexes rescanning at startupOptions > gallery modules

So a Calc user is already down to 48 tools without touching anything, and a custom endpoint takes that to whatever you like.

What Nelson deliberately does not have is a switch to stop a module loading. It would be a seventh overlapping control, and it would buy very little: a full startup is ~370 ms for 31 modules, and the optional families are already invisible in the tool list. See #29 for the measurements.

Development

bash
./install.sh              # Set up dev environmentmake deploy               # Build + install + restart LO + show logmake test                 # Run testsmake release              # Tag, build and publish a release (see scripts/release.sh)

See DEVEL.md for the complete developer guide and docs/modules.md for the module framework reference.

Developing with an AI agent

This project is developed with AI coding agents, using wbox-mcp to make that practical.

Nelson lives inside LibreOffice, so an agent cannot verify a change without actually running LibreOffice — and a headless process cannot show whether a logo really landed in the page header. wbox-mcp is an MCP server that hands the agent a sandboxed LibreOffice in a nested Wayland compositor: it can kill, deploy and relaunch the extension, drive the UI, read the Nelson log, and take screenshots of the result.

That closes the loop. The agent edits the code, redeploys, calls the tool through MCP, and looks at the rendered document to confirm the change — instead of assuming it worked.

Documentation

  • QUICKSTART.md — agent guide: discovery, workflows, tool patterns
  • AGENTS.md — developer cheatsheet: project structure, build pipeline, critical rules
  • docs/howto/ — user guides: Tailscale + ChatGPT, Forge, Ollama indexation, image galleries
  • docs/roadmap.md — what's planned next
  • CHANGELOG.md — version history

Acknowledgments

Nelson MCP is the result of merging and reworking two other projects:

  • LocalWriter — a LibreOffice extension that embedded a chatbot sidebar with AI providers (OpenAI-compatible APIs, Ollama, AI Horde). Originally created as LibreCalc AI Assistant by Umut Çelik, then forked and expanded by @balisujohn and significantly developed by @KeithCu (Keith Curtis) who added AI Horde support, multi-provider management, the chatbot sidebar, and Calc =PROMPT() integration. The module framework, the tool system, and the per-module config architecture were developed by @quazardous.

  • mcp-libre — a standalone LibreOffice MCP server that exposed Writer tools to external AI clients via MCP. It demonstrated that the MCP approach (external AI + document tools) was more flexible than an embedded chatbot. Nelson MCP adopts this MCP-first architecture: the chatbot and AI provider modules have been removed, and the extension focuses entirely on being a tool server for external clients.

License

MPL 2.0 — see LICENSE. The extension ships the same terms in extension/registration/license.txt, with the attribution for the code Nelson is derived from.

来源:README.md,提交 06b3b48

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

3
  1. v0.14.5最新Nov 3, 2026
  2. v0.14.4Sep 27, 2026
  3. v0.14.3Sep 22, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分