Skip to main content
Glama
Jasonzld

mcp-docparser

by Jasonzld

🚀 MCP Document Parser - Portable Edition

一键部署文档解析工具 for Claude Desktop & CLI

📥 快速安装

Windows

install.bat

macOS/Linux

chmod +x install.sh
./install.sh

✨ 功能特性

  • 📄 PDF 文档解析

  • 📝 Word (docx/doc) 提取

  • 📊 Excel (xlsx/xls) 表格读取

  • 🖼️ 图片OCR (JPG/PNG/BMP等,支持中英文)

  • 📑 Markdown/HTML/CSV/JSON 支持

  • 🔍 文档分块处理

  • 📋 元数据提取

💾 资源占用

对比项

MCP Parser

RAGFlow

内存

~200MB

4GB+

CPU

<5%

50-100%

依赖

Node.js

Docker+WSL2

启动

即时

2-3分钟

🔧 系统要求

  • Node.js 16+ (安装器会自动安装)

  • 支持系统: Windows/macOS/Linux

  • Claude Desktop 或 Claude CLI

📦 包含文件

mcp-docparser-portable/
├── install.bat          # Windows安装器
├── install.sh          # macOS/Linux安装器
├── package.json        # 项目配置
├── server.js          # MCP服务器
└── README.md          # 本文档

🎯 使用方法

安装完成后,在Claude中使用以下MCP工具:

1. 解析文档

使用MCP工具 parse_document 解析 "C:/path/to/document.pdf"

2. 图片OCR

使用MCP工具 ocr_image 识别 "C:/path/to/image.jpg" 中的文字

3. 提取文本

使用MCP工具 extract_text 从 "C:/path/to/document.docx" 提取文本

4. 文档分块

使用MCP工具 chunk_document 将 "C:/path/to/large.pdf" 分成1000字符的块

5. 获取文档信息

使用MCP工具 get_document_info 获取 "C:/path/to/file.xlsx" 的信息

🛠️ 手动配置

如果自动配置失败,手动添加到配置文件:

Claude Desktop (Windows)

路径: %APPDATA%\Claude\claude_desktop_config.json

Claude Desktop (macOS)

路径: ~/Library/Application Support/Claude/claude_desktop_config.json

Claude CLI (所有平台)

路径: ~/.claude/claude_desktop_config.json

配置内容:

{
  "mcpServers": {
    "docparser": {
      "command": "node",
      "args": ["安装路径/server.js"]
    }
  }
}

🔍 故障排除

  1. Node.js未安装

    • Windows: 安装器会自动下载安装

    • macOS: 使用 brew install node

    • Linux: 使用 apt install nodejs 或 yum install nodejs

  2. 权限问题

    • Windows: 以管理员身份运行

    • macOS/Linux: 使用 sudo

  3. Claude未识别MCP

    • 重启Claude Desktop/CLI

    • 检查配置文件路径是否正确

📊 性能对比

功能

速度

准确率

PDF解析

<1秒/页

99%

图片OCR

2-3秒/图

95%+

Word提取

<1秒

100%

Excel读取

<2秒

100%

🌟 优势

  1. 轻量级 - 无需Docker/WSL2

  2. 跨平台 - Windows/macOS/Linux通用

  3. 易部署 - 一键安装脚本

  4. 高性能 - 本地处理,无网络延迟

  5. 全功能 - 支持所有常见文档格式

📝 许可

MIT License - 免费使用和分发

🤝 贡献

欢迎提交Issue和Pull Request


让Claude拥有强大的文档处理能力,只需200MB内存!

Available Tools

7 tools
analyze_imageC

Analyze image content, detect text presence, and get metadata

ParametersJSON Schema
NameRequiredDescriptionDefault
image_pathYesPath to the image file

TDQS

C2.6/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full behavioral burden, and it discloses almost nothing: no mention of whether the operation is read-only, whether it invokes a costly vision model, what the metadata contains, or how text presence is reported. It only lists three capability categories.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

One short, front-loaded sentence with no wasted words. It is efficient, though the brevity comes at the cost of specificity rather than being tight-but-complete.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no annotations and no output schema, the description is the only source of return-value information, yet it gives only three vague labels ('content', 'text presence', 'metadata') without structure, keys, or format. For a tool bundling three distinct capabilities, this leaves too much unspecified.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and the single image_path parameter is fully documented in the schema, so the baseline is 3. The description adds no path format, accepted file types, or relative-vs-absolute path guidance beyond what the schema already states.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a general verb ('Analyze') plus three concrete outputs: content analysis, text presence detection, and metadata. This is more informative than a tautology, but 'analyze' is a vague catch-all and the definition does nothing to distinguish it from siblings like ocr_image, extract_text, or get_document_info, which appear to overlap on text extraction and metadata.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no guidance on when to choose this tool over the many overlapping siblings (ocr_image, extract_text, batch_ocr). No prerequisites, no exclusions, no alternative named. The agent must guess from the name alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

