Skip to content

klpanagi/mcp-document-reader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MCP Document Reader

A Model Context Protocol (MCP) server for extracting text content from office documents. Pure TypeScript, zero system dependencies.

Supported Formats

Extension Format
.docx Microsoft Word
.xlsx Microsoft Excel
.pptx Microsoft PowerPoint
.odt OpenDocument Text
.ods OpenDocument Spreadsheet
.odp OpenDocument Presentation
.pdf PDF Document
.rtf Rich Text Format

Installation

OpenCode / Matrixx

Add to your .mcp.json:

{
  "mcpServers": {
    "document_reader": {
      "command": "npx",
      "args": ["-y", "@klpanagi/mcp-document-reader"]
    }
  }
}

Claude Code

Add to your Claude Code MCP settings:

{
  "mcpServers": {
    "document_reader": {
      "command": "npx",
      "args": ["-y", "@klpanagi/mcp-document-reader"]
    }
  }
}

Cursor / Other MCP Clients

Use the stdio transport with npx -y @klpanagi/mcp-document-reader as the command.

Tools

read_document

Extract text content from a document file.

Parameter Type Required Description
file_path string Yes Absolute path to the document
include_metadata boolean No Include format/size header (default: false)

get_document_info

Get metadata about a document without extracting content.

Parameter Type Required Description
file_path string Yes Absolute path to the document

list_supported_formats

List all supported document formats. No parameters.

Configuration

Environment variables for tuning:

Variable Default Description
MAX_FILE_SIZE_MB 50 Maximum file size to process
MAX_OUTPUT_CHARS 500000 Truncation limit for extracted text

Development

bun install
bun test
bun run build

License

MIT

About

A Model Context Protocol (https://modelcontextprotocol.io) server for extracting text from office documents. Supports DOCX, XLSX, PPTX, PDF, ODT, ODS, ODP, and RTF. Pure TypeScript, zero system dependencies. Powered by officeparser (https://github.com/harshankur/officeParser).

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors