Document Convert MCP
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Document Convert MCPConvert my contract.docx to PDF"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
📄 Document Convert MCP
🚀 基于 AI MCP 协议的智能文档转换工具,支持 Word、Markdown、PDF、HTML 等多种格式互转
✨ 特性
📝 Markdown 转换 - 支持 Markdown 与其他格式的双向转换
📄 Word 文档处理 - 完美支持 .docx 和 .doc 格式
🌐 HTML 转换 - 智能处理 HTML 标签和样式
📋 PDF 转换 - 高质量 PDF 生成和解析
🔧 纯文本转换 - 智能格式识别和转换
🖼️ 图片处理 - 自动提取和转换文档中的图片
📦 TypeScript 支持 - 完整的类型定义
🔄 批量转换 - 支持多文档批量处理
⚡ 高性能引擎 - 优化的转换算法
Related MCP server: mcp-document-converter
📦 安装
npm install @pickstar-2002/document-covert-mcp@latest🚀 快速开始
作为 MCP 服务器使用(推荐)
在您的 AI IDE 中配置 MCP 服务器:
npx @pickstar-2002/document-covert-mcp@latest在 Cursor 中使用
在 Cursor 的设置中添加 MCP 服务器配置:
{
"mcpServers": {
"document-convert": {
"command": "npx",
"args": ["@pickstar-2002/document-covert-mcp@latest"]
}
}
}在 WindSurf 中使用
在 WindSurf 的 MCP 配置中添加:
{
"servers": {
"document-convert": {
"command": "npx",
"args": ["@pickstar-2002/document-covert-mcp@latest"]
}
}
}编程接口
import { DocumentConverter } from '@pickstar-2002/document-covert-mcp';
const converter = new DocumentConverter();
// 转换 Word 文档到 Markdown
await converter.convertDocument('document.docx', 'output.md', 'md');
// 转换 HTML 到 PDF
await converter.convertDocument('page.html', 'output.pdf', 'pdf');
// 批量转换
await converter.batchConvert(
['doc1.docx', 'doc2.pdf'],
'./output/',
'md'
);🛠️ MCP 工具
本工具提供以下 MCP 工具:
convert_document
转换单个文档格式
{
"tool": "convert_document",
"arguments": {
"inputPath": "./document.docx",
"outputPath": "./document.md",
"outputFormat": "md",
"options": {
"preserveFormatting": true,
"quality": "high",
"includeImages": true
}
}
}batch_convert_documents
批量转换多个文档
{
"tool": "batch_convert_documents",
"arguments": {
"inputPaths": ["./doc1.docx", "./doc2.pdf"],
"outputDirectory": "./converted/",
"outputFormat": "md",
"options": {
"preserveFormatting": true,
"quality": "medium"
}
}
}get_supported_formats
获取支持的文档格式列表
{
"tool": "get_supported_formats",
"arguments": {}
}validate_document
验证文档格式和完整性
{
"tool": "validate_document",
"arguments": {
"filePath": "./document.docx"
}
}📋 支持格式
输入格式 | 输出格式 | 状态 | 特性 |
Word (.docx, .doc) | Markdown, HTML, PDF, TXT | ✅ | 保持格式、图片提取 |
Markdown (.md) | Word, HTML, PDF, TXT | ✅ | 语法高亮、表格支持 |
PDF (.pdf) | Word, Markdown, HTML, TXT | ✅ | 文本提取、布局识别 |
HTML (.html) | Word, Markdown, PDF, TXT | ✅ | 样式保持、标签解析 |
纯文本 (.txt) | Word, Markdown, HTML, PDF | ✅ | 智能格式识别 |
⚙️ 配置选项
interface ConversionOptions {
preserveFormatting?: boolean; // 保持原格式 (默认: true)
quality?: 'low' | 'medium' | 'high'; // 转换质量 (默认: medium)
includeImages?: boolean; // 包含图片 (默认: true)
customStyles?: string; // 自定义样式
}🏗️ 项目结构
document-covert-mcp/
├── src/
│ ├── index.ts # MCP 服务器入口
│ ├── converter/ # 转换器核心
│ │ ├── DocumentConverter.ts # 主转换器
│ │ └── formats/ # 格式转换器
│ │ ├── WordConverter.ts
│ │ ├── MarkdownConverter.ts
│ │ ├── PdfConverter.ts
│ │ ├── HtmlConverter.ts
│ │ └── TextConverter.ts
│ ├── types/ # 类型定义
│ │ └── index.ts
│ └── utils/ # 工具函数
│ ├── logger.ts
│ └── validation.ts
├── examples/ # 示例文件
├── dist/ # 编译输出
├── LICENSE # MIT 许可证
├── package.json # 项目配置
└── README.md # 项目文档🔧 开发
# 克隆项目
git clone https://github.com/pickstar-2002/document-covert-mcp.git
cd document-covert-mcp
# 安装依赖
npm install
# 开发模式
npm run dev
# 构建项目
npm run build
# 启动服务
npm start
# 代码格式化
npm run format
# 代码检查
npm run lint📚 使用示例
基础转换
// Word 转 Markdown
await converter.convertDocument(
'report.docx',
'report.md',
'md',
{ preserveFormatting: true }
);
// Markdown 转 PDF
await converter.convertDocument(
'readme.md',
'readme.pdf',
'pdf',
{ quality: 'high' }
);批量处理
// 批量转换多个文档
const results = await converter.batchConvert(
['doc1.docx', 'doc2.pdf', 'doc3.html'],
'./output/',
'md',
{ includeImages: true }
);
console.log(`成功转换 ${results.filter(r => r.success).length} 个文档`);格式验证
// 验证文档
const validation = await converter.validateDocument('document.docx');
if (validation.isValid) {
console.log(`文档有效,格式: ${validation.format}`);
} else {
console.error(`文档无效: ${validation.error}`);
}🤝 贡献
欢迎提交 Issue 和 Pull Request!
Fork 本项目
创建特性分支 (
git checkout -b feature/AmazingFeature)提交更改 (
git commit -m 'Add some AmazingFeature')推送到分支 (
git push origin feature/AmazingFeature)开启 Pull Request
📄 许可证
本项目基于 MIT 许可证开源 - 查看 LICENSE 文件了解详情。
👨💻 作者
pickstar-2002
微信: pickstar_loveXX
让文档转换变得简单高效! 🚀✨
Available Tools
4 toolsbatch_convert_documentsB
批量转换多个文档
| Name | Required | Description | Default |
|---|---|---|---|
| options | No | ||
| inputPaths | Yes | 输入文件路径数组 | |
| outputFormat | Yes | 目标格式 | |
| outputDirectory | Yes | 输出目录 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations are absent, so the description must disclose behavioral traits. The description only states the action and does not mention any side effects, permissions, error conditions, output behavior, or potential to overwrite files. This lack of disclosure leaves the agent without critical information about the operation's consequences.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, concise sentence that directly states the tool's purpose. There is no redundant or excessive wording, making it efficient and front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with four parameters, nested options, and no annotations or output schema, the one-line description is insufficient. It does not specify supported formats (though in schema), how batch processing behaves, or what the return value represents. The tool is moderately complex, and the description leaves many behavioral and contextual gaps.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema covers 75% of parameters with descriptions, and the options object has nested descriptions for its fields. The description does not add any information about parameters such as output format or paths, but the schema already provides sufficient semantic context. Since the schema does most of the heavy lifting, the description's lack of parameter details is acceptable.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description '批量转换多个文档' clearly states the tool's function: batch conversion of multiple documents. The verb 'convert' and resource 'documents' are specific, and the word 'batch' distinguishes it from the sibling tool convert_document, which likely handles a single document.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies the tool is for converting multiple documents at once, but it does not explicitly state when to use this tool over alternatives like convert_document for single documents or when not to use it. There is no mention of prerequisites or exclusions, so the usage guidance is only implied.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
convert_documentC
转换文档格式,支持Word、Markdown、PDF、HTML等格式互转
| Name | Required | Description | Default |
|---|---|---|---|
| options | No | ||
| inputPath | Yes | 输入文件路径 | |
| outputPath | Yes | 输出文件路径 | |
| outputFormat | Yes | 目标格式 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are present, so the description carries full responsibility. It only lists supported formats and does not disclose behavioral traits such as file overwriting, error behavior, or limitations. This is a significant gap for a conversion tool with side effects.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single concise sentence that is front-loaded and free of fluff. It is efficient, though it is arguably too sparse given the tool's complexity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no output schema, no annotations, and a minimal description, the tool leaves many questions unanswered, such as return values, error cases, and handling of existing output files. The presence of nested options increases the need for more context.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema describes the parameters well (75% coverage), so the description does not need to explain them. However, the description adds no extra meaning beyond what the schema already provides, matching the baseline for moderate schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool converts document formats and lists supported formats (Word, Markdown, PDF, HTML). It distinguishes the core action well, though it does not explicitly differentiate from the sibling batch_convert_documents, which is implied by the singular 'convert'.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives like batch_convert_documents. Usage context is only implied by the name and description, with no explicit exclusions or alternative references.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_supported_formatsA
获取支持的文档格式列表
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden. It discloses that the tool retrieves a list, implying a read-only operation without side effects. For a parameterless getter, this is sufficient; however, it does not specify the exact format of the returned list (e.g., file extensions vs MIME types).
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single concise sentence that fully conveys the tool's purpose with no unnecessary words. It is appropriately minimal for a simple list-retrieval tool.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a 0-parameter tool with no output schema, the description is complete: it states exactly what the tool returns (a list of supported formats). Given the simplicity, no additional context is needed.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters, so the baseline is 4. There is no parameter information needed; the description adds no parameter semantics because there are none to describe.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb '获取' (get) with a clear resource '支持的文档格式列表' (supported document formats list), precisely stating what the tool does. It also clearly distinguishes itself from sibling tools like convert_document and validate_document, which perform different actions.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
While the description does not explicitly mention when to use this tool versus alternatives, the purpose is self-evident: it provides the list of formats that other tools (convert, validate) would rely on. The context is clear for a simple retrieval operation, though explicit alternatives are not named.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
validate_documentB
验证文档是否可以转换
| Name | Required | Description | Default |
|---|---|---|---|
| filePath | Yes | 文件路径 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the burden of disclosing behavioral traits. It only states the purpose ('verify whether the document can be converted') but does not mention whether the operation is read-only, what the return value looks like (e.g., boolean or error list), or any side effects. This is a significant gap for a validation tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, front-loaded sentence in Chinese, containing no filler or redundant information. It efficiently communicates the core action and object.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Although the tool is simple, the description lacks essential context for a validation tool: it does not state what the result is (e.g., boolean, error messages) or how to interpret the outcome. Without an output schema or annotations, the description should have provided at least a brief note on return behavior, which it omits.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema already provides a 100% description coverage for the single parameter filePath ('文件路径'). The description adds only minimal context by implying that filePath refers to the document to be validated, but it doesn't elaborate on accepted formats or path handling. Baseline 3 is appropriate since the schema already documents the parameter.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description "验证文档是否可以转换" clearly states the tool's function: validating whether a document can be converted. This specific action distinguishes it from sibling tools like convert_document (performs conversion) and get_supported_formats (lists formats). The verb "validate" is precise and the resource "document" is obvious.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives no explicit guidance on when to use this tool versus the siblings. It doesn't say 'use this before converting' or note any prerequisites. The usage is only implied by the tool's name/description, but no direct comparison to alternatives is provided.
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. Dates show when Glama detected each change.
4 tool updates
v1.0.0- First observed
batch_convert_documents - First observed
convert_document - First observed
get_supported_formats - First observed
validate_document
TDQS
Each tool has a clearly distinct purpose: single conversion, batch conversion, format discovery, and validation. No overlap or ambiguity between them.
All tool names follow a consistent verb_noun pattern in snake_case: convert_document, batch_convert_documents, get_supported_formats, validate_document. The 'batch_' prefix clearly indicates a variant, and the naming is predictable.
Four tools is a well-scoped size for a document conversion server. Each tool covers a necessary aspect without bloat or redundancy.
The tool surface covers the full lifecycle of document conversion: discovering supported formats, validating inputs, converting a single document, and batch converting multiple documents. No obvious dead ends or missing operations.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Use your own Word templates to convert Markdown → DOCX/PDF/HTML from any MCP-compatible AI.
Document-to-Markdown MCP server — convert PDF, Office and HTML into LLM-ready Markdown.
Convert files, URLs, and documents to clean, AI-ready Markdown via MCP.
- mcpOAuthcom.mdtidy
Clean, repair, and convert AI-generated Markdown to HTML/PDF/DOCX/PNG; save and share documents.
Related MCP Servers
- -licenseNot gradedqualityNot gradedmaintenanceEnables conversion between multiple document formats including Markdown, HTML, TXT, PDF, and DOCX with automatic format detection. Supports high-fidelity document transformation while preserving content integrity.721-
- AlicenseNot gradedqualityCmaintenanceConverts documents between multiple formats (Markdown, HTML, DOCX, PDF, Text) enabling AI agents to easily transform documents.12MIT
- FlicenseNot gradedqualityDmaintenanceEnables document conversion and processing through an MCP server interface for AI assistants.-
- AlicenseCqualityDmaintenanceA unified MCP server for document processing that enables creating, editing, and converting Word documents (DOCX), PDFs, Markdown, and images, with support for templates, formatting, and batch operations.100MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/pickstar-2002/document-covert-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server