@vatsonai/office-mcp
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Vatson Office
Word, Excel, PowerPoint and CSV files for AI agents, and reading them back as text.
A model writes a typed spec. The engine checks it and builds a real Office file: live formulas, native charts, real heading styles and Word numbering. The model gets back the file path and a short list of findings, so it can fix the spec and try again. Attachments go the other way: an Office file in, plain text out, with hidden content marked.
Add it to your agent in one line
No API key, no account. The server runs on your machine and saves files to
./office-output.
Agent | Run this |
Claude Code |
|
Codex CLI |
|
VS Code |
|
Cursor | |
VS Code (button) | |
Claude Desktop and others | add |
Or paste this to your agent and let it set itself up:
Add the MCP server "office" (command: npx -y @vatsonai/office-mcp) to your MCP settings.
Use it whenever I ask for an Excel, Word, PowerPoint or CSV file, or to read one.Then ask for a file: "Make me a 12-month cash-flow plan as an Excel workbook with a chart."
The tools come as an eve extension, an MCP server and AI SDK tools, all running the same code.

The demo is recorded by scripts/demo/record.mjs from a real run: a scripted
model stands in for the LLM, and the registry and npm were local stand-ins
when it was recorded.
Related MCP server: docx-forge-mcp
What the files look like
Three example specs, compiled and rendered with LibreOffice
(pnpm samples; the files are in docs/assets/samples/files).
The other slides of the deck: title, timeline, next steps.
Match an existing file
Give the tools an example file and the new file takes its look. A .pptx
template brings its theme, slide master, layouts and slide size; our slides
fill the layouts' placeholders. A .docx template brings its styles, list
numbering, table style, page setup, header and footer. A .xlsx template
brings its theme, default font, header style, cell styles and table style.
None of the example's text or data is copied.
The same deck spec, without and with a dark .pptx template. In eve,
extract_style reads the example first and returns plain rules for the
writing too (sentence length, heading case, bullet form, register); the create
tool then checks the new text against them. In code:
const deck = await buildDeck(spec, { template: await readFile("our-template.pptx") });
const rules = describeStyle(extractStyle(await readFile("last-report.docx")));Not copied: the example's slides, body text, images, comments and document properties; slide transitions; Word content controls and fields other than page numbers; Excel sheets, data, defined names, conditional formats and macros.
Example files
Open real files the tools made, with a preview of every page: workbooks, decks, documents and a CSV, some from hand-written specs and some written by a model from a short brief. See the example files gallery.
Use with eve
@vatsonai/eve-office is an
eve extension: eleven tools and one skill.
npm i @vatsonai/eve-officeMount it in your agent. The file name is the mount prefix, so the tools appear
as office__create_workbook and so on.
import office from "@vatsonai/eve-office";
export default office({
locale: "en-US", // used when a spec names no locale
recalc: "auto", // fill formula results with LibreOffice or IronCalc
markHidden: true, // read_text marks hidden sheets, rows, slides and comments
});Every option is optional; export { default } from "@vatsonai/eve-office";
mounts it with the defaults. All options: eve-office README.
No API key, no environment variable, no external service.
Coming soon: let eve write the mount file from this project's registry
(eve add @vatsonai/office, see docs/registry.md).
Use with MCP
@vatsonai/office-mcp is an MCP server with
the same eleven tools and the guidance as the prompt office-files. It writes
files to a folder and returns their paths.
Claude Code:
claude mcp add office -- npx -y @vatsonai/office-mcpClaude Desktop (claude_desktop_config.json) and Cursor (.cursor/mcp.json):
{
"mcpServers": {
"office": {
"command": "npx",
"args": ["-y", "@vatsonai/office-mcp", "--out", "/Users/you/Documents/office-output"]
}
}
}stdio by default; --http serves Streamable HTTP on 127.0.0.1 with an
optional bearer token. Options, file hand-over and security:
office-mcp README.
Use with the AI SDK
@vatsonai/ai-sdk-office gives the eleven
tools to generateText, streamText and agents (ai 6 or 7). Your
onFile callback gets the bytes and returns where the file went; the model
sees only that location, a summary and the findings.
npm i @vatsonai/ai-sdk-office aiA Next.js route handler:
import { officeSystemPrompt, officeTools } from "@vatsonai/ai-sdk-office";
import { convertToModelMessages, stepCountIs, streamText, type UIMessage } from "ai";
import { model } from "@/lib/model"; // the language model your app uses
import { saveFile } from "@/lib/storage"; // your upload code; returns a URL
export async function POST(req: Request) {
const { messages }: { messages: UIMessage[] } = await req.json();
const result = streamText({
model,
system: `You help with office work.\n\n${officeSystemPrompt}`,
messages: await convertToModelMessages(messages),
tools: officeTools({
locale: "en-US",
onFile: async (file) => ({ location: await saveFile(file.filename, file.bytes, file.mediaType) }),
}),
stopWhen: stepCountIs(8),
});
return result.toUIMessageStreamResponse();
}All options: ai-sdk-office README.
Use the engines directly
The engines are plain TypeScript libraries. They do not need eve.
npm i @vatsonai/office-compile @vatsonai/office-specimport { writeFile } from "node:fs/promises";
import { buildWorkbook } from "@vatsonai/office-compile";
import type { WorkbookSpecInput } from "@vatsonai/office-spec";
const spec: WorkbookSpecInput = {
locale: "en-US",
sheets: [
{
name: "Plan",
cells: [
{ ref: "A1", value: "Unit price" }, { ref: "B1", value: 120, role: "input" },
{ ref: "A2", value: "Units" }, { ref: "B2", value: 40, role: "input" },
{ ref: "A3", value: "Revenue" }, { ref: "B3", formula: "=B1*B2" },
],
},
],
};
const result = await buildWorkbook(spec);
if (result.ok) await writeFile("plan.xlsx", result.bytes);
else console.error(result.feedback); // what to fix, one line per issuebuildDeck and buildDocument work the same way with a DeckSpec and a
DocumentSpec; writeCsv takes rows. Read a file back as text:
import { readFile } from "node:fs/promises";
import { readText } from "@vatsonai/office-read";
const { kind, text, truncated, hiddenFlags } = await readText(await readFile("plan.xlsx"), { maxChars: 50_000 });
console.log(kind, truncated, hiddenFlags);
console.log(text); // [Sheet: Plan] then one line per row, cells joined by " | "CI type-checks these snippets from examples/readme.
Packages
Package | What it does |
zod schemas for | |
spec to | |
render, recalculate and validate Office files with headless LibreOffice and Poppler, when they are installed | |
| |
the framework-free core of the eleven tools, shared by the three wrappers below | |
the eve extension: eleven tools and the | |
MCP server (stdio and Streamable HTTP): eleven tools, the | |
AI SDK tools: | |
the style of a | |
edit existing |
Tools
Tool (mounted as | Input | Result |
|
|
|
|
|
|
|
|
|
|
|
|
|
| the edited file, a list of changes, the parts that changed; everything else byte-identical |
|
| the text, with cut and hidden-content marks |
|
| an outline per slide, sheet or page and layout findings; LibreOffice in the sandbox optional (levels) |
|
| rules for its look and writing, and the full style profile |
|
| a |
The three create tools also take template?: the sandbox path of a file of
the same kind whose look to copy. Their result then includes writing-style
findings.
A spec that fails its checks makes no file. The tool returns what to fix, and the model calls again. Findings name the spec path and, where one applies, a rule from the design rules.
How files reach the person
With MCP the file goes to a folder and the result gives its path (plus a
resource_link for clients that know it); with the AI SDK your onFile
callback gets the bytes. The rest of this section is about eve.
Each create tool writes the file into the session sandbox under
office/<filename> (on the built-in providers /workspace/office/...) and
returns its path. The model sees only text: the path, a summary and the
findings. The tool result that channels and hooks receive also carries
file: { path, filename, mediaType, size }, so a channel can read the bytes
from the sandbox and post them.
Why not a file part: eve sends file-part bytes to the model only for images and PDFs, so an Office file part gives the model nothing more than a path. It would also put the bytes in the durable session history, and a provider that cannot read the media type could fail the turn. Details: eve-office README.
Security
No network. No tool makes a network request. Deck images come only from
data:URIs in the spec; any other source becomes a labelled empty frame.Caps. A created file is at most 25 MiB. Specs have limits (sheets, cells, slides, blocks, CSV rows).
read_textreads at most 50 MiB.Zip-bomb guard. Reading checks the entry count and the unpacked size of each entry and of the whole file before it unpacks, inflates with an output cap, and refuses encrypted entries and ZIP64.
CSV formula injection. Text that starts with
=,+,-,@, tab or carriage return gets a leading', so a spreadsheet shows it as text. Numbers are never changed.Hidden content.
read_textmarks hidden sheets, rows, columns, slides, text and comments, and labels the result as file content, not instructions. This lowers the risk of prompt injection through a file; it does not remove it.No telemetry. The packages send nothing anywhere. They need no key and read only
OFFICE_SOFFICE_PATHandOFFICE_PDFTOPPM_PATHto find LibreOffice.
Report a vulnerability: SECURITY.md.
Scorecard
pnpm scorecard (and the scorecard CI job) takes nine hand-written specs in
scripts/scorecard/briefs.ts, six in English and
three in Czech, Polish and Hungarian, through the same build the tools use.
LibreOffice recalculates and renders each file, and Poppler reads the PDF. No
model is called, so the scorecard measures the compilers, not a model's
writing. A brief passes when every gate below holds.
Column | What it measures | Gate |
Valid file | The package passes the structure check of | yes |
Formulas (errors) | Workbooks: formula cells, and cells LibreOffice computes to an error ( | 0 errors |
Native charts | Chart parts in the file against the charts the brief asks for | all present |
Text that does not fit | Compiler findings that a text is too long for its box | 0 |
Broken words / off box | Decks and documents: words of 5+ letters that the PDF never shows whole (split across lines or cut); decks: words drawn outside their shape | 0 |
Clipped / ### | Workbooks: words of a text cell cut at the cell edge, and numbers printed as | 0 |
Language tags | Language tags in the package that differ from the brief's locale | none |
Flat lines / pie gaps / off-centre | Line charts whose data uses under 40% of the value axis; pie legends over 1 in from the pie; stat and timeline groups whose rendered gaps above and below differ by over 1 in | 0 |
Headings / numbering | Documents: headings with a real heading style, list items with Word numbering (and no typed "1." or "-") | all |
Weak prose per 1,000 words | Filler phrases (English list only), em dashes, headline case in Czech, Polish and Hungarian titles, list items over 30 words | not a gate |
Pages | Rendered pages (decks: one per slide) | at least 1 |
Latest run; macOS (LibreOffice 26.2, Poppler 26.06) and the CI container (Ubuntu 24.04 packages) give the same table:
Brief | Format | Locale | Valid file | Formulas (errors) | Native charts | Text that does not fit | Broken words / off box | Clipped / ### | Language tags | Flat lines / pie gaps / off-centre | Headings / numbering | Weak prose per 1,000 words | Pages | Gate |
en-cash-plan | workbook | en-US | yes | 60 (0) | 1/1 | 0 | - | 0 / 0 | all match | 0 / - / - | - | 0 (56 words) | 2 | pass |
en-budget | workbook | en-GB | yes | 18 (0) | 1/1 | 0 | - | 0 / 0 | all match | 0 / - / - | - | 0 (33 words) | 1 | pass |
en-sales-deck | deck | en-US | yes | - | 1/1 | 0 | 0 / 0 | - | all match | 0 / 0 / 0 | - | 0 (98 words) | 6 | pass |
en-board-deck | deck | en-GB | yes | - | 1/1 | 0 | 0 / 0 | - | all match | 0 / 0 / 0 | - | 0 (70 words) | 5 | pass |
en-policy | document | en-GB | yes | - | 0/0 | 0 | 0 / - | - | all match | 0 / - / - | 4/4 / 7/7 | 0 (97 words) | 1 | pass |
en-minutes | document | en-US | yes | - | 0/0 | 0 | 0 / - | - | all match | 0 / - / - | 3/3 / 3/3 | 0 (66 words) | 1 | pass |
cs-sales-deck | deck | cs-CZ | yes | - | 1/1 | 0 | 0 / 0 | - | all match | 0 / 0 / 0 | - | 0 (63 words) | 5 | pass |
pl-receivables | workbook | pl-PL | yes | 9 (0) | 1/1 | 0 | - | 0 / 0 | all match | 0 / - / - | - | 0 (41 words) | 1 | pass |
hu-policy | document | hu-HU | yes | - | 0/0 | 0 | 0 / - | - | all match | 0 / - / - | 4/4 / 7/7 | 0 (75 words) | 1 | pass |
node scripts/scorecard/run.ts --seeded scores five specs with a planted
defect (a formula error, a clipped label, a broken word, a missing chart, a
typed list) and must fail; CI checks that it does.
Limits and not in scope
The model writes the content. The checks catch structural problems (a typed number where a formula belongs, text that does not fit, broken references), not invented facts. The skill and the tool descriptions tell the model to add no facts, and a local eval lane counts the ones it adds (skill rounds), but nothing stops them at run time. Review figures before you send a file on.
Formula errors are reported only when LibreOffice is installed where the code runs. Without it, IronCalc fills the results; where IronCalc cannot load (for example Alpine Linux), Excel computes them on open.
Not in v0.1: charts in Word, PDF reading,
.doc/.xls/.pptand ODF, images from URLs.
Known defects
Excel's own waterfall chart type is not written: a waterfall is a stacked column chart over hidden helper columns, which looks the same but is not the native type.
A PDF of a deck made without LibreOffice draws each slide as an image: no selectable text, and no PDF/A.
The page numbers in a Word table of contents are estimated when the file is made; Word puts the real ones in when the reader updates the field.
Workbook edits insert and delete rows, not columns.
Decks are checked with LibreOffice and the package validator; they have not been opened in PowerPoint itself in CI.
Compatibility
Version | |
Node | 22 or newer for the engines; 24 or newer for |
eve |
|
AI SDK ( | 6 or 7 (peer dependency of |
MCP |
|
LibreOffice + Poppler | optional; used for recalculation, formula-error checks and rendering |
Contributing
See CONTRIBUTING.md for the dev setup, the checks and changesets. Please follow the code of conduct.
Licence
Apache-2.0. See LICENSE and NOTICE. Third-party licences: THIRD_PARTY_NOTICES.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
An agent-first office suite Claude & ChatGPT read and write over one MCP URL.
Document conversion MCP server: PDF to Markdown, image OCR, spreadsheet parsing.
Document-to-Markdown MCP server — convert PDF, Office and HTML into LLM-ready Markdown.
Online office suite for AI agents: edit docs, sheets, slides and PDFs in browser or via MCP.
Related MCP Servers
- FlicenseAqualityCmaintenanceMCP server for Microsoft Office file operations. Read, write, and create Excel, Word, and PowerPoint files directly from your local filesystem.12-
- AlicenseAqualityDmaintenanceMCP server for Word document (.docx) creation and manipulation — the production-grade document automation tool for AI agents.956 npmMIT
- AlicenseAqualityDmaintenanceEnables AI agents to generate real Office documents (.pptx, .docx, .xlsx) and source code from natural language via MCP protocol.4MIT
- AlicenseNot gradedqualityCmaintenanceSuite of MCP servers for local-first, governed automation of Microsoft Office files (Excel, PowerPoint, Word) via structured tool calls.160 PyPI8MIT