# file-processor MCP server

> Extract text, keywords, and language information from various file formats and chunk text for RAG pipelines.

- Repository: https://github.com/opafex/opafex-mcps
- Page: https://hostedmcp.org/servers/opafex/mcp-file-processor
- Transport: stdio
- Stars: 0
- License: MIT
- Latest version: 0.1.1

## Install

### Claude Code

```sh
claude mcp add mcp-file-processor -- npx -y @opafex/mcp-file-processor
```

### Cursor (`~/.cursor/mcp.json`)

```json
{
  "mcpServers": {
    "mcp-file-processor": {
      "command": "npx",
      "args": [
        "-y",
        "@opafex/mcp-file-processor"
      ]
    }
  }
}
```

### VS Code (`.vscode/mcp.json`)

```json
{
  "servers": {
    "mcp-file-processor": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@opafex/mcp-file-processor"
      ]
    }
  }
}
```

### VS Code CLI

```sh
code --add-mcp '{"name":"mcp-file-processor","type":"stdio","command":"npx","args":["-y","@opafex/mcp-file-processor"]}'
```

### Claude Desktop (`claude_desktop_config.json`)

```json
{
  "mcpServers": {
    "mcp-file-processor": {
      "command": "npx",
      "args": [
        "-y",
        "@opafex/mcp-file-processor"
      ]
    }
  }
}
```

### Codex

```sh
codex mcp add mcp-file-processor -- npx -y @opafex/mcp-file-processor
```

### Codex config.toml (`~/.codex/config.toml`)

```toml
[mcp_servers.mcp-file-processor]
command = "npx"
args = ["-y", "@opafex/mcp-file-processor"]
```

### Gemini CLI

```sh
gemini mcp add -s user mcp-file-processor npx -- -y @opafex/mcp-file-processor
```

### Gemini settings.json (`~/.gemini/settings.json`)

```json
{
  "mcpServers": {
    "mcp-file-processor": {
      "command": "npx",
      "args": [
        "-y",
        "@opafex/mcp-file-processor"
      ]
    }
  }
}
```

## Tools (6)

- `extract_text`: Extract text content from a file. Supports PDF, DOCX, CSV, JSON, Markdown, HTML, and code files. Pass file content as base64 (for binary formats like PDF/DOCX) or raw text (for text formats). Returns extracted text, word count, and processing time.
- `extract_keywords`: Extract ranked keywords from text. Returns keywords sorted by frequency, useful for tagging, search indexing, and topic identification.
- `detect_language`: Detect whether content is code, natural language, or mixed. Optionally detects the programming language from file extension. Useful for routing content to appropriate processing pipelines.
- `chunk_text`: Split text into overlapping chunks suitable for RAG/embedding pipelines. Configurable chunk size and overlap. Returns chunks with positional metadata.
- `process_file`: All-in-one file processing: extract text, detect content type, extract keywords, and chunk for RAG. Returns the complete processed result in a single call.
- `server_info`: Returns server metadata: name, version, registered tools, and registered resources. Useful for introspection and health checks.

## FAQ

### What file formats are supported?

The server supports PDF, DOCX, CSV, JSON, Markdown, HTML, XML, and various programming languages like JavaScript, TypeScript, Python, and Rust.

### Do I need an API key to use this server?

No, the server runs entirely locally and does not require any API keys.

### What are the system requirements?

You need Node.js version 20 or higher installed.

### How can I split text for RAG pipelines?

You can use the chunk_text tool to split text into overlapping segments with customizable chunk sizes and overlaps.