batch_ocrC

Process multiple images in a folder and extract text

ParametersJSON Schema
NameRequiredDescriptionDefault
folder_pathYesPath to folder containing images

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full behavioral burden. It doesn't disclose output format, whether results are aggregated or per-image, handling of non-image files, failure behavior on unreadable images, or whether processing is synchronous. Significant gaps for a batch processing tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single efficient sentence with no waste and the core behavior front-loaded. Not verbose, though it is arguably too terse given the missing behavioral context.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a batch tool with no annotations and no output schema, the description leaves several agent-relevant questions unanswered: result shape, per-image success/failure handling, and supported image formats. The description is under-specified relative to the complexity of batch processing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the single folder_path parameter is fully documented in the schema. The description adds no syntax or format details beyond the schema's own description. Baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb ('extract text') and resource ('images in a folder'), and the batch scope distinguishes it from the singular ocr_image sibling. However, it does not explicitly name or contrast with ocr_image, leaving some differentiation implicit.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No when-to-use guidance, prerequisites, or alternatives mentioned. The agent must infer that this is the batch counterpart to ocr_image without any explicit routing signal.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

chunk_documentC

Split document or extracted text into chunks for processing

ParametersJSON Schema
NameRequiredDescriptionDefault
overlapNoOverlap between chunks
file_pathYesPath to the document file
chunk_sizeNoSize of each chunk in characters

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full behavioral burden but discloses almost nothing beyond the core action. It does not say whether chunks are returned inline or written to disk, what the output shape is, or what happens for large files or missing paths. 'For processing' is vague filler rather than behavioral context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single tight sentence with the action front-loaded and no redundant clauses. Its brevity is efficient, though the space saved is partly the space that should have held output and usage detail.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 3-parameter tool with no output schema and no annotations, the description should clarify the return value (a list of chunk strings? file paths?) and any constraints on input size or file type. None of that is present, so an agent cannot fully predict the result of a call.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, and the schema already documents chunk_size as characters with a default of 1000 and overlap with a default of 100. The description adds nothing about units, limits, or how overlap interacts with chunk_size, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb ('Split') and resource ('document or extracted text') plus the outcome ('into chunks'), so it is distinguishable from siblings like parse_document or extract_text. It stops short of explicitly contrasting itself with those siblings, which keeps it from a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no guidance on when to chunk versus parse or extract, no mention of prerequisites, and no indication of what the caller should do with the produced chunks. Usage is only implied by the tool name.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

extract_textB

Extract text from any document or image using OCR if needed

ParametersJSON Schema
NameRequiredDescriptionDefault
file_pathYesPath to the document or image file

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full behavioral burden. It doesn't state supported formats, whether extraction requires write output or returns inline, OCR language support, or failure behavior for unreadable files — significant gaps for a tool that may silently invoke a heavyweight OCR path.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence with no filler. Every clause ('any document or image', 'OCR if needed') carries information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a one-parameter read tool this is minimally adequate: the agent knows what goes in and roughly what comes out. However, with no output schema and no annotation coverage, the absence of any note on return shape, supported file types, or OCR behavior leaves real gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Only one parameter exists and the schema already documents it at 100% coverage ('Path to the document or image file'). The description adds nothing beyond the schema, which is the baseline expectation at full coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (extract) and resource (text from documents/images), and notes the OCR fallback mechanism. It does not distinguish itself from siblings like parse_document, ocr_image, or batch_ocr, so an agent cannot tell when this is the right pick over those.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The phrase 'using OCR if needed' implies automatic routing to OCR, but there is no guidance on when to choose this over ocr_image, parse_document, or batch_ocr, and no exclusions or prerequisites stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_document_infoC

Get metadata and structure information about any document or image

