Skip to main content
Glama

office-mcp

test license: MIT python

MCP server that turns JSON into real files. Excel, Word, CSV — no code generation, no broken binaries, no openpyxl in your context window.

LLMs cannot reliably emit a valid .xlsx. They can write Python that sometimes does, without formatting, formulas, column widths or multiple sheets — and they burn 200 lines of context doing it. This server replaces that with one tool call: 15 lines of JSON in, a proper file out.

agent → make_xlsx({path, sheets}) → report.xlsx with styled headers, number
        formats, frozen panes, autofilter and a =SUM total row

Install

uvx --from git+https://github.com/xxxsonaaaaaa-maker/office-mcp office-mcp

No npm account, no PyPI, no build step. Python 3.10+.

Related MCP server: Excel MCP Server

Configure

Any MCP client (Claude Desktop, Cursor, Windsurf, Continue, custom):

{
  "mcpServers": {
    "office": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/xxxsonaaaaaa-maker/office-mcp", "office-mcp"]
    }
  }
}

Tools

Tool

Output

Highlights

make_xlsx

.xlsx

multiple sheets, column types (text/number/money/percent/float), widths, frozen header, autofilter, =SUM totals

make_docx

.docx

headings, paragraphs, bullets, tables with a real Word style

make_csv

.csv

custom delimiter, UTF-8 BOM so Excel opens Cyrillic correctly

Example

{
  "path": "out/report.xlsx",
  "title": "October sales",
  "sheets": [{
    "name": "October",
    "columns": [
      {"header": "Item", "width": 28},
      {"header": "Qty", "type": "number"},
      {"header": "Price", "type": "money"},
      {"header": "Total", "type": "money"}
    ],
    "rows": [["Nails 90mm", 120, 12, 1440], ["Screws 4x50", 500, 3, 1500]],
    "totals": true
  }]
}

Result: out/report.xlsx, styled header row, 1440 formatted as money, =SUM(D4:D5) in the total row.

Safety

  • Relative paths only; .. is rejected — the server cannot write outside its working directory.

  • Extension must match the tool (.xlsx, .docx, .csv), otherwise the call fails with a readable message instead of writing a corrupt file.

  • Errors are returned as isError content with a human-readable reason, so the agent can fix the arguments and retry instead of guessing.

Design notes

  • Zero transport coupling. office_core.py is pure dict → bytes. The MCP layer, a CLI or an HTTP API are thin wrappers over the same core.

  • No storage. Files are written locally; nothing is uploaded anywhere.

  • No magic. The server compiles a spec. It does not invent content, call an LLM, or require a key.

Status

v0.1 — XLSX, DOCX, CSV. PPTX and PDF are next; see PLAN.md.

License

MIT

Available Tools

3 tools
make_csvB

Создаёт CSV с настраиваемым разделителем и BOM (для корректного открытия в Excel с кириллицей). Для простых выгрузок, когда Excel не нужен.

Inputs: path (required), rows (required), bom, columns, +1 more.

make_docxA

Создаёт документ Word (.docx): заголовки, абзацы, маркированные списки, таблицы. Используй для договоров, писем, ТЗ, отчётов и любых текстовых документов.

Inputs: path (required), blocks (required), title.

make_xlsxA

Создаёт настоящий Excel-файл (.xlsx) из JSON-описания: листы, колонки с шириной и типом (text/number/money/percent/float), строки, строка «Итого» с формулами SUM. Используй, когда пользователь просит таблицу, отчёт, смету или выгрузку в Excel.

Inputs: path (required), sheets (required), title.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 3 tools

    Disambiguation4/5

    Each tool maps to a distinct output format (xlsx, docx, csv), and the descriptions explicitly differentiate use cases (e.g., make_csv is for simple exports when Excel isn't needed). The only mild overlap is between make_xlsx and make_csv for tabular data, but the guidance resolves it well.

    Naming Consistency5/5

    All three tools follow a clean, predictable verb_noun pattern (make_xlsx, make_docx, make_csv) with consistent casing and format suffixes. There is no deviation or ambiguity in naming style.

    Tool Count4/5

    Three tools is at the low end but each is well-defined and earns its place for document generation. For a broad 'office' scope one might expect a few more (e.g., pptx), so it's slightly under-scoped rather than excessive.

    Completeness3/5

    The surface covers creation for three common formats but is generation-only: there is no ability to read, parse, or edit existing files, and PowerPoint is absent. These notable gaps limit the server to one-way output workflows.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers