MCP HubMCP Hub
FradSer

mcp-server-to-markdown

by: FradSer

mcp server to markdown

30created 21/03/2025
Visit
markdown

πŸ“ŒOverview

Purpose: To provide a powerful MCP server that converts various file formats into Markdown descriptions using Cloudflare AI services.

Overview: The MCP server integrates seamlessly with Cloudflare's AI capabilities, allowing users to easily convert multiple file formats into standardized Markdown descriptions, enhancing the accessibility and usability of diverse content types.

Key Features:

  • Seamless Integration with Cloudflare AI Services: Effortlessly connects with Cloudflare's suite for enhanced functionality.

  • Efficient Markdown Description Generation: Rapidly produces Markdown descriptions from various input files, improving documentation processes.

  • Comprehensive File Format Support: Supports a wide range of file types including documents, images, web content, data, and spreadsheets, making it versatile for different user needs.

  • User-Friendly MCP Interface: Intuitive design ensures ease of use for both technical and non-technical users.

  • Cross-Platform Compatibility: Functions smoothly across various platforms, ensuring broad accessibility.


MCP Server To Markdown

A powerful Model Context Protocol (MCP) server that leverages Cloudflare AI services to convert various file formats into Markdown descriptions. This server provides a standardized interface for seamless file conversion and description generation.

Key Features

  • Seamless integration with Cloudflare AI services
  • Efficient Markdown description generation
  • Comprehensive file format support
  • Native Cloudflare tomarkdown API integration
  • User-friendly MCP interface
  • Cross-platform compatibility

Supported File Formats

CategoryFile Extensions
Documents.pdf
Images.jpeg, .jpg, .png, .webp, .svg
Web Content.html
Data.xml, .csv
Spreadsheets.xlsx, .xlsm, .xlsb, .xls, .et, .ods, .numbers

System Requirements

  • Node.js 18 or later
  • Valid Cloudflare API Token
  • Active Cloudflare Account ID

Installation

Install globally using npm:

npm install -g mcp-server-to-markdown

MCP Client Configuration

Cursor Integration

  1. Navigate to Cursor settings
  2. Select MCP from the sidebar
  3. Choose Add new global MCP server
  4. Apply the following configuration:
{
  "mcpServers": {
    "to-markdown": {
      "command": "mcp-server-to-markdown",
      "args": [
        "CLOUDFLARE_API_TOKEN": "your_api_token",
        "CLOUDFLARE_ACCOUNT_ID": "your_account_id"
      ]
    }
  }
}

Claude Desktop Setup

Add the following to your 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 Configuration

  1. Launch ChatWise

  2. Access Settings

  3. Select Tools section

  4. Click "+" to add new tool

  5. Configure with these parameters:

    • Type: stdio
    • ID: to-markdown
    • Command: mcp-server-to-markdown
    • Args:
    CLOUDFLARE_API_TOKEN=your_api_token
    CLOUDFLARE_ACCOUNT_ID=your_account_id
    

API Reference

to-markdown Tool

Converts various file formats to Markdown descriptions.

Input Parameters:

  • filePaths: Array (required) - List of file paths to process

Response Structure:

[
  {
    "filename": "example.pdf",
    "mimeType": "application/pdf",
    "description": "Generated Markdown description",
    "tokens": 123
  }
]

Development Guide

Getting Started

  1. Clone and setup environment:
git clone <repository-url>
cd mcp-server-to-markdown
cp .env.example .env
  1. Configure Cloudflare credentials:
CLOUDFLARE_API_TOKEN=your_api_token
CLOUDFLARE_ACCOUNT_ID=your_account_id
  1. Install dependencies and build:
npm install
npm run build

Project Structure

.
β”œβ”€β”€ src/             # Source code
β”œβ”€β”€ dist/            # Compiled output
β”œβ”€β”€ types.ts         # Type definitions
└── .env             # Environment configuration

Available Scripts

  • npm run build - Build TypeScript code
  • npm run inspect - Run with MCP inspector

Usage Example

const result = await toMarkdown({
  filePaths: [
    "/path/to/document.pdf",
    "/path/to/image.jpg"
  ]
});

License

MIT License

This project is maintained by Frad LEE (https://twitter.com/FradSer)