mistizz_mcp_japanesetextanalyzer

mistizz_mcp_japanesetextanalyzer

by Mistizz
An MCP server for analyzing Japanese text with morphological analysis to evaluate linguistic features.

Japanese Text Analyzer MCP Server

Overview

The Japanese Text Analyzer MCP Server is a tool designed for morphological analysis of Japanese text. It measures and evaluates linguistic features of text, providing valuable feedback for text generation and analysis.

Japanese Text Analyzer MCP server

Features

  • Counts characters in Japanese text (excluding spaces and line breaks)
  • Counts words in Japanese text
  • Analyzes detailed linguistic features (average sentence length, part-of-speech ratios, lexical diversity, etc.)
  • Supports both file paths and direct text input
  • Flexible file path resolution (absolute, relative, or file name only)

Tools

count-chars

Measures the number of characters in a file.

Input:
- filePath (string): Path to the file

Output:
- Character count (excluding spaces and line breaks)

count-words

Measures the number of words in a file.

Input:
- filePath (string): Path to the file
- language (string, optional, default: "en"): Language of the file (en: English, ja: Japanese)

Output:
- Word count
- Detailed morphological analysis results for Japanese

count-clipboard-chars

Measures the number of characters in text.

Input:
- text (string): Text to analyze

Output:
- Character count (excluding spaces and line breaks)

count-clipboard-words

Measures the number of words in text.

Input:
- text (string): Text to analyze
- language (string, optional, default: "en"): Language of the text (en: English, ja: Japanese)

Output:
- Word count
- Detailed morphological analysis results for Japanese

analyze-text

Performs detailed morphological and linguistic analysis of text.

Input:
- text (string): Text to analyze

Output:
- Basic text information (total characters, sentences, morphemes)
- Detailed analysis results (average sentence length, part-of-speech ratios, lexical diversity, etc.)

analyze-file

Performs detailed morphological and linguistic analysis of a file.

Input:
- filePath (string): Path to the file

Output:
- Basic file information (total characters, sentences, morphemes)
- Detailed analysis results (average sentence length, part-of-speech ratios, lexical diversity, etc.)

Usage

Running with npx

You can run the package directly from the GitHub repository using npx:

npx -y github:Mistizz/mcp-JapaneseTextAnalyzer

Using with Claude for Desktop

Add the following to Claude for Desktop's configuration file:

Windows: %AppData%\Claude\claude_desktop_config.json

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "JapaneseTextAnalyzer": {
      "command": "npx",
      "args": [\
        "-y",\
        "github:Mistizz/mcp-JapaneseTextAnalyzer"\
      ]
    }
  }
}

Using with Cursor

Add similar settings to the mcp.json file in the .cursor folder.

Windows: %USERPROFILE%\.cursor\mcp.json

macOS/Linux: ~/.cursor/mcp.json

General settings (works in most environments):

{
  "mcpServers": {
    "JapaneseTextAnalyzer": {
      "command": "npx",
      "args": [\
        "-y",\
        "github:Mistizz/mcp-JapaneseTextAnalyzer"\
      ]
    }
  }
}

For Windows environments where the above doesn't work, try:

{
  "mcpServers": {
    "JapaneseTextAnalyzer": {
      "command": "cmd",
      "args": [\
        "/c",\
        "npx",\
        "-y",\
        "github:Mistizz/mcp-JapaneseTextAnalyzer"\
      ]
    }
  }
}

Examples

Counting Characters in Direct Text

このテキストの文字数を数えてください。

Counting Words in a File in Japanese Mode

C:\path\to\your\file.txt の単語数を日本語モードで数えてください。

Counting Words with WSL/Linux Path

/c/Users/username/Documents/file.txt の単語数を日本語モードで数えてください。

Counting Words with Just a File Name

README.md の単語数を英語モードで数えてください。

Counting Japanese Words in Pasted Text

次のテキストの日本語の単語数を数えてください:
吾輩は猫である。名前はまだ無い。どこで生れたかとんと見当がつかぬ。何でも薄暗いじめじめした所でニャーニャー泣いていた事だけは記憶している。

Analyzing Detailed Linguistic Features of Text

次のテキストを詳細に分析してください:
私は昨日、新しい本を買いました。とても面白そうな小説で、友人からの評判も良かったです。今週末にゆっくり読む予定です。

Analyzing Detailed Linguistic Features of a File

C:\path\to\your\file.txt を詳細に分析してください。

File Path Resolution

The tool flexibly searches for files when a path is specified:
1. Absolute paths (Windows or WSL/Linux format)
2. Relative paths based on the current directory
3. Home directory (%USERPROFILE% or $HOME)
4. Desktop directory
5. Documents directory

Internal Operations

The tool uses the kuromoji.js library for Japanese morphological analysis. Initialization may take time due to dictionary loading.

Linguistic Feature Analysis

The analyze-text and analyze-file tools calculate various linguistic features, including:
- Average sentence length
- Morphemes per sentence
- Part-of-speech ratios
- Character type ratios (hiragana, katakana, kanji, alphanumeric)
- Lexical diversity
- Katakana word frequency
- Politeness level (honorifics frequency)
- Average punctuation per sentence

License

This MCP server is provided under the MIT License. See the LICENSE file in the project repository for details.

About

MCP server for analyzing Japanese text with morphological analysis.

Resources

Readme

License

MIT license

Activity

Activity

Stars

1 star

Watchers

1 watching

Forks

1 fork

Contributors

Languages

Features & Capabilities

Categories
mcp_server model_context_protocol typescript japanese_text_analysis morphological_analysis kuromoji.js claude api_integration

Implementation Details

Stats

0 Views
1 GitHub Stars

Repository Info

Mistizz Organization

Similar MCP Servers

continuedev_continue by continuedev
25049
21423
9300