首页
学习
活动
专区
圈层
工具
发布
MCP广场 >详情页
Cloudflare AI Markdown转换服务器2026-10-22293分享添加福利群:解决AI开发者的「MCP实战痛点」
一种使用Cloudflare AI服务将各种文件格式(PDF、图像、Office文档等)转换为Markdown描述的服务器。
By FradSer
2026-10-22293
github
详情内容

MCP 服务器转 Markdown

Twitter 关注 smithery 徽章

英文 | 简体中文

一个强大的模型上下文协议(MCP)服务器,利用 Cloudflare AI 服务将各种文件格式转换为 Markdown 描述。该服务器提供了一个标准化接口,用于无缝的文件转换和描述生成。

主要功能

  • 与 Cloudflare AI 服务无缝集成
  • 高效的 Markdown 描述生成
  • 全面的文件格式支持
  • 原生 Cloudflare tomarkdown API 集成
  • 用户友好的 MCP 界面
  • 跨平台兼容性

支持的文件格式

类别 文件扩展名
文档 .pdf
图片 .jpeg, .jpg, .png, .webp, .svg
网页内容 .html
数据 .xml, .csv
电子表格 .xlsx, .xlsm, .xlsb, .xls, .et, .ods, .numbers

系统要求

  • Node.js 18 或更高版本
  • 有效的 Cloudflare API 令牌
  • 活跃的 Cloudflare 账户 ID

安装

通过 Smithery 安装

要通过 Smithery 自动安装 Markdown转换服务器 用于 Claude Desktop:

npx -y @smithery/cli install @FradSer/mcp-server-to-markdown --client claude

手动安装

使用 npm 全局安装:

npm install -g mcp-server-to-markdown

MCP 客户端配置

Cursor 集成

  1. 导航到 Cursor 设置
  2. 从侧边栏选择 "MCP"
  3. 选择 "添加新的全局 MCP 服务器"
  4. 应用以下配置:
    {
      "mcpServers": {
        "to-markdown": {
          "command": "mcp-server-to-markdown",
          "args": [
            "CLOUDFLARE_API_TOKEN": "your_api_token"
            "CLOUDFLARE_ACCOUNT_ID": "your_account_id"
          ]
        }
      }
    }
    

Claude Desktop 设置

将以下内容添加到您的 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"
          ]
    }
  }
}

ChatWise 配置

  1. 启动 ChatWise
  2. 访问设置
  3. 选择工具部分
  4. 点击 "+" 添加新工具
  5. 使用以下参数配置:
    • 类型:stdio
    • ID:to-markdown
    • 命令:mcp-server-to-markdown
    • 参数:
      CLOUDFLARE_API_TOKEN=your_api_token
      CLOUDFLARE_ACCOUNT_ID=your_account_id
      

API 参考

to-markdown 工具

将各种文件格式转换为 Markdown 描述。

输入参数:

  • filePaths: Array (必需)- 要处理的文件路径列表

响应结构:

[
  {
    "filename": "example.pdf",
    "mimeType": "application/pdf",
    "description": "生成的 Markdown 描述",
    "tokens": 123
  }
]

开发指南

入门

  1. 克隆并设置环境:
git clone <repository-url>
cd mcp-server-to-markdown
cp .env.example .env
  1. 配置 Cloudflare 凭据:
CLOUDFLARE_API_TOKEN=your_api_token
CLOUDFLARE_ACCOUNT_ID=your_account_id
  1. 安装依赖并构建:
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 维护

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档