AI Answer Copier
AI Answer Copier is an MCP server that converts Markdown into 23+ professional document formats, analyzes documents, repairs broken Markdown, and converts content for various platforms — all from within your AI chat.
Document Conversion:
Plain Text – strip all formatting
HTML – full styled document with GFM tables and KaTeX math
Self-contained HTML string – inlined styles, no file I/O
Email-optimized HTML – compatible with Outlook, Gmail, and Apple Mail
PDF – via headless Chromium with KaTeX and syntax highlighting
DOCX – styled headings, lists, and code blocks
LaTeX – with native math pass-through
RTF – for legacy word processors
CSV – extracted tables
JSON – structured representation
XML – well-formed output
XLSX – one sheet per table
PNG – rendered via headless Chromium
Markdown – export or harmonize to file
Platform Converters: Slack (mrkdwn), Discord, JIRA, Confluence, AsciiDoc, reStructuredText, MediaWiki, BBCode, Textile, Emacs Org Mode
Import: Convert HTML (documents or fragments) back to Markdown
Repair & Lint:
Repair broken Markdown – unclosed fences, broken tables, stray markers, broken links
Lint Markdown – JSON report with line numbers, severity, rule names, and fixable flags
Document Analysis:
Extract code blocks, links, and images with metadata
Generate a Table of Contents with configurable depth
Get document statistics: word/line/character counts, reading time, element counts
View structural overview: heading outline, code block and link summaries
Harmonization: Normalize Markdown syntax (ATX headers, - list markers, fenced code blocks) without changing content
Additional Notes:
Binary formats (PDF, DOCX, XLSX, PNG) provide actionable file-saving guidance rather than raw base64
Runs locally without external API dependencies, ensuring data privacy
Pre-configured prompts (e.g.,
convert-document,extract-tables,analyze-and-repair) orchestrate multiple toolsResource URIs provide a JSON list of supported formats and a conversion guide
Enables the export of AI-generated questions and assessments into formats compatible with the Canvas Learning Management System.
Supports exporting questions and educational content as Markdown for use in GitHub-based learning repositories and documentation.
Facilitates the bulk upload of questions to Google Forms by exporting them into compatible spreadsheet formats.
Converts messy AI-generated output into clean, structured Markdown for documentation and educational materials.
Allows for the export of questions directly into formats that can be imported into the Moodle platform.
Provides XML-formatted exports for seamless integration with various learning management systems like Canvas, Blackboard, or Moodle.
AI Answer Copier — MCP-Powered Multi-Format Exporter
Turn "AI Noise" into "Classroom Ready" in 5 Seconds.
A Model Context Protocol (MCP) server that gives your AI assistant the power to convert Markdown into 22 professional document formats, batch-convert multiple documents across 22 formats in one call, analyze documents, repair broken Markdown, and convert across platforms — all without leaving your AI chat.
npm: https://www.npmjs.com/package/@xjtlumedia/markdown-mcp-server
Why This Exists
You asked an AI to write 20 questions. It delivered. But now you're stuck:
Pain Point | Manual Workflow | With AI Answer Copier |
Extracting Q&A | 10–15 min copying each line | 2 seconds (auto-detect) |
Formatting Math | 20 min fixing broken symbols | Instant (KaTeX support) |
LMS Upload | 15 min manual CSV entry | 1-click export |
Total Prep Time | ~45–60 minutes | < 1 minute |
Generating content takes seconds. Formatting it for the real world takes an hour. This MCP server eliminates that gap entirely.
Related MCP server: MarkItDown MCP Server
Live Demo
Online web version (no install needed): ai-answer-copier.vercel.app
Test MCP tool in inspector:
Use actual MCP instance:
All 34 MCP Tools
Document Conversion Tools (15)
# | Tool | Output | Description |
1 |
|
| Standardize and normalize Markdown syntax (ATX headers, |
2 |
|
| Strip all formatting to produce plain text |
3 |
|
| Full styled HTML document with GFM tables, KaTeX math, and embedded stylesheet |
4 |
| HTML string | Generate self-contained HTML with all styles inlined (read-only, no file I/O) |
5 |
|
| Print-ready PDF via headless Chromium with full KaTeX math and syntax highlighting |
6 |
|
| Microsoft Word document with styled headings, lists, and code formatting |
7 |
|
| LaTeX source code with |
8 |
|
| Rich Text Format for legacy word processors and email clients |
9 |
|
| Extract GFM pipe-tables to comma-separated values |
10 |
|
| Structured JSON representation with sections, headings, lists, code blocks, and tables |
11 |
|
| Well-formed XML with |
12 |
|
| Excel spreadsheet — each Markdown table becomes a sheet |
13 |
|
| Full-page PNG screenshot via headless Chromium |
14 |
|
| Export Markdown to file, optionally harmonizing formatting first ( |
15 |
|
| Email-optimized HTML with all styles inlined, compatible with Outlook, Gmail, Apple Mail |
Platform Converter Tools (10)
# | Tool | Target Platform | Description |
16 |
| Slack | mrkdwn format — bold as |
17 |
| Discord | Styled bold/underline headers, preserved code blocks |
18 |
| JIRA | Wiki markup — |
19 |
| Confluence | Wiki markup with |
20 |
| AsciiDoc |
|
21 |
| reStructuredText | Underlined headers, |
22 |
| MediaWiki |
|
23 |
| BBCode |
|
24 |
| Textile | Markup for Redmine, Basecamp, and CMS platforms |
25 |
| Emacs Org Mode |
|
Import Tools (1)
# | Tool | Description |
26 |
| Convert HTML content (full document or fragment) back to Markdown |
Repair & Lint Tools (2)
# | Tool | Description |
27 |
| Fix broken Markdown from LLM output or copy-paste — unclosed code fences, broken tables, stray emphasis markers, missing heading spaces, broken links |
28 |
| Lint and report issues as JSON array with line number, severity, rule name, message, and fixable flag |
Document Analysis Tools (5)
# | Tool | Description |
29 |
| Extract all code blocks with language, content, and start/end line numbers |
30 |
| Extract all links and images with text, URL, line number, and type (inline, reference, image, autolink) |
31 |
| Generate Markdown Table of Contents from headings with configurable |
32 |
| Comprehensive statistics — line/word/character/paragraph/sentence counts, heading/code/table/link/image counts, estimated reading time |
33 |
| Bird's-eye document architecture — statistics, heading outline, code block summary, link summary |
Batch Conversion (1)
# | Tool | Input | Description |
34 |
|
| Batch-convert multiple Markdown documents to 22 formats in one call. Error-isolated per item+format. Optional |
6 Built-in Prompts
Pre-configured prompt templates that orchestrate multiple tools:
Prompt | Description |
| Convert Markdown to any supported format (PDF, DOCX, HTML, LaTeX, CSV, JSON, XML, XLSX, RTF, PNG, TXT, MD) |
| Extract all tables from Markdown and export as CSV or XLSX |
| Harmonize formatting, then convert to both PDF and HTML for distribution |
| Lint → Repair → Re-lint to confirm all issues resolved |
| Convert Markdown to any platform format (Slack, Discord, JIRA, Confluence, AsciiDoc, RST, MediaWiki, BBCode, Textile, Org Mode) |
| Full overview — statistics, TOC, code blocks, and links in one report |
2 Resources
Resource URI | Description |
| Complete JSON list of all 23+ output formats with tool names and types |
| Guide for choosing the right output format based on your use case |
Quick Start
Install via npx (Recommended)
No installation needed — just configure your MCP client:
{
"mcpServers": {
"ai-answer-copier": {
"command": "npx",
"args": ["-y", "@xjtlumedia/markdown-mcp-server"]
}
}
}Install Globally
npm install -g @xjtlumedia/markdown-mcp-serverThen configure:
{
"mcpServers": {
"ai-answer-copier": {
"command": "markdown-mcp-server"
}
}
}Configuration by AI Client
🔌 Claude Desktop
Edit %APPDATA%\Claude\claude_desktop_config.json (Windows) or ~/Library/Application Support/Claude/claude_desktop_config.json (macOS):
{
"mcpServers": {
"ai-answer-copier": {
"command": "npx",
"args": ["-y", "@xjtlumedia/markdown-mcp-server"]
}
}
}Restart Claude Desktop. You'll see a 🔌 icon — all 34 tools are now available.
VS Code (GitHub Copilot)
Add to .vscode/mcp.json or VS Code settings:
{
"servers": {
"ai-answer-copier": {
"command": "npx",
"args": ["-y", "@xjtlumedia/markdown-mcp-server"]
}
}
}Cursor / Windsurf / Any MCP Client
Use the same npx command pattern above in your client's MCP configuration.
DIY version (local build)
{
"mcpServers": {
"markdown-formatter": {
"command": "node",
"args": [
"YOUR_PATH_TO_PROJECT/mcp-server/dist/mcp-server/src/index.js"
]
}
}
}Replace YOUR_PATH_TO_PROJECT with the absolute path to this folder.
HTTP Mode (Vercel)
A hosted HTTP endpoint is available for browser-based and remote integrations:
https://ai-answer-copier.vercel.app/api/mcpTest with MCP Inspector:
npx @modelcontextprotocol/inspector https://ai-answer-copier.vercel.app/api/mcpUsage Examples
Once connected, just talk to your AI naturally:
"Batch-convert 5 markdown documents into DOCX, PDF, and HTML simultaneously and save them to my Downloads folder." → AI uses
batch_convertwith items[] and formats[]
"Generate 10 physics questions about Newton's Laws and export them as a Kahoot CSV." → AI uses
convert_to_csv
"Convert this markdown into a Word document and save it to my Desktop." → AI calls
convert_to_docxwithoutput_path
"Take these lecture notes and produce a print-ready PDF." → AI calls
convert_to_pdfwith Puppeteer rendering, KaTeX math, and syntax highlighting
"Turn this into a Moodle-compatible XML quiz bank." → AI calls
convert_to_xml
"Format this for Slack and send it to the team channel." → AI calls
convert_to_slack
"Check this Markdown for issues and fix them." → AI calls
lint_markdownthenrepair_markdown
"Give me an overview of this document — word count, structure, all links." → AI chains
analyze_document+generate_toc+extract_links
Features
22 Output Formats
Export to PDF, DOCX, HTML, LaTeX, CSV, JSON, XML, XLSX, RTF, PNG, TXT, Markdown — plus Slack, Discord, JIRA, Confluence, AsciiDoc, RST, MediaWiki, BBCode, Textile, Org Mode, and Email HTML.
Batch Conversion
Convert multiple Markdown documents to multiple formats in one batch_convert call. Errors are isolated per item+format so one failure never blocks the rest.
Math & Code as First-Class Citizens
Full support for KaTeX math expressions and syntax-highlighted code blocks. Your $\sqrt{x^2 + y^2}$ and Python snippets survive every conversion perfectly.
Smart Binary Handling
Binary formats (PDF, DOCX, XLSX, PNG) don't dump raw base64 into chat. The server returns actionable guidance so the AI knows to save to a file path.
Document Analysis & Repair
Lint Markdown, auto-repair broken formatting, extract code blocks and links, generate Table of Contents, and get comprehensive document statistics — all without leaving the chat.
GFM (GitHub Flavored Markdown)
Tables, task lists, strikethrough, autolinks — all parsed correctly via remark-gfm.
Puppeteer-Powered PDF & PNG
PDF and image exports use headless Chromium for pixel-perfect rendering with full CSS styling, KaTeX math, syntax highlighting, and print-optimized layouts.
Self-Contained
Zero runtime dependencies on external APIs. Everything runs locally. Your data never leaves your computer.
Architecture
┌─────────────────────────┐
│ AI Client │
│ (Claude, Copilot, │
│ Cursor, Windsurf) │
└──────────┬──────────────┘
│ MCP Protocol (stdio / HTTP)
▼
┌─────────────────────────┐
│ AI Answer Copier │
│ MCP Server (34 tools) │
│ │
│ ┌── Conversion ────────┐│
│ │ remark/rehype, docx, ││
│ │ puppeteer, xlsx, ││
│ │ CSV/JSON/XML/RTF/ ││
│ │ LaTeX/TXT parsers ││
│ └──────────────────────┘│
│ ┌── Platform ──────────┐│
│ │ Slack, Discord, JIRA,││
│ │ Confluence, AsciiDoc,││
│ │ RST, MediaWiki, ││
│ │ BBCode, Textile, Org ││
│ └──────────────────────┘│
│ ┌── Batch ─────────────┐│
│ │ items[] × formats[] ││
│ │ 22 formats, isolated ││
│ └──────────────────────┘│
│ ┌── Analysis ──────────┐│
│ │ Code blocks, links, ││
│ │ TOC, stats, structure││
│ └──────────────────────┘│
│ ┌── Repair ────────────┐│
│ │ Lint, auto-repair ││
│ └──────────────────────┘│
│ ┌── Import ────────────┐│
│ │ HTML → Markdown ││
│ └──────────────────────┘│
└─────────────────────────┘What's New in v2.1.0
This release hardens both the local (npx) and remote Vercel MCP transports with 8 logic fixes:
# | Fix | Area |
1 | Browser not closed on error — | Both transports |
2 |
| Vercel |
3 |
| Vercel |
4 | Session map memory leak — | Vercel |
5 |
| Vercel |
6 |
| Vercel |
7 | No input size validation — added 1 GB hard limit ( | Both transports |
8 | DELETE method creates new session — handler now returns | Vercel |
Known Limitations
PDF / PNG require local Chromium —
convert_to_pdfandconvert_to_imagelaunch a headless browser. This works fine withnpxbut is unavailable on Vercel's free tier (no bundled Chromium). Set thePUPPETEER_EXECUTABLE_PATHenvironment variable to point to your local Chrome if auto-detection fails.Chromium version on Vercel — the remote endpoint uses
@sparticuz/chromium-minwith a pinned tar at v131.0.1. If Vercel bumps the Lambda runtime you may need to update theCHROMIUM_TAR_URLenv var.1 MB input limit — all tool calls reject inputs larger than 1 MB. Split large documents into sections before converting.
Session TTL (remote only) — sessions on the Vercel endpoint expire after 30 minutes of inactivity. Long-running stateful workflows should issue periodic keep-alive calls.
Development
# Clone the repository
git clone https://github.com/XJTLUmedia/AI_answer_copier.git
# Web app
npm install
npm run dev
# MCP server
cd mcp-server
npm install
npm run dev # hot reload
npm run build # production build
npm run inspector # test with MCP InspectorTech Stack
Component | Technology |
MCP SDK |
|
Markdown Parser |
|
Math Rendering |
|
Word Export |
|
Excel Export |
|
PDF/PNG Export |
|
Schema Validation |
|
Runtime | Node.js (ESM) |
Contributing
We welcome contributions! Whether it's a new export format, a bug fix, or documentation improvement — please consider making a pull request.
Fork the repository
Create a feature branch
Submit a pull request
License
Available Tools
33 toolsanalyze_documentARead-onlyIdempotent
Analyze a Markdown document and return comprehensive statistics. Returns JSON with: line/word/character/paragraph/sentence counts, heading/code block/table/link/image/list/blockquote counts, and estimated reading time in minutes.
Inputs: markdown (required).
convert_to_asciidocAIdempotent
Convert Markdown to AsciiDoc format. Transforms headers to = syntax, code blocks to ---- delimited blocks, links to url[text] syntax, and images to image::url[alt] directives.
Inputs: markdown (required), output_path.
convert_to_bbcodeAIdempotent
Convert Markdown to BBCode format. Transforms formatting to [b], [i], [s], [code], [url], [img] tags. Used for forum posts on phpBB, vBulletin, and similar platforms.
Inputs: markdown (required), output_path.
convert_to_confluenceAIdempotent
Convert Markdown to Confluence wiki markup. Similar to JIRA but includes Confluence-specific {info}, {note} panels and {code:language=x} syntax.
Inputs: markdown (required), output_path.
convert_to_csvAIdempotent
Extract tables from Markdown and convert them to CSV format. Parses GFM pipe-tables from the input and outputs comma-separated values. If the Markdown contains multiple tables, they are concatenated with a blank line separator. Non-table content is ignored. If the Markdown contains no tables, returns an empty string. Side effects: when output_path is provided, writes the CSV to disk (creates parent directories, overwrites existing files). When output_path is omitted, returns the CSV text directly as a string. Returns: CSV text string (if no output_path), or JSON { success, file_path, file_size_bytes, format } (if output_path set). Use this for lightweight tabular export or when downstream tools expect CSV. Prefer convert_to_xlsx for Excel-compatible spreadsheets with multiple sheets, or convert_to_json for structured data.
Inputs: markdown (required), output_path.
convert_to_discordAIdempotent
Convert Markdown to Discord-compatible format. Transforms headers to styled bold/underline text that renders correctly in Discord messages. Code blocks and basic formatting are preserved.
Inputs: markdown (required), output_path.
convert_to_docxAIdempotent
Convert Markdown to a Microsoft Word DOCX file. Produces a binary .docx document with styled headings, bold/italic text, numbered and bulleted lists, and code formatting. This is a binary format — output_path should almost always be provided. Side effects: when output_path is provided, writes the DOCX binary to disk (creates parent directories, overwrites existing files). When output_path is omitted, returns a JSON object with { format: 'docx', file_size_bytes, hint, base64_preview } — the hint will tell you to re-call with output_path to save the file. Returns: JSON write-confirmation (if output_path set), or JSON binary-guidance object (if omitted). Use this for Word-compatible documents. Prefer convert_to_rtf for legacy word processors, convert_to_pdf for read-only distribution, or convert_to_html for web.
Inputs: markdown (required), output_path.
convert_to_email_htmlAIdempotent
Convert Markdown to email-optimized HTML with all styles inlined. Produces HTML compatible with Outlook, Gmail, Apple Mail, and other email clients. No external CSS dependencies. Wraps content in a responsive email table layout.
Inputs: markdown (required), output_path.
convert_to_htmlAIdempotent
Convert Markdown to a complete, styled HTML document. Renders GFM (tables, task lists, strikethrough) and KaTeX math into semantic HTML with an embedded stylesheet for clean presentation. The output is a full document with (charset, KaTeX CSS CDN link, inline styles) and . Side effects: when output_path is provided, writes the HTML file to disk (creates parent directories, overwrites existing files). When output_path is omitted, returns the full HTML string directly. Returns: HTML document string (if no output_path), or JSON { success, file_path, file_size_bytes, format } (if output_path set). Use this when you need a file saved to disk or when you need the full document. Prefer generate_html if you only need the HTML string returned directly (no file I/O) and want inline styles without a CDN link. Prefer convert_to_pdf for print-ready output, or convert_to_image for a visual snapshot.
Inputs: markdown (required), output_path.
convert_to_imageAIdempotent
Convert Markdown to a PNG image. Renders the Markdown as styled HTML (GFM tables, KaTeX math) and takes a full-page screenshot via a headless Chromium browser (Puppeteer). Requires a locally installed Chrome, Edge, or Chromium — set PUPPETEER_EXECUTABLE_PATH env var to override auto-detection. This is a binary format — output_path should almost always be provided. Side effects: launches a transient headless browser process (no persistent state; may fetch KaTeX CDN stylesheet). When output_path is provided, writes the PNG to disk (creates parent directories, overwrites existing files). When output_path is omitted, returns JSON { format: 'png', file_size_bytes, hint, base64_preview }. Returns: JSON write-confirmation (if output_path set), or JSON binary-guidance object (if omitted). Use this when you need a visual snapshot of the rendered Markdown (e.g. for embedding in chat, previews, social cards). Prefer convert_to_pdf for paginated print output, or convert_to_html for interactive web content.
Inputs: markdown (required), output_path.
convert_to_jiraAIdempotent
Convert Markdown to JIRA wiki markup. Transforms headers to h1./h2., bold to single asterisks, code blocks to {code} blocks, links to [text|url], and lists to JIRA * and # syntax.
Inputs: markdown (required), output_path.
convert_to_jsonAIdempotent
Convert Markdown to a structured JSON representation. Parses the document into a JSON object with the document title as the root key, containing arrays of section objects with headings, paragraphs, lists, code blocks, and tables. Useful for programmatic analysis or feeding structured content into other systems. Side effects: when output_path is provided, writes the JSON to disk (creates parent directories, overwrites existing files). When output_path is omitted, returns the JSON string directly. Returns: JSON string (if no output_path), or JSON { success, file_path, file_size_bytes, format } (if output_path set). Use this when you need a machine-readable AST-like representation of the Markdown content. Prefer convert_to_xml for XML-based interchange, or convert_to_csv/convert_to_xlsx for tabular data extraction.
Inputs: markdown (required), title, output_path.
convert_to_latexAIdempotent
Convert Markdown to LaTeX source code. Produces a LaTeX document fragment with \section, \textbf, \textit, \begin{itemize}/\begin{enumerate} list environments, verbatim code blocks, and table environments. KaTeX math expressions in the Markdown are passed through as native LaTeX math. Side effects: when output_path is provided, writes the .tex file to disk (creates parent directories, overwrites existing files). When output_path is omitted, returns the LaTeX source as a string. Returns: LaTeX source string (if no output_path), or JSON { success, file_path, file_size_bytes, format } (if output_path set). Use this when you need to embed content in a LaTeX workflow or compile to PDF via pdflatex/xelatex externally. For direct PDF output without a LaTeX toolchain, use convert_to_pdf instead.
Inputs: markdown (required), output_path.
convert_to_mdAIdempotent
Export Markdown content, optionally harmonizing its formatting first. When harmonize=false (default), returns the input Markdown unchanged. When harmonize=true, applies the same normalization as harmonize_markdown (ATX-style headers, '-' list markers, fenced code blocks, consistent indentation) before returning. Side effects: when output_path is provided, writes the Markdown to disk (creates parent directories, overwrites existing files). When output_path is omitted, returns the Markdown string directly. Returns: Markdown string (if no output_path), or JSON { success, file_path, file_size_bytes, format } (if output_path set). Use this when you want to save Markdown to a file (with or without cleanup). Prefer harmonize_markdown if you only want to normalize formatting without saving to disk. Use the convert_to_* family for other output formats.
Inputs: markdown (required), harmonize, output_path.
convert_to_mediawikiAIdempotent
Convert Markdown to MediaWiki markup. Transforms headers to == syntax, bold to triple quotes, code to tags, and tables to {| wikitable format.
Inputs: markdown (required), output_path.
convert_to_orgmodeAIdempotent
Convert Markdown to Emacs Org Mode format. Transforms headers to * syntax, bold to text, code blocks to #+BEGIN_SRC/#+END_SRC, and links to [[url][text]] syntax.
Inputs: markdown (required), output_path.
convert_to_pdfAIdempotent
Convert Markdown to a PDF document. Renders the Markdown as styled HTML (GFM tables, KaTeX math) and then prints it to PDF via a headless Chromium browser (Puppeteer). Requires a locally installed Chrome, Edge, or Chromium — set PUPPETEER_EXECUTABLE_PATH env var to override auto-detection. This is a binary format — output_path should almost always be provided. Side effects: launches a transient headless browser process for rendering (no network requests are made for the conversion itself, though the HTML references a CDN KaTeX stylesheet which may be fetched). When output_path is provided, writes the PDF to disk (creates parent directories, overwrites existing files). When output_path is omitted, returns JSON { format: 'pdf', file_size_bytes, hint, base64_preview }. Returns: JSON write-confirmation (if output_path set), or JSON binary-guidance object (if omitted). Use this for high-fidelity, print-ready document output. Prefer convert_to_html for web-viewable output, convert_to_docx for editable documents, or convert_to_latex for LaTeX toolchains.
Inputs: markdown (required), output_path.
convert_to_rstAIdempotent
Convert Markdown to reStructuredText (RST) format. Transforms headers to underlined text, code blocks to .. code-block:: directives, and links to RST reference syntax.
Inputs: markdown (required), output_path.
convert_to_rtfAIdempotent
Convert Markdown to Rich Text Format (RTF). Produces an RTF document string preserving basic formatting: bold, italic, headers (as styled paragraphs), lists, and code blocks. Side effects: when output_path is provided, writes the RTF file to disk (creates parent directories, overwrites existing files). When output_path is omitted, returns the raw RTF markup as a string. Returns: RTF markup string (if no output_path), or JSON { success, file_path, file_size_bytes, format } (if output_path set). Use this when the target application requires RTF (e.g. legacy word processors, email clients). Prefer convert_to_docx for modern Word documents, or convert_to_html for web display.
Inputs: markdown (required), output_path.
convert_to_slackAIdempotent
Convert Markdown to Slack mrkdwn format. Transforms bold (**) to single asterisks, italic to underscores, links to Slack <url|text> syntax, and headers to bold text. Use this when pasting formatted content into Slack messages.
Inputs: markdown (required), output_path.
convert_to_textileAIdempotent
Convert Markdown to Textile markup format. Used by Redmine, older versions of Basecamp, and some CMS platforms.
Inputs: markdown (required), output_path.
convert_to_txtAIdempotent
Convert Markdown to plain text by stripping all formatting — removes headers, bold/italic markers, links, images, code fences, and HTML tags. The result is a human-readable plain-text string with no markup. This is a destructive conversion: formatting information is permanently lost. Side effects: when output_path is provided, writes the plain text to disk (creates parent directories, overwrites existing files). When output_path is omitted, returns the plain text string directly. Returns: plain text string (if no output_path), or JSON { success, file_path, file_size_bytes, format } (if output_path set). Use this instead of convert_to_md when you need formatting-free content (e.g. for indexing, search, or clipboard). Use convert_to_html or convert_to_pdf if you need to preserve the document's visual structure.
Inputs: markdown (required), output_path.
convert_to_xlsxAIdempotent
Convert Markdown tables to a Microsoft Excel XLSX spreadsheet. Parses GFM pipe-tables from the input and creates an Excel workbook. Each table becomes a sheet in the workbook. Non-table content is ignored. If the Markdown contains no tables, produces an empty workbook. This is a binary format — output_path should almost always be provided. Side effects: when output_path is provided, writes the XLSX binary to disk (creates parent directories, overwrites existing files). When output_path is omitted, returns JSON { format: 'xlsx', file_size_bytes, hint, base64_preview }. Returns: JSON write-confirmation (if output_path set), or JSON binary-guidance object (if omitted). Use this when you need a full Excel file with formatting. Prefer convert_to_csv for lightweight plain-text tabular export, or convert_to_json for structured programmatic access.
Inputs: markdown (required), output_path.
convert_to_xmlAIdempotent
Convert Markdown to an XML document. Parses the Markdown into a structured XML tree with a root element named after the title parameter, containing , , , , , and elements. Produces well-formed XML with an declaration. Side effects: when output_path is provided, writes the XML to disk (creates parent directories, overwrites existing files). When output_path is omitted, returns the XML string directly. Returns: XML string (if no output_path), or JSON { success, file_path, file_size_bytes, format } (if output_path set). Use this for XML-based data interchange or when downstream systems require XML input. Prefer convert_to_json for JSON APIs, convert_to_html for XHTML/web content, or convert_to_csv for flat tabular data.
Inputs: markdown (required), title, output_path.
extract_code_blocksARead-onlyIdempotent
Extract all code blocks from a Markdown document. Returns a JSON array of code blocks, each with language, code content, and start/end line numbers. Useful for extracting code snippets from LLM responses or documentation.
Inputs: markdown (required).
extract_linksARead-onlyIdempotent
Extract all links and images from a Markdown document. Returns a JSON array with link text, URL, line number, and type (inline, reference, image, autolink). Useful for link checking, SEO analysis, or extracting references.
Inputs: markdown (required).
extract_structureARead-onlyIdempotent
Extract the full structure of a Markdown document. Returns JSON with document statistics, heading outline, code block summary (language, line count, positions), and link summary (totals by type, unique URL count). Provides a bird's-eye view of document architecture.
Inputs: markdown (required).
generate_htmlARead-onlyIdempotent
Generate a complete, self-contained HTML document from Markdown with all styles inlined. Renders GFM (tables, task lists, strikethrough) and KaTeX math into a full HTML page with an embedded block and a KaTeX CSS CDN link. Returns the HTML string directly — no file is written to disk. Side effects: none. This tool is read-only and performs no file I/O. Returns: a complete HTML document string (…) with inline styles, ready for rendering in a browser. The optional title parameter sets the tag in the HTML section. Use this when you need styled HTML output returned as a string (e.g., for embedding in responses or previewing). Prefer convert_to_html when you need to write the HTML to a file on disk. Prefer convert_to_pdf or convert_to_image for non-HTML visual output formats.
Inputs: markdown (required), title.
generate_tocARead-onlyIdempotent
Generate a Table of Contents from Markdown headings. Returns a Markdown-formatted TOC with indented links to each heading. Handles duplicate heading slugs. The max_depth parameter controls the deepest heading level to include.
Inputs: markdown (required), max_depth.
harmonize_markdownAIdempotent
Standardize and normalize Markdown syntax without changing the document's meaning. Re-formats headers (ATX-style), normalizes list markers to '-', enforces fenced code blocks with backticks, and applies consistent indentation. Side effects: when output_path is provided, writes the harmonized Markdown to disk (creates parent directories as needed, overwrites existing files). When output_path is omitted, returns the harmonized text as a string with no file I/O. Returns: harmonized Markdown string (if no output_path), or JSON with { success, file_path, file_size_bytes, format } (if output_path set). Use this tool when you need to clean up inconsistent Markdown formatting before further processing. Prefer convert_to_md with harmonize=true if you also need to save the result, as it combines both steps. Not suitable for converting Markdown to other formats — use the convert_to_* tools instead.
Inputs: markdown (required), output_path.
html_to_markdownAIdempotent
Convert HTML to Markdown. Performs round-trip import of HTML content back to Markdown format. Handles headings, tables, lists, code blocks, links, images, and inline formatting. Useful for importing web content or converting HTML emails to Markdown.
Inputs: html (required), output_path.
lint_markdownARead-onlyIdempotent
Lint Markdown and report issues. Returns a JSON array of lint issues found in the document, each with line number, column, severity (error/warning/info), rule name, message, and fixable flag. Checks for: missing heading spaces, trailing whitespace, inconsistent list markers, hard tabs, multiple blank lines, bare URLs, unclosed emphasis, and unclosed code fences.
Inputs: markdown (required).
repair_markdownAIdempotent
Repair broken Markdown from LLM output or copy-paste. Fixes unclosed code fences, broken tables (mismatched columns, missing separators), stray emphasis markers, missing heading spaces, inconsistent list indentation, broken links, and excessive whitespace.
Inputs: markdown (required), output_path.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 33 tools
Significant overlap exists between convert_to_html and generate_html (both produce HTML, differing only in file I/O behavior) and between convert_to_md with harmonize=true and harmonize_markdown (identical functionality). These duplications force agents to carefully read descriptions to distinguish tools that could have been parameters or a single tool.
The vast majority of tools follow a strict verb_noun convention (convert_to_*, extract_*, generate_*, harmonize_*, lint_*, repair_*). However, html_to_markdown breaks this pattern (should be convert_from_html or import_html), and analyze_document is slightly vague compared to the specific extract_* tools.
With 33 tools, this significantly exceeds the 25+ threshold where count becomes overwhelming. The server converts Markdown to 20+ formats, but this could be consolidated into a single convert tool with a format parameter, reducing surface area and cognitive load for agents.
Excellent coverage of Markdown export formats (20+ targets), analysis (lint, statistics, structure extraction), and repair operations. Minor gap: only supports HTML as an input format (html_to_markdown), lacking import from Word, PDF, or other common formats for a fully bidirectional converter.
Maintenance
Related MCP Connectors
Use your own Word templates to convert Markdown → DOCX/PDF/HTML from any MCP-compatible AI.
Document-to-Markdown MCP server — convert PDF, Office and HTML into LLM-ready Markdown.
Generate PDF, Word (.docx) and PowerPoint (.pptx) documents from Markdown over MCP.
Hosted MCP server: convert PDFs to clean, LLM-ready Markdown with tables, formulas and OCR.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that converts various file formats (PDF, PowerPoint, Word, Excel, Images, etc.) to Markdown to make them accessible to LLMs.1MIT
- AlicenseAqualityBmaintenanceA Model Context Protocol server that converts over 29 file formats, including PDFs, Office documents, and audio, into structured Markdown using Microsoft's MarkItDown library. It enables AI assistants to process diverse document types through single file conversion and batch directory processing.3149 PyPI49MIT
- AlicenseAqualityDmaintenanceA Model Context Protocol server that converts diverse file types, including PDFs, images, audio, and Office documents, into Markdown format. It also transforms web content like YouTube transcripts and Bing search results into readable text for model consumption.13MIT
- AlicenseAqualityNot gradedmaintenanceAn MCP server that enables AI agents to instantly convert Markdown into beautiful, ready-to-deliver Word, PDF, HTML with sidebars, and Slideshow documents, bridging the "last mile" of AI content generation.728 npm1-