Markdownify MCP Server logo

Markdownify MCP Server

Community
JDJR2024

MCP Markdownify Server with UTF-8 Support - Enhanced version with better multilingual handling

PublisherJDJR2024
Repositorymarkdownify-mcp-utf8
LanguageTypeScript
Forks
8
Stars
15
Available tools
0
Transport typestdio
Categories
LicenseMIT
Links
  • Connect tools to AI workflows

    Markdownify MCP Server exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    15 stars and 8 forks from the linked repository.

Markdownify MCP Server - UTF-8 Enhanced

This is an enhanced version of the original Markdownify MCP project, with improved UTF-8 encoding support and optimized handling of multilingual content.

中文文档

Enhancements

  • Added comprehensive UTF-8 encoding support
  • Optimized handling of multilingual content
  • Fixed encoding issues on Windows systems
  • Improved error handling mechanisms

Key Differences from Original Project

  1. Enhanced Encoding Support:

    • Full UTF-8 support across all operations
    • Proper handling of Chinese, Japanese, Korean and other non-ASCII characters
    • Fixed Windows-specific encoding issues (cmd.exe and PowerShell compatibility)
  2. Improved Error Handling:

    • Detailed error messages in both English and Chinese
    • Better exception handling for network issues
    • Graceful fallback mechanisms for conversion failures
  3. Extended Functionality:

    • Added support for batch processing multiple files
    • Enhanced YouTube video transcript handling
    • Improved metadata extraction from various file formats
    • Better preservation of document formatting
  4. Performance Optimizations:

    • Optimized memory usage for large file conversions
    • Faster processing of multilingual content
    • Reduced dependency conflicts
  5. Better Development Experience:

    • Comprehensive debugging options
    • Detailed logging system
    • Environment-specific configuration support
    • Clear documentation in both English and Chinese

Features

Supports converting various file types to Markdown:

  • PDF files
  • Images (with metadata)
  • Audio (with transcription)
  • Word documents (DOCX)
  • Excel spreadsheets (XLSX)
  • PowerPoint presentations (PPTX)
  • Web content:
    • YouTube video transcripts
    • Search results
    • General web pages
  • Existing Markdown files

Quick Start

  1. Clone this repository:

    bash
    git clone https://github.com/JDJR2024/markdownify-mcp-utf8.git
    cd markdownify-mcp-utf8
  2. Install dependencies:

    bash
    pnpm install

    Note: This will also install uv and related Python dependencies.

  3. Build the project:

    bash
    pnpm run build
  4. Start the server:

    bash
    pnpm start

Requirements

  • Node.js 16.0 or higher
  • Python 3.8 or higher
  • pnpm package manager
  • Git

Detailed Installation Guide

1. Environment Setup

  1. Install Node.js:

  2. Install pnpm:

    bash
    npm install -g pnpm
    pnpm --version
  3. Install Python:

    • Download from Python official website
    • Ensure Python is added to PATH during installation
    • Verify installation: python --version
  4. (Windows Only) Configure UTF-8 Support:

    bash
    # Set system-wide UTF-8
    setx PYTHONIOENCODING UTF-8
    # Set current session UTF-8
    set PYTHONIOENCODING=UTF-8
    # Enable UTF-8 in command prompt
    chcp 65001

2. Project Setup

  1. Clone the repository:

    bash
    git clone https://github.com/JDJR2024/markdownify-mcp-utf8.git
    cd markdownify-mcp-utf8
  2. Create and activate Python virtual environment:

    bash
    # Windows
    python -m venv .venv
    .venv\Scripts\activate
    
    # Linux/macOS
    python3 -m venv .venv
    source .venv/bin/activate
  3. Install project dependencies:

    bash
    # Install Node.js dependencies
    pnpm install
    
    # Install Python dependencies (will be handled by setup.sh)
    ./setup.sh
  4. Build the project:

    bash
    pnpm run build

3. Verification

  1. Start the server:

    bash
    pnpm start
  2. Test the installation:

    bash
    # Convert a web page
    python convert_utf8.py "https://example.com"
    
    # Convert a local file
    python convert_utf8.py "path/to/your/file.docx"

Usage Guide

