Japanese Text Analyzer MCP server

Enables detailed Japanese text analysis through morphological parsing with Kuromoji, breaking down sentences into component parts with grammatical functions, readings, and base forms for language learning and translation applications.
Back to servers
Setup instructions
Provider
Mistizz
Release date
Mar 23, 2025
Language
TypeScript
Stats
2 stars

This Japanese Text Analyzer MCP server enables morphological analysis of Japanese text, measuring and evaluating linguistic features to provide feedback for text generation.

Features

  • Count characters in Japanese text (excluding spaces and line breaks)
  • Count words in Japanese text
  • Analyze detailed linguistic features (average sentence length, part-of-speech ratios, vocabulary diversity)
  • Support for both file paths and direct text input
  • Flexible file path resolution (absolute paths, relative paths, or file names only)

Installation

Via Smithery

To install Japanese Text Analyzer for Claude Desktop automatically:

npx -y @smithery/cli install @Mistizz/mcp-JapaneseTextAnalyzer --client claude

Using npx

Run the package directly from GitHub:

npx -y github:Mistizz/mcp-JapaneseTextAnalyzer

Setup 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"
      ]
    }
  }
}

Setup with Cursor

Add similar configuration to the mcp.json file in the .cursor folder:

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

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

General configuration (works for most environments):

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

Alternative for Windows if the above doesn't work:

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

Usage Examples

Counting characters in text

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

Counting words in a file with Japanese mode

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

Using WSL/Linux format path

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

Counting words with just a filename

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

Counting Japanese words in pasted text

次のテキストの日本語の単語数を数えてください:

吾輩は猫である。名前はまだ無い。どこで生れたかとんと見当がつかぬ。何でも薄暗いじめじめした所でニャーニャー泣いていた事だけは記憶している。

Analyzing linguistic features in text

次のテキストを詳細に分析してください:

私は昨日、新しい本を買いました。とても面白そうな小説で、友人からの評判も良かったです。今週末にゆっくり読む予定です。

Analyzing linguistic features in a file

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

Available Tools

count_chars

Counts characters in a file, excluding spaces and line breaks.

Input:

  • filePath (string): Path to the file

Output:

  • Character count (excluding spaces and line breaks)

count_words

Counts words in a file using space delimiters for English or morphological analysis for Japanese.

Input:

  • filePath (string): Path to the file
  • language (string, optional, default: "en"): File language (en: English, ja: Japanese)

Output:

  • Word count
  • Detailed morphological analysis results (for Japanese mode)

count_clipboard_chars

Counts characters in text, excluding spaces and line breaks.

Input:

  • text (string): Text to count characters in

Output:

  • Character count (excluding spaces and line breaks)

count_clipboard_words

Counts words in text.

Input:

  • text (string): Text to count words in
  • language (string, optional, default: "en"): Text language (en: English, ja: Japanese)

Output:

  • Word count
  • Detailed morphological analysis results (for Japanese mode)

analyze_text

Performs detailed morphological analysis and examines linguistic features.

Input:

  • text (string): Text to analyze

Output:

  • Basic text information (total characters, sentences, morphemes)
  • Detailed analysis (average sentence length, part-of-speech ratios, character type ratios, vocabulary diversity)

analyze_file

Performs detailed morphological analysis and examines linguistic features in a file.

Input:

  • filePath (string): Path to the file to analyze

Output:

  • Basic file information (total characters, sentences, morphemes)
  • Detailed analysis (average sentence length, part-of-speech ratios, character type ratios, vocabulary diversity)

File Path Resolution

The tool flexibly locates files by:

  1. Using absolute paths directly
    • Windows format (e.g., C:\Users\username\Documents\file.txt)
    • WSL/Linux format (e.g., /c/Users/username/Documents/file.txt)
  2. Resolving relative paths from the current directory
  3. Searching based on the home directory (%USERPROFILE% or $HOME)
  4. Searching in the desktop directory
  5. Searching in the documents directory

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "JapaneseTextAnalyzer" '{"command":"npx","args":["-y","github:Mistizz/mcp-JapaneseTextAnalyzer"]}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

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

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

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

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later