English | 简体中文
一个强大的模型上下文协议(MCP)服务器,利用Cloudflare AI服务将各种文件格式转换为Markdown描述。此服务器提供了一个标准化接口,实现无缝文件转换和描述生成。
| 类别 | 文件扩展名 |
|---|---|
| 文档 | |
| 图像 | .jpeg, .jpg, .png, .webp, .svg |
| 网页内容 | .html |
| 数据 | .xml, .csv |
| 表格 | .xlsx, .xlsm, .xlsb, .xls, .et, .ods, .numbers |
要通过Smithery自动安装Markdown转换服务器到Claude Desktop:
npx -y @smithery/cli install @FradSer/mcp-server-to-markdown --client claude
使用npm全局安装:
npm install -g mcp-server-to-markdown
{
"mcpServers": {
"to-markdown": {
"command": "mcp-server-to-markdown",
"args": [
"CLOUDFLARE_API_TOKEN": "your_api_token"
"CLOUDFLARE_ACCOUNT_ID": "your_account_id"
]
}
}
}
在你的claude_desktop_config.json中添加以下内容:
{
"mcpServers": {
"to-markdown": {
"command": "mcp-server-to-markdown",
"args": [
"CLOUDFLARE_API_TOKEN": "your_api_token"
"CLOUDFLARE_ACCOUNT_ID": "your_account_id"
]
}
}
}
stdioto-markdownmcp-server-to-markdownCLOUDFLARE_API_TOKEN=your_api_token
CLOUDFLARE_ACCOUNT_ID=your_account_id
将各种文件格式转换为Markdown描述。
输入参数:
filePaths: Array<string> (必需) - 需要处理的文件路径列表响应结构:
[
{
"filename": "example.pdf",
"mimeType": "application/pdf",
"description": "生成的Markdown描述",
"tokens": 123
}
]
git clone <repository-url>
cd mcp-server-to-markdown
cp .env.example .env
CLOUDFLARE_API_TOKEN=your_api_token
CLOUDFLARE_ACCOUNT_ID=your_account_id
npm install
npm run build
.
├── src/ # 源代码
├── dist/ # 编译输出
├── types.ts # 类型定义
└── .env # 环境配置
npm run build - 构建TypeScript代码npm run inspect - 使用MCP检查器运行const result = await toMarkdown({
filePaths: [
"/path/to/document.pdf",
"/path/to/image.jpg"
]
});
MIT许可证
该项目由Frad LEE维护