Markdownify MCP Server - UTF-8 Enhanced
local-only server
The server can only run on the client’s local machine because it depends on local resources.
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
- 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)
- Improved Error Handling:
- Detailed error messages in both English and Chinese
- Better exception handling for network issues
- Graceful fallback mechanisms for conversion failures
- 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
- Performance Optimizations:
- Optimized memory usage for large file conversions
- Faster processing of multilingual content
- Reduced dependency conflicts
- 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
- Clone this repository:Copy
- Install dependencies:Note: This will also installCopy
uv
and related Python dependencies. - Build the project:Copy
- Start the server:Copy
Requirements
- Node.js 16.0 or higher
- Python 3.8 or higher
- pnpm package manager
- Git
Detailed Installation Guide
1. Environment Setup
- Install Node.js:
- Download from Node.js official website
- Verify installation:
node --version
- Install pnpm:Copy
- Install Python:
- Download from Python official website
- Ensure Python is added to PATH during installation
- Verify installation:
python --version
- (Windows Only) Configure UTF-8 Support:Copy
2. Project Setup
- Clone the repository:Copy
- Create and activate Python virtual environment:Copy
- Install project dependencies:Copy
- Build the project:Copy
3. Verification
- Start the server:Copy
- Test the installation:Copy
Usage Guide
Basic Usage
- Converting Web Pages:The converted markdown will be saved asCopy
converted_result.md
- Converting Local Files:Copy
- Converting YouTube Videos:Copy
Advanced Usage
- Environment Variables:Copy
- Batch Processing:
Create a batch file (e.g.,
convert_batch.txt
) with URLs or file paths:Then run:CopyCopy
Troubleshooting
- 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
- Debugging:Copy
Usage
Command Line
Convert web page to Markdown:
Convert local file:
Desktop App Integration
To integrate this server with a desktop app, add the following to your app's server configuration:
Troubleshooting
- Encoding Issues
- If you encounter character encoding issues, ensure the
PYTHONIOENCODING
environment variable is set toutf-8
- Windows users may need to run
chcp 65001
to enable UTF-8 support
- If you encounter character encoding issues, ensure the
- 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:
- Ensure your code follows the project's coding standards
- Add necessary tests and documentation
- Update relevant sections in the README
Contact
For issues or suggestions:
- Submit an Issue: https://github.com/JDJR2024/markdownify-mcp-utf8/issues
- Create a Pull Request: https://github.com/JDJR2024/markdownify-mcp-utf8/pulls
- Email: jdidndosmmxmx@gmail.com
You must be authenticated.
A document conversion server that transforms various file formats (PDFs, documents, images, audio, web content) to Markdown with improved multilingual and UTF-8 support.