ParametersJSON Schema
NameRequiredDescriptionDefault
file_pathYesPath to the document or image file

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full behavioral burden. It says nothing about whether the file is read or mutated, what permissions are needed, cost/latency, or whether it works on unsupported formats despite claiming 'any document or image'.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single efficient sentence with the resource and scope front-loaded. Nothing is wasted, though the terseness is part of the under-specification problem.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a lightweight read-only info tool with no output schema, the description should at least sketch what 'metadata and structure' contains. It is callable as written but leaves the return shape entirely opaque.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Only one parameter, and the schema already documents it at 100% coverage ('Path to the document or image file'). The description adds no format, path-resolution, or size-limit detail beyond the schema, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Specific verb (Get) plus resource (metadata and structure information) scoped to documents and images. It implicitly separates itself from extract_text/ocr_image by promising metadata/structure rather than content, but it never names or contrasts those siblings explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no when-to-use guidance and no exclusions. With siblings like parse_document, extract_text, and analyze_image, an agent must guess whether this is a precursor step, an alternative, or orthogonal.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

ocr_imageC

Extract text from image using OCR (supports Chinese and English)

ParametersJSON Schema
NameRequiredDescriptionDefault
languageNoOCR language (chi_sim, eng, or chi_sim+eng)chi_sim+eng
image_pathYesPath to the image file

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full behavioral burden and does not meet it. It does not state that the operation is read-only/non-mutating, what happens when no text is found, whether results are plain text or structured, or any error behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence with the verb and resource first and no filler. The parenthetical language note is compact, though it duplicates information already in the schema.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple two-parameter read tool with no output schema and full schema description coverage, the description is minimally adequate. It omits return format and failure/timing behavior, and gives no routing guidance among the several overlapping sibling tools.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so both parameters (image_path, language) are already documented with defaults and allowed values. The description echoes the language capability (Chinese and English) but adds no syntax or format detail beyond the schema, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb+resource (extract text from an image) and the mechanism (OCR), which is clear. It does not differentiate from siblings such as extract_text, batch_ocr, or analyze_image, so an agent cannot tell from the text alone which of these to pick.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no when-to-use guidance and no mention of alternatives, despite siblings like batch_ocr (multiple images) and extract_text (possibly non-image sources) that overlap directly. The only usage hint is the implied 'single image' scope from the name and the language support note.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

parse_documentC

Parse any document including images with OCR (PDF, Word, Excel, Images, etc.)

ParametersJSON Schema
NameRequiredDescriptionDefault
file_pathYesPath to the document or image file

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full disclosure burden. It does reveal that OCR is applied and which formats are supported, but says nothing about permissions, file size limits, local vs. remote path requirements, or whether output is plain text or structured. Significant behavioral gaps remain for a mutation-free but resource-heavy processing tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

One front-loaded sentence that states the action, the OCR behavior, and supported formats without padding. It is efficient, though the format enumeration ('etc.') is slightly loose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a single-parameter tool with no output schema and no annotations, the description covers the basic action and input types but omits what the agent gets back (raw text, structured blocks, page data) and how errors or unsupported files are handled. Adequate but with clear gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

There is a single required parameter with 100% schema description coverage, so the schema already fully documents file_path. The description adds no syntax, format, or path-resolution detail beyond what the schema provides, making the baseline of 3 appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (parse) and resource (document), and clarifies that images are handled via OCR with a list of supported formats. However, it does not differentiate itself from close siblings like extract_text, ocr_image, or chunk_document, which an agent could easily confuse it with.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no guidance on when to choose this tool over extract_text, ocr_image, or chunk_document, nor any mention of prerequisites or exclusions. The phrase 'any document' is inclusive but gives the agent no routing criteria.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 7 tool updatesv2.0.0
    • First observedanalyze_image
    • First observedbatch_ocr
    • First observedchunk_document
    • First observedextract_text
    • First observedget_document_info
    • First observedocr_image
    • First observedparse_document

TDQS

B3.1/5.0

Scored across 7 tools

Disambiguation2/5

Multiple tools have overlapping purposes: parse_document, extract_text, and ocr_image all extract text from images/documents, with descriptions that are nearly indistinguishable. analyze_image also overlaps with get_document_info for image metadata, making it hard for an agent to choose the right tool.

Naming Consistency4/5

All tool names use snake_case and most follow a verb_noun pattern (e.g., analyze_image, chunk_document, get_document_info). batch_ocr and ocr_image deviate slightly by starting with a noun or acronym, but the overall convention is clear and readable.

Tool Count5/5

Seven tools is well-scoped for a document parsing server, providing distinct capabilities for parsing, OCR, text extraction, metadata, image analysis, and chunking without being overwhelming or thin.

Completeness4/5

The surface covers core document parsing tasks: parsing, text extraction, OCR (including batch and language support), metadata retrieval, image analysis, and chunking. Minor gaps exist, such as tools for output saving or format-specific handling, but agents can work around them.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers