document-mcp 4.0.1 → 4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2026 ExaDev
3
+ Copyright (c) 2026 Joseph Mearman
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -64,18 +64,18 @@ The server uses **stdio transport** (runs as a local process). This is supported
64
64
 
65
65
  ### Compatibility
66
66
 
67
- | Client | Transport | Direct support |
68
- |---|---|---|
69
- | Claude Code (CLI) | stdio | ✅ |
70
- | Claude Code (plugin) | stdio | ✅ |
71
- | Claude Desktop | stdio | ✅ |
72
- | Codex CLI | stdio | ✅ |
73
- | Codex Desktop | stdio | ✅ |
74
- | OpenCode | stdio | ✅ |
75
- | Claude Team/Enterprise (org) | stdio (per-machine) | ✅ via managed settings |
76
- | Claude Web (claude.ai) | HTTP/SSE only | ❌ needs remote transport |
77
- | Claude Mobile (iOS/Android) | HTTP/SSE only | ❌ needs remote transport |
78
- | ChatGPT (web/desktop) | HTTP only | ❌ needs remote transport |
67
+ | Client | Transport | Direct support |
68
+ | ---------------------------- | ------------------- | ------------------------- |
69
+ | Claude Code (CLI) | stdio | ✅ |
70
+ | Claude Code (plugin) | stdio | ✅ |
71
+ | Claude Desktop | stdio | ✅ |
72
+ | Codex CLI | stdio | ✅ |
73
+ | Codex Desktop | stdio | ✅ |
74
+ | OpenCode | stdio | ✅ |
75
+ | Claude Team/Enterprise (org) | stdio (per-machine) | ✅ via managed settings |
76
+ | Claude Web (claude.ai) | HTTP/SSE only | ❌ needs remote transport |
77
+ | Claude Mobile (iOS/Android) | HTTP/SSE only | ❌ needs remote transport |
78
+ | ChatGPT (web/desktop) | HTTP only | ❌ needs remote transport |
79
79
 
80
80
  ### Connecting from Claude Code
81
81
 
@@ -96,7 +96,7 @@ claude plugin install document-mcp@exadev
96
96
 
97
97
  Or from within a running Claude Code session:
98
98
 
99
- ```
99
+ ```text
100
100
  /plugin marketplace add ExaDev/document-mcp
101
101
  /plugin install document-mcp@exadev
