xlvane: XLSX workbooks

io.github.DevXord由 GitHub 帳號 DevXord 發布v1.3.3更新於 Nov 5, 2026

XLSX tools: inspect, read, diff and validate workbooks; write, edit and convert with --allow-write.

已驗證STDIO僅桌面檔案與儲存資料與分析

概覽

AI 產生的概覽

針對 XLSX 活頁簿的本機 MCP 伺服器,讓助理檢查、讀取、比對與驗證試算表,並可選擇寫入、編輯或轉換檔案。

可以做什麼
  • 檢查活頁簿:工作表(含隱藏工作表)、已用範圍、標題列、欄位型別與樣本、合併儲存格、公式與警告
  • 依標題列把工作表資料列讀成物件,支援分頁,日期以 ISO 8601 回傳
  • 逐儲存格比對兩份活頁簿,並依欄位規則驗證,指出每個問題所在的儲存格
  • 將資料列寫入新的 XLSX 檔案(報表預設),或設定儲存格、附加資料列並保持其餘內容不變
  • 在 XLSX 與 CSV、TSV、JSON 之間互相轉換,CSV 輸出會跳脫類似公式的文字
適用情境
適合助理需要在本機處理試算表檔案而不寫程式的場合:檢視活頁簿結構、擷取資料列進行分析、比較兩個版本的差異,或產生與更新 XLSX 報表。
執行需求
透過 npx 從 npm 套件以 stdio 在本機執行,需要 Node.js 22 或更新版本。必須至少指定一個 --root 目錄;只有加上 --allow-write 才會註冊寫入工具。可選限制:--max-file-size、--max-rows、--max-response-chars、--max-cells。不需要帳號、API 金鑰或環境變數。
安裝前請注意
寫入工具(write_table、edit_cells、convert)僅在 --allow-write 下存在,可在根目錄內建立或取代檔案,取代需傳入 overwrite 為 true。根目錄內任何檔名都可被寫入,包括 .gitignore 等點檔案,因此要謹慎選擇根目錄。edit_cells 會照原樣寫入公式,只有用試算表軟體開啟檔案時才會計算。活頁簿中的文字會以資料形式回傳,可能含有試圖影響模型的文字;巨集不會被執行,外部連結不會被開啟。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 xlvane: XLSX workbooks,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

@xlvane/mcp

An MCP (Model Context Protocol) server for XLSX files, built on xlvane and the official MCP TypeScript SDK (@modelcontextprotocol/server 2.4.0, protocol revision 2026-07-28). An MCP client, such as a coding agent, can inspect, read, compare and validate workbooks, and optionally write, edit and convert them, through tools instead of code.

Requires Node.js 22 or later. Dependencies: xlvane and @modelcontextprotocol/server (which brings @modelcontextprotocol/core and zod).

Start

sh
npx @xlvane/mcp --root ./data                 # read-only, files inside ./datanpx @xlvane/mcp --root ./data --allow-write   # also write_table, edit_cells, convertxlvane mcp --root ./data                      # the same server, through the xlvane CLI

Many MCP clients take a configuration like this one; check your client's documentation for its exact format and file:

json
{  "mcpServers": {    "xlvane": { "command": "npx", "args": ["@xlvane/mcp", "--root", "/absolute/path/to/data"] }  }}
OptionMeaning
--root <dir>A directory the tools may use; repeat for several. Required. Relative paths in tool calls are resolved against the first one.
--allow-writeAlso offer the tools that write files. Without it they are not registered at all.
--max-file-size <bytes>Largest file read or written. Default 64 MiB.
--max-rows <n>Largest number of rows one read_table call returns. Default 1000.
--max-response-chars <n>Largest tool result (also an error), in characters of its JSON text; the message carries the same data again as structuredContent. read_table returns the rows that fit (truncated, nextOffset); other tools return XLV_E_LIMIT_EXCEEDED. Default 1 Mi (1 048 576).
--max-cells <n>Largest number of cells in a workbook a tool reads (the maxCells read limit). Default 5 000 000. Lower it when the server must answer quickly: diff holds both workbooks in memory.

The server speaks MCP over stdin and stdout; messages for people go to stderr.

Tools

ToolWritesWhat it does
inspect_workbooknoSheets (also hidden ones), used ranges, header rows, column types with samples, merged cells, formulas, warnings.
read_tablenoRows of a sheet as objects keyed by the header row; paging with offset and limit; dates as ISO 8601.
diffnoCell-by-cell differences between two workbooks.
validatenoRead warnings, and column rules (name, type, optional) with the cell of each problem.
write_tableyesRows to a new XLSX file (report preset: bold header, frozen row, autofilter, widths).
edit_cellsyesSet cells and append rows, keeping the rest of the file unchanged.
convertyesXLSX to CSV/TSV/JSON and back; CSV output escapes formula-like text.

Every tool has a JSON Schema for its input and returns its result as structuredContent and as JSON text. Errors are tool results with isError: true and the XlvError data: a stable code, the location, a hint and details (docs/errors.md).

Security

  • Directories: files are read and written only inside the --root directories. Paths are checked after symbolic links are resolved, so .., absolute paths and links that lead outside are refused (XLV_E_PATH_NOT_ALLOWED). A file is checked again after it is opened (the path must still lead to the same file), so swapping it for a link meanwhile does not help. Writing through a symbolic link is refused. A path outside the roots gets the same answer whether or not something exists there, also when it is reached through a symbolic link inside a root. Only regular files are read. Messages on stderr show control characters as \uXXXX.
  • Read-only by default: the write tools exist only with --allow-write. They create files exclusively and replace an existing file only when the call passes "overwrite": true, through a temporary file and a rename; the replacement keeps the file's permission bits (not setuid, setgid or sticky), and read-only files are not replaced. edit_cells writes formulas as given (for example HYPERLINK(...)); they are calculated when a spreadsheet application opens the file. Any file name inside a root may be written, also dot files such as .gitignore; choose the roots accordingly.
  • Limits: files above --max-file-size are refused for reading and writing (convert to JSON stops building the text at that size), workbooks above --max-cells cells are refused, and results above --max-response-chars are cut (read_table) or refused. The official MCP SDK closes the connection after a message larger than 10 MiB. The xlvane reader applies its limits for untrusted files (ZIP bombs, XML without DTDs or entities, the budgets of xlvane 1.1.1). validate lists at most 1 000 problems (problemsTotal counts all).
  • File content is data: values, sheet names and other text come from the files and may contain any text, also text meant to influence a model. The server returns it as data and does not interpret it.
  • No code execution: macros are never run, external links are never followed, and formulas are not calculated.

API

ts
import { createServer, runCli } from '@xlvane/mcp';

createServer({ roots, allowWrite, maxFileBytes, maxRows, maxResponseChars, maxCells, cwd }) returns an McpServer to connect to any transport; runCli(args) is the command line.

Links

License: MIT. The MCP SDK is licensed under Apache-2.0.

來源:packages/mcp/README.md,提交 3a56eb8

工具

0
SourceWeft 曾在隔離沙箱中以無憑證方式啟動該軟體包一次,以列出其工具,但未能完成:伺服器未能啟動。

版本歷史

4
  1. v1.3.3最新Nov 5, 2026
  2. v1.3.2Nov 4, 2026
  3. v1.3.0Nov 4, 2026
  4. v1.2.2Nov 3, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分