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.
Measures the number of characters in a file.
Input:
- filePath
(string): Path to the file
Output:
- Character count (excluding spaces and line breaks)
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
Measures the number of characters in text.
Input:
- text
(string): Text to analyze
Output:
- Character count (excluding spaces and line breaks)
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
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.)
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.)
You can run the package directly from the GitHub repository using npx:
npx -y github:Mistizz/mcp-JapaneseTextAnalyzer
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"\
]
}
}
}
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"\
]
}
}
}
このテキストの文字数を数えてください。
C:\path\to\your\file.txt の単語数を日本語モードで数えてください。
/c/Users/username/Documents/file.txt の単語数を日本語モードで数えてください。
README.md の単語数を英語モードで数えてください。
次のテキストの日本語の単語数を数えてください:
吾輩は猫である。名前はまだ無い。どこで生れたかとんと見当がつかぬ。何でも薄暗いじめじめした所でニャーニャー泣いていた事だけは記憶している。
次のテキストを詳細に分析してください:
私は昨日、新しい本を買いました。とても面白そうな小説で、友人からの評判も良かったです。今週末にゆっくり読む予定です。
C:\path\to\your\file.txt を詳細に分析してください。
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
The tool uses the kuromoji.js library for Japanese morphological analysis. Initialization may take time due to dictionary loading.
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
This MCP server is provided under the MIT License. See the LICENSE file in the project repository for details.
MCP server for analyzing Japanese text with morphological analysis.