Skip to content

Liu-ErMeng/mcps

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

File Parser MCP Server

A Model Context Protocol (MCP) server that parses PDF, DOCX, and Excel files into text/markdown format.

Features

  • PDF: Extract text content from PDF files
  • DOCX: Extract raw text from Word documents
  • Excel/XLSX: Convert spreadsheets to CSV format with sheet separation

Installation

npm install

OpenCode Configuration

Add 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.

Usage

Once configured, you can use the parse_document tool in OpenCode:

// Example usage
{
  "name": "parse_document",
  "arguments": {
    "path": "/Users/name/document.pdf"
  }
}

Supported Formats

  • .pdf - PDF documents
  • .docx - Word documents
  • .xlsx - Excel files
  • .xls - Excel files (legacy format)

Deployment

Local Deployment

  1. Clone this repository
  2. Run npm install
  3. Update your OpenCode configuration with the local path

Remote Deployment

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

Dependencies

  • @modelcontextprotocol/sdk - MCP SDK
  • pdf-parse - PDF parsing
  • mammoth - DOCX parsing
  • xlsx - Excel parsing

License

ISC

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors