Markdown Word Counter MCP Server

Markdown Word Counter MCP Server

markdown-word-counter-mcp•bylogan66666

A Model Context Protocol server that counts words in Markdown files, supporting both Chinese characters and English words.

License: MIT•Runtime: Awaiting documentation review•Category: file systems-docs

WHAT IT DOES

  • •Provides a count_words tool that returns the total word count of a Markdown file with configurable processing options.
  • •Provides a detailed_word_count tool that returns detailed statistics along with processing information.
  • •By default only normalizes whitespace; removing HTML tags, processing Markdown links, headers and lists are optional.
  • •Counts Chinese characters using the Unicode range and English words using word boundaries, then sums them into a total.

BEST FOR

  • •Measuring word counts in bilingual Markdown documents containing both Chinese and English text.
  • •Getting word counts after selectively stripping Markdown syntax such as headers, lists, links and HTML tags.

ABOUT MARKDOWN-WORD-COUNTER-MCP

Markdown Word Counter MCP Server is cataloged as an MCP server attributed to logan66666. A Model Context Protocol server that counts words in Markdown files, supporting both Chinese characters and English words. It is categorized under file systems-docs. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: MIT. Check the source repository's current license and terms before using, modifying or distributing this software.

能力检查器

能力定义尚未审核。未核验的采集内容不会作为可信接口展示。

Tools (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Resources (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Prompts (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for Markdown Word Counter MCP Server are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

Which configurable processing options does the server support?

It supports remove_html_tags, process_markdown_links, remove_markdown_headers, remove_markdown_lists, and normalize_whitespace, with whitespace normalization enabled by default and the rest off by default.

上游原版 README

在 GitHub 查看同一版本原文

README.md · 3e7a47be1d1f · 采集于 2026-11-13 12:13:58 UTC

保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。

当前显示最后一次成功采集的文档快照,请以来源页面为准。

Markdown Word Counter MCP Server

A Model Context Protocol (MCP) server that provides word counting functionality for Markdown files, with support for both Chinese characters and English words.

Features

  • Accurate Word Counting: Properly handles both Chinese characters and English words
  • Minimal Processing by Default: Only normalizes whitespace, preserves all content
  • Configurable Processing: Control what gets processed with flexible options
  • Markdown-Aware: Optionally removes Markdown syntax while preserving content
  • HTML Tag Removal: Optionally strips HTML tags from content
  • Link Processing: Optionally extracts text from Markdown links
  • Two Tools Available:
    • count_words: Get total word count with options
    • detailed_word_count: Get detailed statistics with processing info

Processing Options

By default, only whitespace is normalized. All other processing is optional:

  • remove_html_tags (default: false) - Remove HTML tags like <div>, <p>
  • process_markdown_links (default: false) - Extract text from [text](url) links
  • remove_markdown_headers (default: false) - Remove header markers #, ##, etc.
  • remove_markdown_lists (default: false) - Remove list markers -, *, +
  • normalize_whitespace (default: true) - Collapse multiple spaces/newlines

Installation

  1. Clone or download this repository
  2. Install dependencies:
    npm install
    
  3. Build the project:
    npm run build
    

Usage

As MCP Server

Add to your MCP client configuration (e.g., mcp_settings.json):

{
  "mcpServers": {
    "markdown-word-counter": {
      "command": "node",
      "args": [
        "/path/to/markdown-word-counter-mcp/build/index.js"
      ]
    }
  }
}

Available Tools

count_words

Count total words in a Markdown file.

Parameters:

  • file_path (string, required): Path to the Markdown file
  • remove_html_tags (boolean, optional): Remove HTML tags (default: false)
  • process_markdown_links (boolean, optional): Process Markdown links (default: false)
  • remove_markdown_headers (boolean, optional): Remove headers (default: false)
  • remove_markdown_lists (boolean, optional): Remove list markers (default: false)
  • normalize_whitespace (boolean, optional): Normalize whitespace (default: true)

Example (Default - Minimal Processing):

{
  "file_path": "document.md"
}

Example (Enable All Processing):

{
  "file_path": "document.md",
  "remove_html_tags": true,
  "process_markdown_links": true,
  "remove_markdown_headers": true,
  "remove_markdown_lists": true
}

detailed_word_count

Get detailed word count statistics with processing information.

Parameters:

  • Same as count_words

Example:

{
  "file_path": "document.md",
  "remove_markdown_headers": false
}

Standalone Usage

You can also run the server directly:

npm start

Development

  • npm run dev: Watch mode for development
  • npm run build: Build the TypeScript code
  • npm start: Run the built server

Word Counting Logic

The server uses the following logic to count words:

  1. Remove HTML tags: Strips all HTML markup
  2. Process Markdown links: Extracts link text, removes URLs
  3. Remove Markdown syntax: Headers (#), lists (-, *, +)
  4. Normalize whitespace: Collapses multiple spaces
  5. Count separately:
    • Chinese characters: Using Unicode range [\u4e00-\u9fa5]
    • English words: Using word boundaries \b\w+\b
  6. Sum totals: Chinese chars + English words = Total words

Examples

Default Processing (Minimal - Only Normalize Whitespace)

For a file containing:

# Hello 世界

This is a [link](http://example.com) with **bold** text.

- 中文测试
- English test

Default result (preserves all Markdown syntax):

  • Chinese Characters: 4 (中文测试)
  • English Words: 13 (Hello This is a link http example com with bold text English test)
  • Total Words: 17

Full Processing (All Options Enabled)

Same file with all processing enabled:

{
  "file_path": "document.md",
  "remove_html_tags": true,
  "process_markdown_links": true,
  "remove_markdown_headers": true,
  "remove_markdown_lists": true,
  "normalize_whitespace": true
}

Result with full processing:

  • Chinese Characters: 4 (世界中文测试)
  • English Words: 7 (Hello This is a link with bold text English test)
  • Total Words: 11

License

MIT

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for Markdown Word Counter MCP Server from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/markdown-word-counter-mcp)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

下载与拉取统计

来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。

尚无已审核的包 / 镜像标识,暂不展示下载统计。

Related file systems-docs MCP Servers

Alternative and complementary servers in the same category

View all in file systems-docs →

A Model Context Protocol server for global law with read-only tools to find and read provisions by date, trace the law behind each word, search text and changes, and check cases or briefs against law in force.

Repository stats unavailable
Files & Documentation
LoreKeeper MCP server
lorekeeper-rpg-lorekeeper-com•lore-keeper

Hosted MCP server for tabletop RPG worlds that organizes messy notes and documents into a private store and lets MCP apps search lore, read documents, find characters, and optionally generate character or world pictures.

Repository stats unavailable
Files & Documentation

An MCP server that gives AI assistants scoped file system operations inside a project directory, with read-only reference projects plus git and GitHub tools.

Repository stats unavailable
Files & Documentation