Markdown Tools MCP Server

Local setup required. This server has to be cloned and prepared on your machine before you register it in Claude Code.
1

Set the server up locally

Run this once to clone and prepare the server before adding it to Claude Code.

Run in terminal
npm install
npm run build
2

Register it in Claude Code

After the local setup is done, run this command to point Claude Code at the built server.

Run in terminal
claude mcp add markdown-tools -- node "<FULL_PATH_TO_MCP_MARKDOWN_TOOLS>/dist/index.js"

Replace <FULL_PATH_TO_MCP_MARKDOWN_TOOLS>/dist/index.js with the actual folder you prepared in step 1.

README.md

An MCP server for analyzing, linting, formatting, and generating Markdown.

mcp-markdown-tools

An MCP (Model Context Protocol) server that provides tools for working with Markdown content. Analyze, lint, format, and generate Markdown programmatically through any MCP-compatible client.

Tools

generate_toc

Generate a table of contents from markdown headings. Configure minimum/maximum heading depth and choose between ordered or unordered list output.

lint_markdown

Check markdown for common issues including broken link syntax, heading hierarchy violations, trailing whitespace, missing image alt text, inconsistent list markers, and excessive blank lines.

format_markdown

Format and prettify markdown content. Normalizes heading styles (converts setext to ATX), fixes spacing around headings and blocks, aligns table columns, and wraps long lines at configurable width.

markdown_stats

Compute detailed statistics from markdown content: word count, character count, estimated reading time, headings by level, link count, image count, code block count with language distribution, list items, blockquotes, and paragraph count.

generate_table

Generate formatted markdown tables from JSON data. Supports column selection, custom header labels, and per-column alignment (left, center, right).

Installation

npm install
npm run build

Usage with Claude Desktop

Add the following to your Claude Desktop configuration file:

  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "markdown-tools": {
      "command": "node",
      "args": ["D:/products/mcp-servers/mcp-markdown-tools/dist/index.js"]
    }
  }
}

Usage with Claude Code

Add the server using the Claude Code CLI:

claude mcp add markdown-tools node D:/products/mcp-servers/mcp-markdown-tools/dist/index.js

Or add it to your .mcp.json configuration:

{
  "mcpServers": {
    "markdown-tools": {
      "command": "node",
      "args": ["D:/products/mcp-servers/mcp-markdown-tools/dist/index.js"]
    }
  }
}

Development

npm install
npm run build
npm start

License

MIT

Tools (5)

generate_tocGenerate a table of contents from markdown headings.
lint_markdownCheck markdown for common issues like broken links, heading hierarchy, and whitespace.
format_markdownFormat and prettify markdown content, normalizing styles and aligning tables.
markdown_statsCompute detailed statistics from markdown content including word count and reading time.
generate_tableGenerate formatted markdown tables from JSON data.

Configuration

claude_desktop_config.json
{"mcpServers": {"markdown-tools": {"command": "node", "args": ["/path/to/mcp-markdown-tools/dist/index.js"]}}}

Try it

Generate a table of contents for the current markdown file with a maximum depth of 3.
Lint this markdown file and fix any heading hierarchy violations.
Format the provided markdown content to ensure table columns are aligned and lines are wrapped.
Calculate the reading time and word count for this documentation file.
Convert this JSON data into a formatted markdown table with center alignment.

Frequently Asked Questions

What are the key features of Markdown Tools?

Automatic table of contents generation. Comprehensive markdown linting for syntax and style issues. Markdown formatting and prettification. Detailed content statistics including reading time and block distribution. JSON to Markdown table conversion.

What can I use Markdown Tools for?

Standardizing documentation style across a large repository. Automating the creation of tables of contents for long-form technical guides. Validating markdown files for broken links and formatting errors before publishing. Generating summary reports for documentation length and complexity. Converting structured data exports into readable markdown tables.

How do I install Markdown Tools?

Install Markdown Tools by running: npm install && npm run build

What MCP clients work with Markdown Tools?

Markdown Tools works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep Markdown Tools docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare