io.github.huoshuiai42/huoshui-file-converter

Official registry Productivity

An MCP server that provides document format conversion

What can you do with io.github.huoshuiai42/huoshui-file-converter?

  • 🔒 Sandbox Security: All operations restricted to a configured working directory
  • 📄 Format Support: Convert between Markdown, DOCX, HTML, PDF, and TXT
  • 🚀 MCP Integration: Full MCP protocol support with prompts, resources, and tools
  • ⚙️ Flexible Configuration: CLI arguments, environment variables, or current directory
  • 🔍 Smart Detection: Intelligent file format detection by content analysis

Install

Add this to your client's MCP configuration (Claude Desktop: claude_desktop_config.json; Cursor: .cursor/mcp.json; VS Code and others use the same "mcpServers" shape).

PYPI package huoshui-file-converter
Claude Code
claude mcp add huoshui-file-converter -e 'HUOSHUI_WORKING_DIR=<HUOSHUI_WORKING_DIR>' -- uvx huoshui-file-converter==1.0.0
JSON configuration (Claude Desktop, Cursor, VS Code)
{
    "mcpServers": {
        "huoshui-file-converter": {
            "command": "uvx",
            "args": [
                "huoshui-file-converter==1.0.0"
            ],
            "env": {
                "HUOSHUI_WORKING_DIR": "<HUOSHUI_WORKING_DIR>"
            }
        }
    }
}

Environment variables

  • HUOSHUI_WORKING_DIR Your workding directory

Documentation

From the project's README on GitHub, refreshed weekly. Links open on GitHub.

Contents
  1. Huoshui File Converter
  2. Features
  3. Quick Start
  4. Configuration Options
  5. Supported Conversions
  6. MCP Tools & Resources
  7. Performance Features
  8. Security Features
  9. Command Line Options
  10. Error Handling
  11. Development
  12. Documentation
  13. License

Huoshui File Converter

A secure MCP (Model Context Protocol) server for document format conversion within a specified working directory.

Features

  • 🔒 Sandbox Security: All operations restricted to a configured working directory
  • 📄 Format Support: Convert between Markdown, DOCX, HTML, PDF, and TXT
  • 🚀 MCP Integration: Full MCP protocol support with prompts, resources, and tools
  • ⚙️ Flexible Configuration: CLI arguments, environment variables, or current directory
  • 🔍 Smart Detection: Intelligent file format detection by content analysis

Quick Start

Installation

Option 1: From MCP Registry (Recommended)

This server is available in the Model Context Protocol Registry. Install it using your MCP client.

mcp-name: io.github.huoshuiai42/huoshui-file-converter

Option 2: Using uvx

uvx huoshui-file-converter

Option 3: Using pip

pip install huoshui-file-converter
Basic Usage
# Use current directory
uvx huoshui-file-converter

# Specify working directory (recommended)
uvx huoshui-file-converter --dir "/path/to/documents"

# Short form
uvx huoshui-file-converter -d "~/Documents"
MCP Client Configuration

For Claude Desktop or other MCP clients:

{
  "mcpServers": {
    "huoshui-converter": {
      "command": "uvx",
      "args": ["huoshui-file-converter", "--dir", "/Users/yourname/Documents"]
    }
  }
}

Configuration Options

Priority Order
  1. CLI Argument (highest priority): --dir or -d
  2. Environment Variable: HUOSHUI_WORKING_DIR
  3. Smart Default: Documents folder if current directory is problematic
  4. Current Directory (fallback)
Examples
# CLI argument (best for MCP clients)
uvx huoshui-file-converter --dir "/project/docs"

# Environment variable
export HUOSHUI_WORKING_DIR="/project/docs"
uvx huoshui-file-converter

# Current directory fallback
cd /project/docs
uvx huoshui-file-converter

Supported Conversions

FromTo
MarkdownDOCX, HTML, PDF
DOCXMarkdown, HTML, PDF
HTMLMarkdown, DOCX, PDF
TXTMarkdown, DOCX, HTML, PDF

MCP Tools & Resources

Tools
  • convert_document: Convert files between formats
  • detect_format: Intelligent format detection
Resources
  • file_list: Browse directory contents (optimized for large directories)
    • limit: Control number of files shown (default: 100)
    • supported_only: Show only convertible files
  • file_get: Get detailed file information
  • conversion_capability_list: List supported conversions
Prompts
  • role_and_rules: AI assistant behavior guidelines

Performance Features

  • Fast Directory Listing: Extension-based format detection for large directories
  • Smart File Limits: Default 100-file limit prevents UI freezing
  • Large File Handling: Files >50MB are marked and handled specially
  • Selective Display: Option to show only supported file formats
  • Memory Efficient: Avoids reading file contents during directory browsing

Security Features

  • Path Validation: Prevents directory traversal attacks
  • Working Directory Restriction: All operations sandboxed to configured directory
  • Startup Validation: Checks directory existence and permissions
  • Relative Path Enforcement: Absolute paths are rejected

Command Line Options

$ uvx huoshui-file-converter --help

usage: huoshui-file-converter [-h] [--dir PATH] [--version]

Huoshui Document Converter - MCP Server for file conversion within a working directory

options:
  -h, --help         show this help message and exit
  --dir PATH, -d PATH
                     Working directory for file operations (default: current directory or HUOSHUI_WORKING_DIR env var)
  --version, -v      show program's version number and exit

Examples:
  uvx huoshui-file-converter                    # Use current directory
  uvx huoshui-file-converter --dir /docs        # Use specific directory
  uvx huoshui-file-converter -d ./project       # Use relative directory

Configuration Priority:
  1. CLI argument (--dir/-d)
  2. Environment variable (HUOSHUI_WORKING_DIR)
  3. Current working directory

Error Handling

The server validates the working directory on startup:

✅ Working directory configured: /Users/name/Documents
📂 Source: CLI argument

Common errors and solutions:

ErrorSolution
Directory not foundCreate directory or fix path
No write accessCheck permissions (chmod on Unix)
Path outside sandboxUse relative paths only

Development

Requirements
  • Python 3.8+
  • pypandoc
  • pandoc (system dependency)
  • LaTeX (for PDF conversion)
Testing
# Test configuration
uvx huoshui-file-converter --dir "/tmp/test"

# Check startup messages
# ✅ Working directory configured: /tmp/test
# 📂 Source: CLI argument

Documentation

License

[Your license here]

Frequently asked questions

What is io.github.huoshuiai42/huoshui-file-converter?

An MCP server that provides document format conversion

How do I install io.github.huoshuiai42/huoshui-file-converter?

It runs on your machine. In Claude Code: claude mcp add huoshui-file-converter -e 'HUOSHUI_WORKING_DIR=<HUOSHUI_WORKING_DIR>' -- uvx huoshui-file-converter==1.0.0. For other clients, paste the JSON configuration from this page into their MCP settings.

Does io.github.huoshuiai42/huoshui-file-converter need an API key?

Its registry entry lists no required key or secret. Some features may still need an account with the service it connects to.

Is io.github.huoshuiai42/huoshui-file-converter open source?

Its code is public on GitHub, but the repository does not declare a standard license.

Who maintains io.github.huoshuiai42/huoshui-file-converter?

It is published by huoshuiai42. AI.tn lists it but does not maintain or endorse it.

From the official MCP Registry. Listing is not an endorsement: review a server's code and permissions before giving it access to your data.