Nen MCP Server
[ENG] A Gemini CLI Extension / MCP Server that completely resolves character encoding issues (e.g., Shift-JIS) in Windows CLI environments, enabling AI to accurately parse non-English documents. [JPN] Windows環境の文字化け(Shift-JIS等)を完全に防ぎ、AIが非英語圏のコードや文書を正確に解析できるようにするGemini CLI向けのMCP拡張機能です。
Ask AI about Nen MCP Server
Powered by Claude · Grounded in docs
I know everything about Nen MCP Server. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
NEN (Non-English Normalization) MCP Server
マルチバイト文字(日本語など)を含むファイルの解析・読み込みを強力にサポートする MCP サーバーです。Windows 環境でのパス問題や文字化けを完全に解決します。
日本語
概要
NEN MCP Server は、Windows 環境における PowerShell の文字化けや、Shift-JIS などの多様なエンコーディングが混在するプロジェクトでのファイル操作を最適化するために設計されました。
特に Windows 特有の UNC パス(\\?\ 接頭辞)によるエラーを回避し、AI エージェントが非英語圏のコードベースを正確に理解するための「目」となります。
主な機能
- Windows パス問題の解決:
dunceを採用し、Windows の拡張パス接頭辞に起因するファイルアクセスエラーを回避します。 - 自動エンコーディング検知: UTF-8, Shift-JIS, EUC-JP などの文字コードを自動判別し、UTF-8 に正規化して読み込みます。
- CLI/MCP ハイブリッドモード: サーバーとしてだけでなく、コマンドラインツールとしても動作し、直接ファイルの検証が可能です。
- アウトライン解析: Tree-sitter を使用し、関数の定義などを構造的に抽出します。
インストール方法
gemini extensions install https://github.com/DovahkiinYuzuko/nen-mcp-server
CLI モードの使い方
# ファイルの安全な読み込み
./bin/nen-mcp-server.exe safe-read "path/to/ファイル.txt"
# MCPサーバーとして明示的に起動
./bin/nen-mcp-server.exe --mcp
ENGLISH
Overview
NEN (Non-English Normalization) MCP Server is designed to optimize file operations in environments with multi-byte characters (such as Japanese) and varied encodings. It effectively resolves Windows-specific path issues and terminal encoding corruption.
Key Features
- UNC Path Fix: Avoids
\\?\prefix issues on Windows usingduncefor reliable file access. - Automatic Encoding Detection: Detects and normalizes UTF-8, Shift-JIS, and EUC-JP into standard UTF-8.
- Hybrid CLI/MCP Mode: Works both as a standardized MCP server and a standalone CLI tool.
- Structural Analysis: Extracts code structure (functions, classes) using Tree-sitter.
CLI Usage
# Standalone execution
./bin/nen-mcp-server.exe safe-read "path/to/file.txt"
# Force MCP mode
./bin/nen-mcp-server.exe --mcp
