home / mcp / markdown mcp server

Markdown MCP Server

markdownlint-mcp

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "ernestgwilsonii-markdownlint-mcp": {
      "command": "npx",
      "args": [
        "markdownlint-mcp"
      ]
    }
  }
}

You can lint, auto-fix, and validate Markdown files with this MCP server, helping you enforce consistent style and compliance across your documentation workflows. It exposes AI-assisted tools to analyze Markdown content, automatically fix common issues, and display the current linting configuration so you can tailor rules to your standards.

How to use

Connect an MCP client to the server to access its capabilities. You can run linting to identify issues, apply automatic fixes to common problems, and verify that your Markdown files comply with established rules. Use the supported tools to analyze content, correct problems, and confirm the active configuration.

Available tools include lint_markdown for detailed issue reporting, fix_markdown to auto-correct problems and return corrected content, and get_configuration to display the current linting rules and settings. Use these tools in your MCP-assisted workflows to maintain high-quality Markdown across documents.

How to install

Prerequisites you need before installation are Node.js and npm. Ensure Node.js is installed on your system, then proceed with the installation command.

npm install markdownlint-mcp

Configuration and usage notes

Configuration is exposed through the get_configuration tool, which shows the current linting rules and how they are applied. You can fine-tune behavior by reviewing the reported configuration and adjusting your Markdown practices accordingly.

To run the MCP server from a client such as Claude Desktop, use the provided MCP configuration which runs the server via an inline command. The following example shows how to configure the client to invoke the server with the standard MCP entry point.

{
  "mcpServers": {
    "markdownlint": {
      "command": "npx",
      "args": ["markdownlint-mcp"]
    }
  }
}

Example workflows

Lint a Markdown file by asking the AI to analyze and report issues. The tool used is lint_markdown, which returns a list of detected problems and their locations.

Fix Markdown issues by instructing the AI to automatically correct problems. The fix_markdown tool applies deterministic improvements and returns the corrected content.

Validate compliance by requesting a check against standard formatting rules. The AI uses lint_markdown to assess compliance and communicates the results clearly.

Notes on rules and auto-fix coverage

The server relies on a standard Markdown linting ruleset and follows CommonMark conventions with GitHub Flavored Markdown. It supports the full set of markdownlint rules, and about 58% of the rules can be auto-fixed automatically. Auto-fixable rules cover whitespace, heading formatting, list styling, link and text formatting, and a subset of advanced fixes.

Security and maintenance

Run the MCP server in a secure environment and follow general best practices for Node.js applications. Keep the server dependencies up to date and monitor for updates to the markdownlint engine and related tooling.

Troubleshooting

If you encounter issues connecting your MCP client, verify that the installation completed successfully and that the client is configured with the correct command and arguments. Ensure the MCP client can reach the server and that any required permissions are granted for reading and writing Markdown files.

Available tools

lint_markdown

Analyze a Markdown file and report detailed issues found according to the linting rules.

fix_markdown

Automatically fix common Markdown issues and return the corrected content.

get_configuration

Display the current linting rules and configuration.