@jkumonpm/markdown-utils-mcp
v1.0.2
Published
Markdown Utils MCP server — convert to HTML, extract headings/links, word count
Downloads
88
Maintainers
Readme
markdown-utils-mcp
Markdown Utils MCP server. Convert to HTML, extract headings/links, word count.
No external dependencies. Pure Regex processing.
Install
npm install -g markdown-utils-mcpUsage
Claude Desktop / Cursor / OpenCode
Add to your MCP config:
{
"mcpServers": {
"markdown-utils": {
"command": "npx",
"args": ["-y", "markdown-utils-mcp"]
}
}
}Tools
to_html — Markdown to HTML
Convert Markdown text to HTML.
Input:
{
"markdown": "# Hello\n\nThis is **bold** and *italic*.\n\n[Link](https://example.com)"
}Output:
<h1>Hello</h1>
<p>This is <strong>bold</strong> and <em>italic</em>.</p>
<p><a href="https://example.com">Link</a></p>extract_headings — Extract Headings
Extract all headings (H1-H6) from Markdown text.
Input:
{
"markdown": "# Title\n## Section\n### Subsection"
}Output:
{
"count": 3,
"headings": [
{ "level": 1, "text": "Title" },
{ "level": 2, "text": "Section" },
{ "level": 3, "text": "Subsection" }
]
}extract_links — Extract Links
Extract all links from Markdown text.
Input:
{
"markdown": "[Google](https://google.com)\n[GitHub](https://github.com)"
}Output:
{
"count": 2,
"links": [
{ "text": "Google", "url": "https://google.com" },
{ "text": "GitHub", "url": "https://github.com" }
]
}word_count — Word Count
Count words, characters, paragraphs, and lines in Markdown text.
Input:
{
"markdown": "# Hello World\n\nThis is a paragraph with some words."
}Output:
{
"words": 9,
"characters": 55,
"charactersNoSpaces": 46,
"paragraphs": 2,
"lines": 2
}Supported Markdown Syntax
| Syntax | Description |
|--------|-------------|
| # H1 - ###### H6 | Headings |
| **bold** | Bold text |
| *italic* | Italic text |
| [text](url) | Links |
| `code` | Inline code |
| ```lang\ncode\n``` | Code blocks |
| --- | Horizontal rules |
| > quote | Blockquotes |
| - item | Unordered lists |
| 1. item | Ordered lists |
Design
| Feature | Why |
|---------|-----|
| Zero runtime deps | Only @modelcontextprotocol/sdk and zod |
| Pure Regex | No Markdown parsing library needed |
| Fast conversion | Simple pattern matching, no AST |
| Structured output | JSON in → JSON/HTML out |
License
MIT