102
102
  ```
@@ -202,26 +202,26 @@ Every tool that takes or produces document bytes goes through the same two hybri
202
202
 
203
203
  ## Tools
204
204
 
205
- | Tool | Description |
206
- | --- | --- |
207
- | `convert_document` | Converts a document from one supported format to another via `documents.js`'s `DocumentConverter` port — docx, pptx, xlsx, odt, odp, ods, odg, odf, markdown, and pdf. Not every `(source, targetFormat)` pair is direct; call `list_document_conversions` first. |
208
- | `list_document_conversions` | Lists every `(source, target)` format pair `convert_document` actually supports. |
209
- | `metadata_read` | Reads a document's title/author/subject/keywords/creator/producer/created-and-modified timestamps. Works across every supported format, including xlsx and odf. |
210
- | `metadata_write` | Patches a document's title/author/subject/keywords in place. Does not convert format — source and target format must match (or both be `pdf`); odf (a standalone formula document) is rejected as either, since it has no write path back out at all. |
211
- | `fonts` | Lists every source-embedded font face a docx/pptx/odt/odp/ods/odg document carries (family, weight/style, byte length). |
212
- | `describe_font_file` | Reads a standalone `.ttf`/`.otf` font file and reports the family/bold/italic triple it declares about itself. |
213
- | `docx_extras` | Reads a docx's own comments, footnotes, header/footer parts, and numbering definitions — data the `ContentDocument` pivot cannot carry, so no other tool sees it. |
214
- | `pdf_inspect` | Parses a PDF and reports a summary (page count, per-page size and item-kind histogram, metadata, embedded image formats), or with `full: true` the entire parsed `LayoutDocument` as plain JSON — no `$schema` stamp, since that family moved to `pdf-codec` at `document-schema.js` 4.0.0 and lost its schema-stamped envelope. |
215
- | `odm_to_pdf` | Converts a `.odm` (ODF master document) to PDF. A `.odm` never carries its chapters' content inline, so each chapter resolves via a caller-supplied `chapters` href-to-document map and/or a `chaptersDir` searched by basename. |
216
- | `from_package` | Rebuilds real document bytes in a target format from a `DocumentTree` previously serialised to JSON (e.g. by a conversion tool's own `onDocument`/package-dump step). Only a package genuinely written by a current dump round-trips: the `$schema` URI it carries pins the `document-schema.js` release that wrote it, and a pre-4.0.0 dump (the flat `{ formatVersion, content, pages }` envelope) is rejected with an error naming the pinned release, the flat-to-tree change, and the remedy — a layout-document dump gets its own pointer, naming the move to `pdf-codec`. |
217
- | `outline_document` | Projects a document's own table of contents as structured JSON: groups (`{ text, level, children }`) for headings, list items, slides, sheets, and draw pages, leaves (`{ kind, text }`) for the content between them. The outline is over the source's own content — read through `documents.js`'s `DocumentConverter` port and built by `document-outline.js`'s `buildOutline`. |
218
- | `odb_tables` | Lists every table an embedded `.odb` database declares — column names, types, and row data — across every storage tier `documents.js` supports (HSQLDB TEXT/CACHED/BINARY, Firebird gbak backups). |
219
- | `odb_forms` | Lists every form an `.odb` database declares, with each form's own data source and field-bound controls. |
220
- | `odb_reports` | Lists every report an `.odb` database declares, with each report's own data-source command, band/group structure, and `rpt:` formula expressions. |
221
- | `odb_query` | Runs a bounded single-table `SELECT` over an embedded `.odb` database's extracted tables — given directly as SQL or by naming a saved query. No database engine involved; an unsupported construct is reported as a tool error naming it, never silently ignored. |
222
- | `odb_to_csv` | Extracts exactly one named table from an embedded `.odb` database as CSV bytes. The table name is required whenever the database declares more than one table. |
223
- | `odb_to_xlsx` | Extracts every table an embedded `.odb` database declares into one xlsx workbook, one sheet per table. |
224
- | `odb_render_report` | Resolves one of an `.odb` database's own reports — its data-bound command run through the bounded SQL engine, its `rpt:` formulas evaluated, its bands laid out — and renders the result to docx, odt, or pdf. |
205
+ | Tool | Description |
206
+ | --------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
207
+ | `convert_document` | Converts a document from one supported format to another via `documents.js`'s `DocumentConverter` port — docx, pptx, xlsx, odt, odp, ods, odg, odf, markdown, and pdf. Not every `(source, targetFormat)` pair is direct; call `list_document_conversions` first. |
208
+ | `list_document_conversions` | Lists every `(source, target)` format pair `convert_document` actually supports. |
209
+ | `metadata_read` | Reads a document's title/author/subject/keywords/creator/producer/created-and-modified timestamps. Works across every supported format, including xlsx and odf. |
210
+ | `metadata_write` | Patches a document's title/author/subject/keywords in place. Does not convert format — source and target format must match (or both be `pdf`); odf (a standalone formula document) is rejected as either, since it has no write path back out at all. |
211
+ | `fonts` | Lists every source-embedded font face a docx/pptx/odt/odp/ods/odg document carries (family, weight/style, byte length). |
212
+ | `describe_font_file` | Reads a standalone `.ttf`/`.otf` font file and reports the family/bold/italic triple it declares about itself. |
213
+ | `docx_extras` | Reads a docx's own comments, footnotes, header/footer parts, and numbering definitions — data the `ContentDocument` pivot cannot carry, so no other tool sees it. |
214
+ | `pdf_inspect` | Parses a PDF and reports a summary (page count, per-page size and item-kind histogram, metadata, embedded image formats), or with `full: true` the entire parsed `LayoutDocument` as plain JSON — no `$schema` stamp, since that family moved to `pdf-codec` at `document-schema.js` 4.0.0 and lost its schema-stamped envelope. |
215
+ | `odm_to_pdf` | Converts a `.odm` (ODF master document) to PDF. A `.odm` never carries its chapters' content inline, so each chapter resolves via a caller-supplied `chapters` href-to-document map and/or a `chaptersDir` searched by basename. |
216
+ | `from_package` | Rebuilds real document bytes in a target format from a `DocumentTree` previously serialised to JSON (e.g. by a conversion tool's own `onDocument`/package-dump step). Only a package genuinely written by a current dump round-trips: the `$schema` URI it carries pins the `document-schema.js` release that wrote it, and a pre-4.0.0 dump (the flat `{ formatVersion, content, pages }` envelope) is rejected with an error naming the pinned release, the flat-to-tree change, and the remedy — a layout-document dump gets its own pointer, naming the move to `pdf-codec`. |
217
+ | `outline_document` | Projects a document's own table of contents as structured JSON: groups (`{ text, level, children }`) for headings, list items, slides, sheets, and draw pages, leaves (`{ kind, text }`) for the content between them. The outline is over the source's own content — read through `documents.js`'s `DocumentConverter` port and built by `document-outline.js`'s `buildOutline`. |
218
+ | `odb_tables` | Lists every table an embedded `.odb` database declares — column names, types, and row data — across every storage tier `documents.js` supports (HSQLDB TEXT/CACHED/BINARY, Firebird gbak backups). |
219
+ | `odb_forms` | Lists every form an `.odb` database declares, with each form's own data source and field-bound controls. |
220
+ | `odb_reports` | Lists every report an `.odb` database declares, with each report's own data-source command, band/group structure, and `rpt:` formula expressions. |
221
+ | `odb_query` | Runs a bounded single-table `SELECT` over an embedded `.odb` database's extracted tables — given directly as SQL or by naming a saved query. No database engine involved; an unsupported construct is reported as a tool error naming it, never silently ignored. |
222
+ | `odb_to_csv` | Extracts exactly one named table from an embedded `.odb` database as CSV bytes. The table name is required whenever the database declares more than one table. |
223
+ | `odb_to_xlsx` | Extracts every table an embedded `.odb` database declares into one xlsx workbook, one sheet per table. |
224
+ | `odb_render_report` | Resolves one of an `.odb` database's own reports — its data-bound command run through the bounded SQL engine, its `rpt:` formulas evaluated, its bands laid out — and renders the result to docx, odt, or pdf. |
225
225
 
226
226
  ## References
227
227
 
package/dist/bin.js CHANGED
@@ -8,7 +8,7 @@ import { existsSync, readFileSync } from "node:fs";
8
8
  import { basename, join } from "node:path";
9
9
  import { buildOutline, isOutlineNode, outlineLeafText } from "document-outline.js";
10
10
  //#region package.json
11
- var version = "4.0.1";
11
+ var version = "4.1.0";
12
12
  //#endregion
13
13
  //#region src/io/document-input.ts
14
14
  const EXTENSION_TO_FORMAT = {
package/dist/index.cjs CHANGED
@@ -7,7 +7,7 @@ let node_fs = require("node:fs");
7
7
  let node_path = require("node:path");
8
8
  let document_outline_js = require("document-outline.js");
9
9
  //#region package.json
10
- var version = "4.0.1";
10
+ var version = "4.1.0";
11
11
  //#endregion
12
12
  //#region src/io/document-input.ts
13
13
  const EXTENSION_TO_FORMAT = {
package/dist/index.js CHANGED
@@ -6,7 +6,7 @@ import { existsSync, readFileSync } from "node:fs";
6
6
  import { basename, join } from "node:path";
7
7
  import { buildOutline, isOutlineNode, outlineLeafText } from "document-outline.js";
8
8
  //#region package.json
9
- var version = "4.0.1";
9
+ var version = "4.1.0";
10
10
  //#endregion
11
11
  //#region src/io/document-input.ts
12
12
  const EXTENSION_TO_FORMAT = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "document-mcp",
3
- "version": "4.0.1",
3
+ "version": "4.1.0",
4
4
  "description": "MCP (Model Context Protocol) server exposing documents.js's document-conversion, .odb, metadata, and font tooling as MCP tools.",
5
5
  "type": "module",
6
6
  "repository": {
@@ -87,34 +87,24 @@
87
87
  "packageManager": "pnpm@11.6.0",
88
88
  "dependencies": {
89
89
  "@modelcontextprotocol/server": "^2.0.0",
90
- "document-outline.js": "^3.0.0",
91
- "documents.js": "^6.0.1",
90
+ "document-outline.js": "^3.1.0",
91
+ "documents.js": "^6.1.0",
92
92
  "zod": "^4.2.0"
93
93
  },
94
94
  "devDependencies": {
95
95
  "@arethetypeswrong/cli": "^0.18.5",
96
96
  "@cloudflare/vitest-pool-workers": "^0.20.2",
97
- "@commitlint/cli": "^21.2.1",
98
- "@commitlint/config-conventional": "^21.2.0",
99
- "@eslint/js": "^10.0.1",
100
97
  "@modelcontextprotocol/client": "^2.0.0",
101
- "@semantic-release/changelog": "^7.0.0",
102
- "@semantic-release/exec": "^7.1.0",
103
- "@semantic-release/git": "^11.0.1",
104
98
  "@types/node": "^26.1.2",
105
99
  "@vitest/coverage-v8": "^4.1.10",
106
100
  "eslint": "^10.8.0",
107
- "globals": "^17.8.0",
108
101
  "husky": "^9.1.7",
109
- "lint-staged": "^17.3.0",
110
- "odf.js": "^6.0.0",
111
- "pdf-codec": "^3.4.4",
102
+ "odf.js": "^6.1.0",
112
103
  "publint": "^0.3.22",
113
104
  "semantic-release": "^25.0.8",
114
105
  "tsdown": "^0.22.14",
115
106
  "turbo": "^2.10.8",
116
107
  "typescript": "^6.0.3",
117
- "typescript-eslint": "^8.65.0",
118
108
  "vitest": "^4.1.10"
119
109
  }
120
110
  }