Markdown导出器MCP(本地)
独立的MCP服务器,用于将Markdown文本转换为各种文档格式。
特性
- DOCX 文件 -将Markdown导出到Word文档
- PDF -将Markdown导出为PDF文件
- PPT文件 -将Markdown导出到PowerPoint演示文稿
- XLSX文件 -将Markdown表格导出到Excel电子表格
- 超文本标记语言 -将Markdown导出为HTML文件
- JSON -将Markdown表格导出为JSON格式
安装
# Clone the repository
git clone https://github.com/Zac-Chen-2001/markdown-exporter-mcp-local.git
cd markdown-exporter-mcp-local
# Install dependencies
uv sync
用法
MCP服务器
使用stdio传输启动MCP服务器(默认):
uv run markdown-exporter-mcp-local
可用工具
| 工具 |
说明 |
export_docx |
将Markdown转换为DOCX文档 |
export_pdf |
将Markdown转换为PDF文件 |
export_pptx |
将Markdown转换为PPTX演示文稿 |
export_xlsx |
将Markdown表格转换为XLSX |
export_html |
将Markdown转换为HTML |
export_json |
将Markdown表格转换为JSON |
Claude代码的配置
添加到您的 ~/.codex/config.toml:
[mcp_servers.markdown_exporter_local]
command = "uv"
args = ["--directory", "/path/to/markdown-exporter-mcp-local", "run", "markdown-exporter-mcp-local"]
通用MCP客户端配置
{
"mcpServers": {
"markdown-exporter-local": {
"command": "uv",
"args": ["--directory", "/path/to/markdown-exporter-mcp-local", "run", "markdown-exporter-mcp-local"]
}
}
}
工具选项
export_docx选项
| 参数 |
类型 |
默认值 |
说明 |
strip_wrapper |
bool |
false |
删除代码块包装器 |
toc |
bool |
false |
生成目录 |
template_path |
string |
null |
DOCX模板文件的路径 |
export_pptx选项
| 参数 |
类型 |
默认值 |
说明 |
strip_wrapper |
bool |
false |
删除代码块包装器 |
template_path |
string |
null |
PPTX模板文件的路径 |
export_xlsx选项
| 参数 |
类型 |
默认值 |
说明 |
strip_wrapper |
bool |
false |
删除代码块包装器 |
force_text |
bool |
true |
将单元格值转换为文本 |
export_json选项
| 参数 |
类型 |
默认值 |
说明 |
strip_wrapper |
bool |
false |
删除代码块包装器 |
style |
string |
“jsonl” |
JSON样式:“jsonn”或“JSON_array” |
许可证
阿帕奇-2.0