Basic Usage

  1. Converting Web Pages:

    bash
    python convert_utf8.py "https://example.com"

    The converted markdown will be saved as converted_result.md

  2. Converting Local Files:

    bash
    # Convert DOCX
    python convert_utf8.py "document.docx"
    
    # Convert PDF
    python convert_utf8.py "document.pdf"
    
    # Convert PowerPoint
    python convert_utf8.py "presentation.pptx"
    
    # Convert Excel
    python convert_utf8.py "spreadsheet.xlsx"
  3. Converting YouTube Videos:

    bash
    python convert_utf8.py "https://www.youtube.com/watch?v=VIDEO_ID"

Advanced Usage

  1. Environment Variables:

    bash
    # Set custom UV path
    export UV_PATH="/custom/path/to/uv"
    
    # Set custom output directory
    export MARKDOWN_OUTPUT_DIR="/custom/output/path"
  2. Batch Processing: Create a batch file (e.g., convert_batch.txt) with URLs or file paths:

    text
    https://example1.com
    https://example2.com
    file1.docx
    file2.pdf

    Then run:

    bash
    while read -r line; do python convert_utf8.py "$line"; done < convert_batch.txt

Troubleshooting

  1. Common Issues:

    • If you see encoding errors, ensure UTF-8 is properly set
    • For permission issues on Windows, run as Administrator
    • For Python path issues, ensure virtual environment is activated
  2. Debugging:

    bash
    # Enable debug output
    export DEBUG=true
    python convert_utf8.py "your_file.docx"

Usage

Command Line

Convert web page to Markdown:

bash
python convert_utf8.py "https://example.com"

Convert local file:

bash
python convert_utf8.py "path/to/your/file.docx"

Desktop App Integration

To integrate this server with a desktop app, add the following to your app's server configuration:

js
{
  "mcpServers": {
    "markdownify": {
      "command": "node",
      "args": [
        "{ABSOLUTE_PATH}/dist/index.js"
      ],
      "env": {
        "UV_PATH": "/path/to/uv"
      }
    }
  }
}

Troubleshooting

  1. Encoding Issues

    • If you encounter character encoding issues, ensure the PYTHONIOENCODING environment variable is set to utf-8
    • Windows users may need to run chcp 65001 to enable UTF-8 support
  2. Permission Issues

    • Ensure you have sufficient file read/write permissions
    • On Windows, you may need to run as administrator

Acknowledgments

This project is based on the original work by Zach Caceres. Thanks to the original author for their outstanding contribution.

License

This project continues to be licensed under the MIT License. See the LICENSE file for details.

Contributing

Contributions are welcome! Before submitting a Pull Request, please:

  1. Ensure your code follows the project's coding standards
  2. Add necessary tests and documentation
  3. Update relevant sections in the README

Contact

For issues or suggestions:

  1. Submit an Issue: https://github.com/JDJR2024/markdownify-mcp-utf8/issues
  2. Create a Pull Request: https://github.com/JDJR2024/markdownify-mcp-utf8/pulls
  3. Email: jdidndosmmxmx@gmail.com

Installation

TypingMind
{
  "mcpServers": {
    "markdownify-mcp-utf8": {
      "command": "python",
      "args": [
        "convert_utf8.py",
        "\"{{config.INPUT_PATH_OR_URL}}\""
      ],
      "env": {
        "INPUT_PATH_OR_URL": "<INPUT_PATH_OR_URL>"
      }
    }
  }
}

Use Markdownify MCP Server MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once Markdownify MCP Server is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add Markdownify MCP Server as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the Markdownify MCP Server MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "markdownify-mcp-utf8": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-markdownify-server-utf8"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the Markdownify MCP Server MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the Markdownify MCP Server MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use Markdownify MCP Server to help me with this task?
Markdownify MCP Server
Sure. I read it.
Here is what I found using Markdownify MCP Server.

Frequently asked questions

What is the Markdownify MCP Server MCP server used for?

Markdownify MCP Server is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use Markdownify MCP Server MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use Markdownify MCP Server with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use Markdownify MCP Server MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With Markdownify MCP Server connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect Markdownify MCP Server MCP to TypingMind?

Markdownify MCP Server runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does Markdownify MCP Server MCP provide in TypingMind?

Markdownify MCP Server exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use Markdownify MCP Server MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If Markdownify MCP Server requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