A Model Context Protocol (MCP) server that parses PDF, DOCX, and Excel files into text/markdown format.
- PDF: Extract text content from PDF files
- DOCX: Extract raw text from Word documents
- Excel/XLSX: Convert spreadsheets to CSV format with sheet separation
npm installAdd this MCP server to your OpenCode configuration at ~/.config/opencode/opencode.json:
{
"mcp": {
"file-parser": {
"type": "local",
"command": ["node", "/path/to/mcps/index.js"],
"enabled": true
}
}
}Replace /path/to/mcps/index.js with the actual absolute path to the index.js file on your system.
Once configured, you can use the parse_document tool in OpenCode:
// Example usage
{
"name": "parse_document",
"arguments": {
"path": "/Users/name/document.pdf"
}
}.pdf- PDF documents.docx- Word documents.xlsx- Excel files.xls- Excel files (legacy format)
- Clone this repository
- Run
npm install - Update your OpenCode configuration with the local path
To deploy on a remote machine:
# 1. Copy the files to remote machine
scp -r /path/to/mcps user@remote:/destination/
# 2. On remote machine, install dependencies
cd /destination/mcps
npm install
# 3. Update OpenCode config with the new path@modelcontextprotocol/sdk- MCP SDKpdf-parse- PDF parsingmammoth- DOCX parsingxlsx- Excel parsing
ISC