CopyTuner Client
Manage Rails i18n translations with CopyTuner. Search, update, and create translation keys.
CopyTunerClient::Mcp
Rails i18nの翻訳管理サービス「CopyTuner」のMCP(Model Context Protocol)サーバー実装です。AIアシスタントがRailsアプリケーションの多言語化対応を効率的に支援するためのツールセットを提供します。
概要
このgemは、CopyTunerプロジェクトの翻訳データにアクセスし、Rails i18nキーの検索、翻訳の管理、新しいキーの作成などをMCPプロトコル経由で実行できるサーバーを提供します。
機能
利用可能なツール
- search_key: Rails i18nキーの検索(
t()やI18n.t()で使用されるキーの検索に最適化) - search_translations: 翻訳内容による検索(特定のテキストを含む翻訳の検索)
- create_i18n_key: 新しいi18nキーの作成(複数言語対応、非同期処理)
- get_locales: プロジェクトで使用中のロケール一覧の取得
- get_edit_url: 登録済みキーの編集画面URLの生成
リソーステンプレート
copytuner://projects/{project_id}/translations/{locale}/{key}: 個別の翻訳リソースへのアクセス
インストール
Gemfileに以下を追加:
group :development do
gem 'copy_tuner_client-mcp', github: 'SonicGarden/copy_tuner_client-mcp', require: false
end
そして実行:
bundle install
使用方法
1. CopyTunerClientの設定
まず、Railsアプリケーションでcopy_tuner_clientが適切に設定されている必要があります:
# config/initializers/copy_tuner_client.rb
CopyTunerClient.configure do |config|
config.api_key = "your-api-key"
config.project_id = "your-project-id"
config.locales = ["ja", "en"]
end
2. AIアシスタントでの設定と利用
MCPプロトコルに対応したAIアシスタント(Claude Code、VSCode Copilot等)で、以下の設定ファイルを配置するとMCPサーバーが自動的に起動され、翻訳管理機能が利用可能になります。
Claude Code
プロジェクトのルートディレクトリに .mcp.json ファイルを作成:
{
"mcpServers": {
"copy-tuner": {
"command": "bundle",
"args": ["exec", "copy-tuner-mcp"]
}
}
}
VSCode Copilot
.vscode/mcp.json ファイルを作成:
{
"servers": {
"copy-tuner": {
"type": "stdio",
"command": "bundle",
"args": ["exec", "copy-tuner-mcp"],
"cwd": "${workspaceFolder}"
}
}
}
CLAUDE.md設定例
プロジェクトのルートディレクトリに CLAUDE.yml ファイルを作成することで、AIアシスタントがプロジェクトの国際化の仕組みを理解できるようになります:
# CLAUDE.md
## 国際化(i18n)について
- i18nのバックエンドには**copy_tuner**というサーバでi18nデータを管理する仕組みを利用
- i18nのキーや内容を参照する場合は、copy_tunerから取得する必要がある
- `config/locales` 配下のファイルは利用していません
- copy_tunerサーバと連携してローカライズデータを管理
使用例
設定完了後、AIアシスタントで以下のような操作が可能になります:
キーの検索
user.nameに関連するi18nキーを検索してください
翻訳内容の検索
「ログイン」という文字を含む翻訳を検索してください
新しいキーの作成
user.profile.bioというキーで「プロフィール」(日本語)と「Profile」(英語)の翻訳を作成してください
3. 手動起動(動作確認・デバッグ用)
通常はAIアシスタントの設定ファイルを通じて自動的に起動されますが、動作確認やデバッグが必要な場合は、Railsアプリケーションのルートディレクトリで以下を実行して手動起動できます:
bundle exec copy-tuner-mcp
ライセンス
このgemはMIT Licenseの下でオープンソースとして利用可能です。
Related Servers
Scout Monitoring MCP
sponsorPut performance and error data directly in the hands of your AI assistant.
Alpha Vantage MCP Server
sponsorAccess financial market data: realtime & historical stock, ETF, options, forex, crypto, commodities, fundamentals, technical indicators, & more
Storyblok MCP Server
Manage your Storyblok CMS using natural language through AI tools.
Context7 Python
A Python server for searching libraries and retrieving documentation, with support for HTTP/HTTPS proxies.
Symphony of One
An MCP server for orchestrating multiple Claude instances to collaborate in a shared workspace with real-time communication.
Claude-FAF-MCP
Only Persistent Project Context MCP Server - Official Anthropic Registry
Math MCP Learning
Educational MCP server with math operations, statistics, visualizations, and persistent workspace.
mcpcodeserver
Instead of direct calling MCP tools, mcpcode server transforms MCP tool calls into TypeScript programs, enabling smarter, lower-latency orchestration by LLMs.
Remote MCP Server (Authless)
An example of a remote MCP server without authentication, deployable on Cloudflare Workers.
CDP MCP Server
Access Composers' Desktop Project (CDP) sound transformation programs. Requires a separate CDP installation.
EVE Online ESI
Interact with the EVE Online ESI API to access game data and services.
Laravel Docs
Search and access Laravel documentation from version 6.x onwards, with automatic daily updates.