MT Content Refactor MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MT Content Refactor MCP Server サイト1の記事をバックアップして、すべてのimgタグをfigureで囲むように変換して"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MT Content Refactor MCP Server
Movable Type の記事コンテンツを AI で一括変換するための MCP(Model Context Protocol)サーバーです。
Claude Desktop などの MCP 対応 AI クライアントから、MT Data API を通じて記事の HTML を一括で変換できます。
特徴
AI による柔軟な変換: 自然言語で変換ルールを指示するだけで、Claude が HTML を解析・変換
安全なワークフロー: バックアップ → 変換 → 差分確認 → 適用の段階的プロセス
差分レポート: 変更前後を比較できる HTML レポートを自動生成
ロールバック対応: いつでも元の状態に復元可能
セッション管理: 作業状態を保存し、後から再開可能
Related MCP server: WordPress MCP Server
使用例
あなた: サイト1の記事をバックアップして
Claude: 45件の記事をバックアップしました。セッション: 20251208_150000
あなた: 以下のルールで変換して:
- <p> 内に画像がある場合、<figure class="m-media"> で囲む
- テキストのみの <p> には class="m-text" を追加
Claude: 12件に変更が必要です。変換を実行しました。
あなた: 差分レポートを見せて
Claude: 差分レポートを生成しました: ~/.config/mt-content-refactor/backups/20251208_150000/diff-report.html
あなた: 問題なさそうなので適用して
Claude: 12件の変更を MT に反映しました。必要環境
Node.js 18 以上
Movable Type 6 以上(Data API v4 対応)
MCP 対応 AI クライアント(Claude Desktop など)
インストール
# リポジトリをクローン
git clone https://github.com/bit-part/mt-content-refactor-mcp.git
cd mt-content-refactor-mcp
# 依存関係をインストール
npm install
# ビルド
npm run buildClaude Desktop への登録
~/Library/Application Support/Claude/claude_desktop_config.json に以下を追加:
{
"mcpServers": {
"mt-content-refactor": {
"command": "node",
"args": ["/path/to/mt-content-refactor-mcp/dist/index.js"]
}
}
}Volta を使用している場合は、Node.js のフルパスを指定:
{
"mcpServers": {
"mt-content-refactor": {
"command": "/Users/yourname/.volta/bin/node",
"args": ["/path/to/mt-content-refactor-mcp/dist/index.js"]
}
}
}設定後、Claude Desktop を再起動してください。
使い方
1. 接続先の登録
MT環境を追加して
endpoint: https://example.com/mt/mt-data-api.cgi
username: api-user
password: secret1232. 接続先の選択
MT環境に接続して3. サイト・記事の確認
サイト一覧を表示して
サイト1の記事一覧を見せて4. バックアップの作成
サイト1の記事を全件バックアップして5. 変換の実行
以下のルールで変換して:
1. <p> 内に <img> がある場合、<figure> で囲む
2. テキストのみの <p> には class="m-text" を追加6. 差分の確認
差分レポートを生成して生成された HTML ファイルをブラウザで開いて確認します。
7. 変更の適用
変更を適用して8. 問題があった場合のロールバック
記事ID 123 を元に戻して利用可能なツール
接続管理
ツール | 説明 |
| 登録済み接続先の一覧 |
| 新しい接続先を追加 |
| 使用する接続先を選択 |
| 接続先を削除 |
| 接続テスト |
コンテンツ操作
ツール | 説明 |
| サイト一覧 |
| 記事一覧 |
| 記事詳細取得 |
| ページ一覧 |
| ページ詳細取得 |
| コンテンツタイプ一覧 |
| コンテンツデータ一覧 |
| コンテンツデータ詳細取得 |
バックアップ・変換
ツール | 説明 |
| バックアップセッション作成 |
| バックアップ内容取得 |
| 単一アイテムの変換結果を設定 |
| 複数アイテムの変換結果を一括設定 |
| 差分レポート生成 |
| 変更を MT に適用 |
| ロールバック |
| セッション一覧 |
| セッション読み込み |
| セッション削除 |
データの保存場所
バックアップデータは以下に保存されます:
~/.config/mt-content-refactor/
├── connections.json # 接続先情報
└── backups/
└── 20251208_150000/ # セッションディレクトリ
├── session.json # セッション情報
├── items/ # 各アイテムのバックアップ
│ ├── entry_123.json
│ └── entry_124.json
└── diff-report.html # 差分レポート開発
# 開発モード(ファイル変更を監視)
npm run dev
# MCP Inspector で動作確認
npm run inspect注意事項
本番環境での使用は慎重に: 必ずテスト環境で動作確認してから使用してください
バックアップの確認: 変更適用前に必ず差分レポートを確認してください
認証情報の管理: 接続情報は
~/.config/mt-content-refactor/connections.jsonに保存されます
ライセンス
MIT License
作者
mersy
関連リンク
Available Tools
23 toolsmt_add_connectionC
新しいMT接続を追加します
Inputs: id (required), name (required), endpoint (required), username (required), +1 more.
mt_apply_changesD
変換結果をMTに適用します
Inputs: dryRun.
mt_create_backupA
サイトのコンテンツをバックアップします。変換前に必ず実行してください。
Inputs: siteId (required), targetType, status.
mt_delete_sessionC
バックアップセッションを削除します
Inputs: sessionId (required).
mt_generate_diff_reportC
変換前後の差分レポートを生成します
Inputs: format.
mt_get_backup_itemsB
バックアップしたアイテムの一覧を表示します
Inputs: no named parameters.
mt_get_content_dataC
コンテンツデータの詳細を取得します
Inputs: siteId (required), contentTypeId (required), contentDataId (required).
mt_get_entryC
記事の詳細を取得します
Inputs: siteId (required), entryId (required).
mt_get_pageC
ウェブページの詳細を取得します
Inputs: siteId (required), pageId (required).
mt_list_connectionsB
登録済みのMT接続一覧を表示します
Inputs: no named parameters.
mt_list_content_dataC
コンテンツデータ一覧を取得します
Inputs: siteId (required), contentTypeId (required), limit, offset.
mt_list_content_typesC
コンテンツタイプ一覧を取得します
Inputs: siteId (required).
mt_list_entriesC
記事一覧を取得します
Inputs: siteId (required), limit, offset, status.
mt_list_pagesC
ウェブページ一覧を取得します
Inputs: siteId (required), limit, offset, status.
mt_list_sessionsB
バックアップセッション一覧を表示します
Inputs: no named parameters.
mt_list_sitesC
サイト一覧を取得します
Inputs: no named parameters.
mt_load_sessionC
過去のバックアップセッションを読み込みます
Inputs: sessionId (required).
mt_remove_connectionC
接続を削除します
Inputs: connectionId (required).
mt_restoreC
バックアップから元の状態にリストアします
Inputs: sessionId.
mt_set_bulk_transformC
複数のアイテムに一括で変換後のHTMLを設定します
Inputs: transforms (required).
mt_set_transformC
個別のアイテムに変換後のHTMLを設定します
Inputs: itemType (required), itemId (required), afterHtml (required).
mt_test_connectionC
接続をテストします
Inputs: connectionId.
mt_use_connectionC
指定した接続をアクティブにします
Inputs: connectionId (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 23 tools
Most tools have distinct purposes targeting specific resources like connections, backups, content items, and transformations, with clear boundaries. However, mt_set_transform and mt_set_bulk_transform could be slightly confusing as they differ only in scale (individual vs. bulk), but their descriptions clarify this distinction.
All tools follow a consistent snake_case naming pattern with a 'mt_' prefix, using clear verb_noun combinations (e.g., mt_add_connection, mt_list_entries). This predictability makes it easy for agents to understand and navigate the toolset.
With 23 tools, the count is on the higher side for a content refactoring server, which may feel heavy but is not extreme. It covers multiple aspects like connections, backups, content management, and transformations, but could potentially be streamlined without losing core functionality.
The toolset provides comprehensive coverage for content refactoring workflows, including CRUD operations for connections, backups, and content items, plus transformation and restoration capabilities. No obvious gaps exist; agents can perform full lifecycle tasks from setup to application and rollback.
Maintenance
Related MCP Connectors
Run every WordPress site you look after from Claude or ChatGPT. Nothing goes live until you approve it, every change gets a receipt you can undo, and the whole fleet sits in one tamper-evident log.
Manage WordPress blogs and WooCommerce shops from Claude, ChatGPT, Cursor and other MCP apps.
Finds why Google and AI cannot read your site, gives the exact fix, applies it once you approve.
Page change monitoring, sitemap discovery, prompt-injection screening, clean markdown. Free preview.
Related MCP Servers
- AlicenseAqualityNot gradedmaintenanceAI-powered WordPress management that enables creating and editing posts, pages, media, plugins, themes, and Gutenberg blocks through natural language with safe-by-default writes and full rollback support.524 npm-
- AlicenseAqualityDmaintenanceEnables AI assistants to manage WordPress sites through natural conversation, supporting post creation, content updates, site queries, and draft-to-publish workflows via the WordPress REST API.9MIT
- AlicenseNot gradedqualityBmaintenanceMCP server for AI-assisted WordPress editing across 12 page builders. 172 tools for content management, page builder editing, WooCommerce, SEO analysis, accessibility scanning, and site intelligence. Edits native builder formats (Elementor, Bricks, Divi, Gutenberg, Beaver Builder, and 7 more) with duplicate-before-edit safety, optimistic locking, and surgical element-level operations11MIT
- AlicenseAqualityCmaintenanceEnables AI assistants to read and edit WordPress sites over the REST API, including Divi 4, Divi 5, and Gutenberg content, with safety features like round-trip verification, draft-based editing, and dry-run previews.45MIT