md-to-text
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@md-to-text Convert README.md to plain text"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Markdown to Text MCP Server
A powerful Model Context Protocol (MCP) server that converts Markdown documents to plain text. Supports both stdio and HTTP transport protocols for use as local tools or remote services.
Features
š Complete Markdown Support: Handles all common elements including headers, lists, links, images, code blocks, tables, etc.
šļø Flexible Conversion Options: Multiple output formats and style configurations
š§ Dual Protocol Support: stdio mode (Claude Desktop) and HTTP mode (remote clients)
š Batch Processing: Directory scanning and bulk file conversion
š URL Support: Direct processing of remote Markdown files
š Security Hardened: Comprehensive input validation and security protection
ā” High Performance: Optimized conversion engine with concurrency control
Related MCP server: markdown-to-html
Quick Start
Installation
Option 1: Clone and Build
git clone <repository-url>
cd md_to_text_mcp
npm install
npm run buildOption 2: Use with npx (Recommended)
# From npm registry (if published)
npx md_to_text_mcp --help
# From GitHub repository
npx https://github.com/MD-TO-TEXT/md_to_text --help
# Local development
npm pack
npx ./md_to_text_mcp-1.0.0.tgz --helpBasic Usage
# Stdio mode (default)
npm start
# or with npx
npx md_to_text_mcp
# HTTP mode
npm run dev:http
# or with npx
npx md_to_text_mcp --mode http --port 3000Using with npx
npx allows you to run the tool without installing it globally. Here's how to use it:
Quick Test
# Test the tool help
npx md_to_text_mcp --help
# Run in stdio mode for Claude Desktop
npx md_to_text_mcp --mode stdio
# Start HTTP server
npx md_to_text_mcp --mode http --port 3000
# Custom configuration
npx md_to_text_mcp --mode http --host 0.0.0.0 --port 8080 --corsFrom Local Package
If you're developing locally:
# Create package
npm run build
npm pack
# Run with npx
npx ./md_to_text_mcp-1.0.0.tgz --help
npx ./md_to_text_mcp-1.0.0.tgz --mode stdioIntegration with Claude Desktop via npx
You can configure Claude Desktop to use the tool via npx:
{
"mcpServers": {
"md-to-text": {
"command": "npx",
"args": ["md_to_text_mcp", "--mode", "stdio"],
"cwd": "/tmp"
}
}
}Note: Using npx in Claude Desktop config requires that the package is published to npm registry or available in a git repository.
Tools
convert_text - Text Conversion
Convert Markdown text directly to plain text.
convert_file - File Conversion
Read and convert local Markdown files.
convert_url - URL Conversion
Fetch and convert remote Markdown content from URLs.
batch_convert - Batch Conversion
Batch process Markdown files in directories.
Conversion Options
preserveLinks: Preserve link URLslistStyle: List style (bullets/numbers/none)codeHandling: Code handling (preserve/remove/inline)tableFormat: Table format (simple/grid/none)headingStyle: Heading style (hash/underline/none)
Claude Desktop Integration
Add to Claude for Desktop configuration file:
{
"mcpServers": {
"md-to-text": {
"command": "node",
"args": ["./build/index.js"],
"cwd": "/path/to/md_to_text_mcp"
}
}
}Command Line Options
md-to-text-mcp [OPTIONS]
OPTIONS:
--mode <mode> Server mode: 'stdio' or 'http' (default: stdio)
--port <port> HTTP server port (default: 3000)
--host <host> HTTP server host (default: localhost)
--cors Enable CORS for HTTP mode
--no-cors Disable CORS for HTTP mode
--help, -h Show help message
EXAMPLES:
md-to-text-mcp # stdio mode
md-to-text-mcp --mode http --port 3000 # HTTP mode
md-to-text-mcp --mode http --host 0.0.0.0 # Allow external accessEnvironment Variables
Variable | Description | Default |
| Server mode (stdio/http) | stdio |
| HTTP server port | 3000 |
| HTTP server host | localhost |
| Max file size (bytes) | 10485760 (10MB) |
| URL request timeout (ms) | 30000 (30s) |
| Allowed file extensions | .md,.markdown,.txt |
Docker Support
# Build image
docker build -t md-to-text-mcp .
# Run HTTP mode
docker run -p 3000:3000 md-to-text-mcp
# Health check
curl http://localhost:3000/healthAPI Examples
Text Conversion
{
"name": "convert_text",
"arguments": {
"markdown": "# Hello World\n\nThis is **bold** text.",
"options": {
"preserveLinks": true,
"listStyle": "bullets"
}
}
}File Conversion
{
"name": "convert_file",
"arguments": {
"path": "/path/to/document.md",
"options": {
"headingStyle": "underline"
}
}
}URL Conversion
{
"name": "convert_url",
"arguments": {
"url": "https://raw.githubusercontent.com/user/repo/main/README.md",
"options": {
"codeHandling": "remove"
}
}
}Batch Conversion
{
"name": "batch_convert",
"arguments": {
"directory": "/path/to/docs",
"recursive": true,
"options": {
"tableFormat": "simple"
}
}
}Security
The server includes multiple layers of security:
Path Traversal Protection: Prevents access to system directories
File Size Limits: Default 10MB maximum
URL Validation: Only allows HTTP/HTTPS protocols
Private IP Filtering: Blocks access to internal networks
Content Sanitization: Removes potentially malicious content
Request Timeouts: Prevents long-running operations
Development
Project Structure
src/
āāā engine/ # Conversion engine
āāā security/ # Security validation
āāā tools/ # MCP tool implementations
āāā transports/ # Transport protocols
āāā types/ # TypeScript type definitions
āāā index.ts # Main entry pointDevelopment Commands
npm run build # Build project
npm run watch # Watch mode build
npm run dev:stdio # Development - stdio
npm run dev:http # Development - HTTPRelated Resources
Markdown Documentation
Complete Markdown Guide - Comprehensive Markdown syntax tutorial for efficient md to text conversion
Online Tools
MD to Text Converter - Free online Markdown to text conversion tool with real-time processing
License
MIT License
Available Tools
4 toolsbatch_convertA
Batch convert markdown files in a directory
Inputs: directory (required), options, pattern, recursive.
convert_fileB
Convert local markdown file to plain text
Inputs: path (required), options.
convert_textB
Convert markdown text to plain text
Inputs: markdown (required), options.
convert_urlB
Fetch remote URL markdown content and convert to plain text
Inputs: url (required), options.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogā¦
TDQS
Scored across 4 tools
Each tool targets a distinct input source: raw text, local file, URL, and directory batch. No overlap in purpose or behavior.
Three tools follow the convert_<source> pattern (convert_text, convert_file, convert_url), but batch_convert inverts the pattern. This is a minor deviation that doesn't hinder understanding.
Four tools cover the core input types for a markdown-to-text conversion server. Each tool has a clear and necessary role, and the count is well-scoped.
The tool surface covers all common input methods (text, file, URL, batch) with no obvious gaps for the stated purpose. Minor options like specifying output format are absent but not critical.
Maintenance
Related MCP Connectors
Document-to-Markdown MCP server ā convert PDF, Office and HTML into LLM-ready Markdown.
Document to Markdown MCP server: PDF, Word, PowerPoint, Excel and HTML, with OCR for large files.
Hosted MCP server: convert PDFs to clean, LLM-ready Markdown with tables, formulas and OCR.
Document conversion MCP server: PDF to Markdown, image OCR, spreadsheet parsing.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA server that provides document processing capabilities using the Model Context Protocol, allowing conversion of documents to markdown, extraction of tables, and processing of document images.19MIT
- AlicenseBqualityDmaintenanceA Model Context Protocol server that converts Markdown content to HTML format.14,207 npm2MIT
- AlicenseAqualityCmaintenanceA Model Context Protocol server that converts Markdown text to interactive mind maps with support for rich interactive operations and multi-format exports.1133 npm289MIT
- AlicenseBqualityDmaintenanceA Model Context Protocol server that allows LLMs to retrieve and convert web content to markdown without robots.txt restrictions.12MIT