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の下でオープンソースとして利用可能です。
相關伺服器
Scout Monitoring MCP
贊助Put performance and error data directly in the hands of your AI assistant.
Alpha Vantage MCP Server
贊助Access financial market data: realtime & historical stock, ETF, options, forex, crypto, commodities, fundamentals, technical indicators, & more
Prompts MCP Server
An MCP server for managing and serving prompts from markdown files with YAML frontmatter support.
MCP - Model Context Protocol for Joomla!
A Joomla plugin providing a task-based API to manage content and connect with AI, workflow automation, and internal tools.
clj-kondo-MCP
Clojure linter
Wopee MCP
AI testing agents for web apps — dispatch test runs, analysis crawls, and AI agent tests, fetch artifacts and project status
Mindpilot MCP
Visualize legacy code and inspect complex flows to understand your agent's operations.
FastAPI with MCP
A FastAPI application demonstrating MCP integration for mathematical operations and tool registration.
TemplateIO Image Generation
Generate images using the Templated.io API. Requires a Templated.io API key.
mcpo+OpenWebUI
A secure MCP-to-OpenAPI proxy server that converts MCP tools into OpenAPI compatible HTTP servers, with support for multiple server types and automatic API documentation.
PHP MCP Server
A server-side implementation of the Model Context Protocol (MCP) for PHP applications, allowing exposure of application parts as standardized MCP Tools, Resources, and Prompts.
Hive MCP Server
Provides real-time crypto and Web3 intelligence using the Hive Intelligence API.