document-mcp
This server exposes MCP tools for document conversion, inspection, metadata management, font handling, and .odb database operations across a wide range of formats (docx, pptx, xlsx, odt, odp, ods, odg, odf, markdown, pdf).
Document Conversion
Convert documents between any supported formats using
convert_document.List all available conversion pairs with
list_document_conversions.Convert ODM master documents to PDF with
odm_to_pdf.Rebuild documents from a JSON
DocumentPackageusingfrom_package.
Metadata
Read metadata (title, author, subject, keywords, creator, producer, timestamps) from all supported formats with
metadata_read.Write/update metadata in-place (title, author, subject, keywords) with
metadata_write(excludes xlsx and odf for writing).
Fonts & Typography
List embedded fonts in documents (docx, pptx, odt, odp, ods, odg) with
fonts.Describe standalone .ttf/.otf font files with
describe_font_file.Optionally provide extra fonts for conversion or report rendering via
convert_documentandodb_render_report.
Document Inspection
Extract DOCX-specific extras (comments, footnotes, headers/footers, numbering) with
docx_extras.Inspect PDFs (page count, sizes, item histograms, metadata, embedded images) or obtain full layout via
pdf_inspect.
.ODB Database Operations
List tables (column names, types, row data) with
odb_tables, forms withodb_forms, and reports withodb_reports.Run bounded SQL SELECT queries or saved queries using
odb_query.Export a table to CSV with
odb_to_csvor all tables to a single XLSX workbook withodb_to_xlsx.Render .odb reports to docx, odt, or pdf, evaluating
rpt:formulas and laying out bands withodb_render_report.
Flexible I/O
All tools accept input as a filesystem path or inline base64 bytes; outputs can be written to a file or returned inline, with large responses (>5 MB) flagged large: true but never truncated.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@document-mcpconvert my resume.docx to pdf"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
document-mcp
An MCP (Model Context Protocol) server exposing
documents.js's document-conversion,.odb, metadata, and font tooling as MCP tools, so an MCP-speaking agent can convert, inspect, and edit docx/pptx/odt/odp/ods/odg/odf/pdf/odb/xlsx/markdown documents without writing TypeScript againstdocuments.jsdirectly.
document-mcp adds no conversion or editing logic of its own — it is a dispatch layer over documents.js's existing conversion functions, DocumentConverter port, and .odb/PDF readers, wired up as MCP tools served over stdio. document-cli is the sibling frontend over the identical documents.js library — a terminal CLI/TUI rather than an MCP server — so the two are independent consumers of one shared implementation and can expose different subsets of it. A convert_document call's fidelity — which (source, targetFormat) pairs round-trip losslessly, which are a best-effort reconstruction, and why — is exactly what documents.js's own Fidelity section documents, table included; it is not restated here.
graph TD
schema("document-schema.js")
ooxml("ooxml.js")
odf("odf.js")
pdfcodec("pdf-codec")
mdcodec("markdown-codec")
documents("documents.js")
mcp("document-mcp")
cli("document-cli")
schema --> ooxml
schema --> odf
schema --> pdfcodec
schema --> mdcodec
schema --> documents
ooxml --> documents
odf --> documents
pdfcodec --> documents
mdcodec --> documents
documents --> mcp
pdfcodec --> mcp
documents --> cli
odf --> cli
pdfcodec --> cli
click schema "https://github.com/ExaDev/document-schema.js" "document-schema.js"
click ooxml "https://github.com/ExaDev/ooxml.js" "ooxml.js"
click odf "https://github.com/ExaDev/odf.js" "odf.js"
click pdfcodec "https://github.com/ExaDev/pdf-codec" "pdf-codec"
click mdcodec "https://github.com/ExaDev/markdown-codec" "markdown-codec"
click documents "https://github.com/ExaDev/documents.js" "documents.js"
click mcp "https://github.com/ExaDev/document-mcp" "document-mcp"
click cli "https://github.com/ExaDev/document-cli" "document-cli"
style mcp fill:#f9a825,stroke:#333,stroke-width:3pxGetting started
Requires Node.js >=20 and pnpm 11.6.0 (pinned via packageManager in package.json).
pnpm install
pnpm build # tsdown -> dist/ (ESM + CJS + .d.ts)
pnpm typecheck # tsc --noEmit
pnpm lint # eslint . --fix --cache --max-warnings 0
pnpm test # vitest run --project unit
pnpm test:smoke # rebuilds dist/, then spawns dist/bin.js as a real subprocess and drives it over genuine MCP stdioOnce published, run the server directly via npx document-mcp (stdio transport, no install step needed).
Connecting from Claude Code / Claude Desktop
Add an entry to the client's MCP server configuration (claude mcp add for Claude Code, or the mcpServers block in Claude Desktop's config file):
{
"mcpServers": {
"document-mcp": {
"command": "npx",
"args": ["-y", "document-mcp"]
}
}
}Or, for local development against a checkout of this repository rather than the published package, point command at the built binary directly:
{
"mcpServers": {
"document-mcp": {
"command": "node",
"args": ["/absolute/path/to/document-mcp/dist/bin.js"]
}
}
}Related MCP server: docs-mcp
Document I/O
Every tool that takes or produces document bytes goes through the same two hybrid shapes, documented once here rather than repeated per tool below.
Input (DocumentInput) is a union: either a filesystem path (the format is inferred from the file extension — docx, pptx, xlsx, odt, odp, ods, odg, odf, md/markdown, pdf), or inline bytesBase64 plus an explicit format (required, since inline bytes carry no filename to infer one from). Each ODF/OOXML template and macro-enabled variant also reads as its base format: .ott/.ots/.otp/.otg/.otf as odt/ods/odp/odg/odf, and .dotx/.potx/.xltx (templates) or .docm/.xlsm/.pptm (macro-enabled) as their OOXML base — a template is the same package with a -template mimetype, and a macro-enabled file carries a vbaProject part this library reads past without executing or re-emitting. .odb tools are the one exception: a .odb has no single DocumentFormat of its own (it is a database front end, not a document — tables, saved queries, and reports are three unrelated output shapes), so their source.path/source.bytesBase64 bytes are read directly with no format inference at all.
Output (DocumentOutput), on every tool that produces a document, is a single optional outputPath: supply it to have the tool write the result to that filesystem path (the response then reports { path, byteLength }); omit it to receive the bytes inline instead ({ bytesBase64, byteLength }, flagged large: true above 5 MB — advisory only, the bytes are never truncated or refused).
Tools
Tool | Description |
| Converts a document from one supported format to another via |
| Lists every |
| Reads a document's title/author/subject/keywords/creator/producer/created-and-modified timestamps. Works across every supported format, including xlsx and odf. |
| Patches a document's title/author/subject/keywords in place. Does not convert format — source and target format must match (or both be |
| Lists every source-embedded font face a docx/pptx/odt/odp/ods/odg document carries (family, weight/style, byte length). |
| Reads a standalone |
| Reads a docx's own comments, footnotes, headers, footers, and numbering definitions — data the |
| Parses a PDF and reports a summary (page count, per-page size and item-kind histogram, metadata, embedded image formats), or the entire parsed |
| Converts a |
| Rebuilds real document bytes in a target format from a |
| Lists every table an embedded |
| Lists every form an |
| Lists every report an |
| Runs a bounded single-table |
| Extracts exactly one named table from an embedded |
| Extracts every table an embedded |
| Resolves one of an |
References
documents.js — the library this server exposes.
document-cli — the sibling CLI/TUI over the same library, whose toolchain this repository's scaffold mirrors.
Model Context Protocol — the protocol this server implements, via
@modelcontextprotocol/server.
License
MIT
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseBqualityDmaintenanceA universal MCP server for document processing, conversion, and automation. Handle PDF, DOCX, HTML, Markdown, and more through a unified API and toolset.Last updated1317139MIT
- FlicenseAqualityBmaintenanceMCP server for reading and writing .docx files. Exposes four paginated tools so agents can batch-read document content and styles, write content, and union style definitions.Last updated4
- AlicenseAqualityBmaintenanceMCP server for reading, writing, editing, formatting, and exporting Microsoft Office documents (Word, Excel, PowerPoint) via stdio JSON-RPC, with 47 tools and cross-platform support.Last updated47MIT
- FlicenseAqualityBmaintenanceDocument-engineering MCP tool server providing tools for PDF, Office, Images, and Archives extraction and conversion. It never mutates source files and requires local tesseract for OCR.Last updated12
Related MCP Connectors
MCP server for AgentDocs (agentdocs.eu): read, search, write, comment on & share Markdown docs.
OCR, transcription, file extraction, and image generation for AI agents via MCP.
PandaDoc MCP server for creating, sending, signing, and tracking PandaDoc documents.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/ExaDev/document-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server