manga-trans
Manga Trans Studio & MCP Server
ローカルファーストのスキャン翻訳バックエンドであり、Manga、Manhwa、Manhua向けの**Model Context Protocol(MCP)**サーバーです。
このプロジェクトでは、ローカライズの責務をAIエージェントとローカルエンジンに分担させています。
MCPホスト(Antigravity、Cursor、Claude Desktop、Codex):視覚・翻訳エンジンとして動作し、
ImageContentを介して生のページを直接検査し、不変のregion_idタグにキー付けされた翻訳を返します。ローカルPythonバックエンド:吹き出しの形状検出、ローカルOCR(Manga-OCR / EasyOCR)、輪郭を考慮したテキスト消去(インペイント)、ベトナム語のアクセント記号と声調記号を完全にサポートしたワードラップによる組み版レイアウト、厳密なピクセルQA検証を処理します。
スタジオキャンバス(FastAPI Webアプリ):並べて表示できるデュアルキャンバスインターフェースを提供し、リアルタイムの目視確認、テキストの手動調整、吹き出しのカスタム切り抜き、PNG書き出しを可能にします。
主な機能
1. ホストネイティブな視覚とローカライズ
標準的なMCP統合:生のマンガページをネイティブの
ImageContentとして送信し、ホストモデルが視覚的なコマ、キャラクターの感情、読み順を直接把握できます。完全ローカル実行:サーバー側でサードパーティ製LLMのAPIキー(OpenAI、Gemini、OpenRouter)は不要です。
2. 輪郭を考慮したインペイント(吹き出しクリーナー)
連結成分分析(Connected-Component Analysis)とPCA(主成分分析)を使用して、会話文字(グリフ)を線画やコマの輪郭から判別します。
インペイントの前にコマの枠線と思考吹き出しの外周をロックし、白抜けや背景アートの破壊を防ぎます。
3. 自動化されたマンガ組み版エンジン
楕円形、長方形、トゲ付きの吹き出しに収まるようにフォントサイズを動的に計算します。
ベトナム語の声調記号とアクセリティカルマークをサポートするスマートなワードラップで、単語の途中での分割やグリフの欠落(豆腐)を発生させません。
ローカライズ対応のコミックフォントを内蔵:
Itim、Pangolin、Patrick Hand、Mali Bold、Bangers、Saira Condensed、Be Vietnam Pro、Chakra Petch、Comic Neueなど。文字の縁取り、色の塗りつぶし、配置(中央 / 左 / 右)、太字 / 斜体スタイルに対応しています。
4. 厳格なピクセルQA
レンダリング後の自動検証:
box_alignment_score:描画されたア描画されたテキストと対象吹き出しとの幾何学的な適合度(目標:100)。render_overflow_pixelsとper_region_typeset_overflow_pixels:許可された領域外にテキストがクリッピングされないことを保証します(目標:0)。artwork_changes_outside_source_regions:吹き出し領域外でのピクセル変更が0%であることを適用します。
5. デュアルキャンバスWebスタジオ
元の生ページと翻訳結果を左右に並べて比較できます。
実行中のMCPバッチとリアルタイムに双方向同期できます。
インタラクティブな吹き出し作成:キャンバス上にカスタムのバウンディングボックスを直接描いて、対象領域のローカルOCRを実行します。
ワークスペースセッションを
.manga_trans_cache/studio-workspace.jsonに保存し、永続속します。
Related MCP server: devscope
インストール
前提条件
Python 3.10+
OS:Windows / Linux / macOS
(オプション) CUDAサポート付きNVIDIA GPU(ローカルOCRを高速化)
依存関係のインストール
pip install -r requirements.txtGPUアクセラレーション(オプション)
ローカルOCRをGPUで高速化するには、CUDA対応PyTorchをインストールします:
# Example for CUDA 12.8:
pip install --upgrade --force-reinstall torch torchvision --index-url https://download.pytorch.org/whl/cu128環境変数:
MANGA_TRANS_DEVICE=auto(デフォルト:利用可能な場合はCUDAを使用し、それ以外の場合はCPUにフォールバック)MANGA_TRANS_DEVICE=cpu(CPUの実行を強制)MANGA_OCR_BATCH_SIZE=8(ローカルOCR推論のバッチサイズ)
クイックスタート
1. Webスタジオを起動する
start_app.bat(Windows)を実行するか、次を実行します:
python -m uvicorn backend.server:app --host 127.0.0.1 --port 8000 --reloadブラウザでhttp://127.0.0.1:8000を開きます。
2. MCPクライアントを設定する
MCPクライアントの設定(claude_desktop_config.json、Antigravity、Cursor など)にサーバー定義を追加します:
{
"mcpServers": {
"manga-trans": {
"command": "python",
"args": [
"D:\\Code\\manga-trans\\backend\\mcp_server.py"
],
"cwd": "D:\\Code\\manga-trans",
"env": {
"PYTHONIOENCODING": "utf-8",
"PYTHONUNBUFFERED": "1",
"PYTHONUTF8": "1",
"HF_HOME": "D:\\Code\\manga-trans\\.models\\huggingface",
"MANGA_TRANS_DEVICE": "auto",
"MANGA_OCR_BATCH_SIZE": "8"
}
}
}
}MCPツールリファレンス
ツール | 説明 |
| 生の章フォルダ内のすべての画像ページを一覧表示します。 |
| 黒い余白をクロップし、吹き出しを検出して、ページ単体のローカルOCRを実行します。 |
| 章全体のバッチを処理し、構造化されたOCRマニフェストを生成します。 |
| ホストの視覚検査用に、生のページを |
| 元のテキストを消去し、ローカライズ済み翻訳を組み込み、ページ単体のQAを実行します。 |
| 事前に生成した翻訳JSONマニフェストを使用して章全体をレンダリングします。 |
| 元のテキストを消去し、組み版を含めないインペイント済み画像を出力します。 |
| Web Studioの現在のワークスペース状態とレビューキューを取得します。 |
| ユーザーのWeb Studioビューを指定のページ番号に同期して移動します。 |
| 組み版エンジンに登録されているフォントを一覧表示します。 |
ディレクトリ構造
manga-trans/
├── backend/
│ ├── engine/
│ │ ├── detector.py # Offline bubble geometry & bounding box heuristics
│ │ ├── geometry.py # Contour analysis, panel line rules, coordinate calculations
│ │ ├── inpainter.py # Line-preserving text erasure & inpainting
│ │ ├── models.py # Pydantic schemas for manifests & QA reports
│ │ ├── ocr.py # Manga-OCR & EasyOCR wrappers
│ │ ├── pipeline.py # End-to-end clean, OCR, and render pipeline
│ │ ├── preprocess.py # Image normalization & black border cropping
│ │ ├── qa.py # Strict Pixel QA algorithms
│ │ └── typesetter.py # Typography layout, font sizing, word wrapping
│ ├── fonts/ # Localized TrueType (.ttf) comic fonts
│ ├── mcp_server.py # MCP Server entrypoint (JSON-RPC over stdio)
│ ├── server.py # FastAPI REST & WebSocket backend for Web Studio
│ └── studio_workspace.py # Persistent workspace session manager
├── frontend/
│ ├── index.html # Web Studio Canvas App (HTML5/Canvas/CSS/JS)
│ └── sample/ # Sample test assets
├── tests/
│ ├── render_mcp_qa.py # Pipeline render & QA regression test
│ ├── test_mcp_server.py # MCP Server test suite (38 unit tests)
│ └── test_studio_workspace.py # Web Studio workspace unit tests
├── .agent/
│ └── skills/
│ └── manga-translate/ # Manga translation skill for AI agents
│ └── SKILL.md
├── AGENTS.md # Universal CLI and agent operational instructions
├── GEMINI.md # Model-specific guidelines & rules
├── mcp_config.json # Sample MCP client configuration
├── requirements.txt # Python package dependencies
└── start_app.bat # Windows launcher for Web Studioテスト
システムの整合性を検証するため、テストスイートを実行します:
python -m unittest tests/test_studio_workspace.py
python -m unittest tests/test_mcp_server.pyThis server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to remotely operate visual design tools via MCP protocol, with composable architecture for image processing, file operations, and workflow automation.MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to detect development environments, install missing tools, scan local code projects, and generate visual reports.8MIT
- AlicenseNot gradedqualityBmaintenanceProvides internationalization MCP tools enabling AI agents to perform translations, locale management, and i18n operations.111MIT
- FlicenseNot gradedqualityCmaintenanceEnables generating original English-dialogue manga with configurable Japanese art styles through an MCP server, including story scripting, panel image generation, and page composition.
Related MCP Connectors
OCR, transcription, file extraction, and image generation for AI agents via MCP.
Screenshot, diff, audit and sitemap-capture any web page — 5 MCP tools for AI agents.
Hosted MCP for creating, checking, deploying, and hosting static sites for AI agents.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/chiraitori/manga-trans'
If you have feedback or need assistance with the MCP directory API, please join our Discord server