Extract text, keywords, and language information from various file formats and chunk text for RAG pipelines.
Also known as opafex/opafex-mcps, @opafex/mcp-file-processor
- Stars
- 0
- Tools
- 6
- Downloads, 30 days
- —
- Latest version
- 0.1.1
- Last commit
- Nov 13, 2026
- License
- MIT
What is file-processor MCP?
file-processor extracts text, keywords, and language information from various file formats and chunk text for RAG pipelines. It exposes 6 tools, such as extract_text, extract_keywords, detect_language.
Summary generated from the project's README
About file-processor MCP server
Preparing documents for retrieval-augmented generation pipelines is what this server enables for developers. It provides a way to transform various file formats into structured text, keywords, and manageable segments. By using tools like extract_text and chunk_text, users can convert binary files such as PDF and DOCX or text-based files like Markdown, CSV, and JSON into data ready for embedding.
Running locally via Node.js 20+, the server requires no API keys or external accounts to function. It can be integrated into Claude Desktop or Claude Code using npx. The server offers specialized capabilities including detect_language to distinguish between natural language and programming languages like TypeScript or Python, and extract_keywords to identify frequent terms. For complex workflows, the process_file tool combines extraction, language detection, keyword ranking, and text chunking into a single command.
What you can do with it
- 1Prepare documents for RAGSplit large text files into overlapping segments to improve retrieval accuracy in embedding pipelines.
- 2Extract metadata from filesIdentify the primary keywords and their frequency within a specific document.
- 3Identify programming languagesDetermine if a file contains natural language or specific code like Java or Rust.
Written from the project's README. Every use case is checked against a quote from it.
How to install file-processor MCP
Formats verified 10 Nov 2026Add to CursorAdd to GooseInstall file-processor MCP in Claude Code
$ claude mcp add mcp-file-processor -- npx -y @opafex/mcp-file-processorInstall file-processor MCP in Cursor
~/.cursor/mcp.json
{
"mcpServers": {
"mcp-file-processor": {
"command": "npx",
"args": [
"-y",
"@opafex/mcp-file-processor"
]
}
}
}Install file-processor MCP in VS Code
.vscode/mcp.json
{
"servers": {
"mcp-file-processor": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@opafex/mcp-file-processor"
]
}
}
}Install file-processor MCP in VS Code CLI
$ code --add-mcp '{"name":"mcp-file-processor","type":"stdio","command":"npx","args":["-y","@opafex/mcp-file-processor"]}'Install file-processor MCP in Claude Desktop
claude_desktop_config.json
{
"mcpServers": {
"mcp-file-processor": {
"command": "npx",
"args": [
"-y",
"@opafex/mcp-file-processor"
]
}
}
}Install file-processor MCP in Codex
$ codex mcp add mcp-file-processor -- npx -y @opafex/mcp-file-processorInstall file-processor MCP in Codex config.toml
~/.codex/config.toml
[mcp_servers.mcp-file-processor] command = "npx" args = ["-y", "@opafex/mcp-file-processor"]
Install file-processor MCP in Gemini CLI
$ gemini mcp add -s user mcp-file-processor npx -- -y @opafex/mcp-file-processorInstall file-processor MCP in Gemini settings.json
~/.gemini/settings.json
{
"mcpServers": {
"mcp-file-processor": {
"command": "npx",
"args": [
"-y",
"@opafex/mcp-file-processor"
]
}
}
}Started by HostedMCP on 16 Nov 2026
We ran this command for @opafex/mcp-file-processor 0.1.1 in an isolated container with no network and no keys. It answered and listed 6 tools.
file-processor MCP tools 6
Read from the server with tools/listextract_textExtract 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_keywordsExtract ranked keywords from text. Returns keywords sorted by frequency, useful for tagging, search indexing, and topic identification.
detect_languageDetect 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_textSplit text into overlapping chunks suitable for RAG/embedding pipelines. Configurable chunk size and overlap. Returns chunks with positional metadata.
process_fileAll-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_infoReturns server metadata: name, version, registered tools, and registered resources. Useful for introspection and health checks.
Automated checks
Ran Nov 14, 2026Full report →Passed our automated checks. That is not a security audit: read the code and give the server the narrowest access it needs. How checks work
- Source repository linked and reachableopafex/opafex-mcps is public and reachablegithub.com/opafex/opafex-mcps ↗Pass
- Package names this repository as its source@opafex/mcp-file-processor names opafex/opafex-mcps as sourcenpmjs.com/package/@opafex/mcp-file-processor ↗Pass
- Build provenance (Sigstore attestation)No build attestation published for this releaseNot checked
- Open source license (OSI)MITspdx.org/licenses/MIT.html ↗Pass
- Commit or release in the last yearLast commit or release 2026-11-09github.com/opafex/opafex-mcps ↗Pass
- OpenSSF ScorecardNot checked
- Package name not close to a popular packageNo popular package one edit away from @opafex/mcp-file-processorPass
- No critical advisory in the package or its dependencies125 resolved dependencies checked; no critical advisoryosv.dev ↗Pass
- No hidden instructions to the model4 tool descriptions and the README read; no override phrases, credential paths or hidden charactersPass
- Destructive tools are labelledNo tool named like delete, drop or execPass
- Remote endpoint answers the MCP handshakeNot checked
README
View on GitHub@opafex/mcp-file-processor
MCP server for universal text extraction, keyword extraction, language detection, and text chunking — designed for RAG pipelines.
Supports PDF, DOCX, CSV, JSON, Markdown, HTML, and code files. Zero platform dependencies.
Installation
npm install @opafex/mcp-file-processor
Requires Node.js 20+.
Quick Start
Add to Claude Code / Claude Desktop
{
"mcpServers": {
"file-processor": {
"command": "npx",
"args": ["@opafex/mcp-file-processor"]
}
}
}
No API keys needed — everything runs locally.
Tools
extract_text
Extract text content from a file.
| Parameter | Type | Required | Description |
|---|---|---|---|
content |
string | Yes | File content — base64 for binary formats (PDF, DOCX), raw text for text formats |
fileType |
string | Yes | MIME type (e.g. "application/pdf") or extension (e.g. ".pdf", "pdf") |
{
"success": true,
"text": "Extracted text content here...",
"wordCount": 142,
"pageCount": 3,
"processingTimeMs": 45
}
extract_keywords
Extract ranked keywords from text. Filters stop words, sorted by frequency.
| Parameter | Type | Required | Description |
|---|---|---|---|
text |
string | Yes | Text to extract keywords from |
limit |
number | No | Max keywords to return (default: 20) |
{
"success": true,
"keywords": [
{ "word": "javascript", "frequency": 8 },
{ "word": "framework", "frequency": 4 },
{ "word": "react", "frequency": 3 }
],
"totalWords": 156
}
detect_language
Detect whether content is code, natural language, or mixed.
| Parameter | Type | Required | Description |
|---|---|---|---|
text |
string | Yes | Text to analyse |
fileName |
string | No | File name for extension-based detection (e.g. "app.ts") |
{
"success": true,
"contentType": "code",
"programmingLanguage": "typescript"
}
chunk_text
Split text into overlapping chunks for RAG/embedding pipelines.
| Parameter | Type | Required | Description |
|---|---|---|---|
text |
string | Yes | Text to chunk |
chunkSize |
number | No | Target chunk size in characters (default: 1000) |
overlap |
number | No | Overlap between chunks in characters (default: 200) |
{
"success": true,
"chunks": [
{ "index": 0, "text": "...", "startOffset": 0, "endOffset": 1000, "wordCount": 167 },
{ "index": 1, "text": "...", "startOffset": 800, "endOffset": 1800, "wordCount": 172 }
],
"totalChunks": 5,
"totalCharacters": 4200
}
process_file
All-in-one: extract text, detect content type, extract keywords, and chunk.
| Parameter | Type | Required | Description |
|---|---|---|---|
content |
string | Yes | File content (base64 or raw text) |
fileType |
string | Yes | MIME type or file extension |
chunkSize |
number | No | Chunk size in characters (default: 1000) |
chunkOverlap |
number | No | Overlap in characters (default: 200) |
keywordLimit |
number | No | Max keywords (default: 20) |
server_info (built-in)
Returns server metadata, registered tools, and resources.
Resources
| Resource | Description |
|---|---|
file-processor://supported-types |
Lists all supported MIME types and file extensions |
Supported Formats
| Format | Extension | Input |
|---|---|---|
.pdf |
base64 | |
| Word | .docx, .doc |
base64 |
| Plain text | .txt |
raw text |
| Markdown | .md |
raw text |
| CSV | .csv |
raw text |
| JSON | .json |
raw text |
| HTML | .html |
raw text |
| XML | .xml |
raw text |
| JavaScript | .js, .jsx, .mjs |
raw text |
| TypeScript | .ts, .tsx |
raw text |
| Python | .py |
raw text |
| Java | .java |
raw text |
| Go | .go |
raw text |
| Rust | .rs |
raw text |
| C/C++ | .c, .cpp, .h |
raw text |
Development
npm run build # Compile TypeScript
npm run dev # Run with tsx
npm test # Run tests
npm start # Run compiled server
Library Usage
import { FileProcessorService } from '@opafex/mcp-file-processor/service';
const service = new FileProcessorService();
const result = await service.processFile(
'Hello world, this is a document.',
'.txt',
500, // chunk size
100 // overlap
);
Contributing
Found a bug or have a feature request? Open an issue.
License
MIT — see LICENSE.
file-processor MCP questions
How do I add file-processor MCP to Claude Code?
Run claude mcp add mcp-file-processor -- npx -y @opafex/mcp-file-processor in your terminal. Add --scope user to make it available in every project.
How do I add file-processor MCP to Cursor?
Open ~/.cursor/mcp.json and add the server under mcpServers, using the Cursor config shown in the install section above.
What tools does file-processor MCP provide?
It exposes 6 tools, including extract_text, extract_keywords, detect_language, chunk_text, process_file.
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.