- Home
- MCP servers
- MT Content Refactor
MT Content Refactor
- typescript
0
GitHub Stars
typescript
Language
6 months ago
First Indexed
3 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
This MCP server lets you transform Movable Type article HTML in bulk using AI. By connecting a compatible MCP client, you can back up, convert with flexible rules, review diffs, and safely apply changes to MT Data API content in a structured workflow.
How to use
You connect to your MT Data API environment, back up the site contents, and then run AI-driven transformation rules to adjust article HTML. After the transformation, you generate a diff report to review the changes before applying them to MT. If something goes wrong, you can roll back to the original state and resume later from a saved session.
How to install
Prerequisites: you need Node.js 18 or newer and Movable Type 6 or newer (Data API v4 compatible). You also need an MCP-compatible AI client such as Claude Desktop.
Clone the MCP server repository, install dependencies, and build the project.
# Clone the MCP server
git clone https://github.com/bit-part/mt-content-refactor-mcp.git
cd mt-content-refactor-mcp
# Install dependencies
npm install
# Build the project
npm run build
Configuration and setup notes
Register a local or remote MCP server with your MCP client. If you run the server locally, you start from the built output and point the client to the runtime JS file inside dist.
# Example: Claude Desktop configuration to run local server
{
"mcpServers": {
"mt-content-refactor": {
"command": "node",
"args": ["/path/to/mt-content-refactor-mcp/dist/index.js"]
}
}
}
If you are using Volta for Node.js, specify the full path to the Node binary in the same config instead of node. For example:
{ "mcpServers": { "mt-content-refactor": { "command": "/Users/yourname/.volta/bin/node", "args": ["/path/to/mt-content-refactor-mcp/dist/index.js"] } } }
Save the configuration and restart the MCP client so it picks up the new server entry.
Connecting to MT Data API and running a workflow
- Add your MT environment with the Data API endpoint, username, and password so the MCP server can access your content.
MT environment to add
endpoint: https://example.com/mt/mt-data-api.cgi
username: api-user
password: secret123
-
Connect to the MT environment from the MCP client and select the environment you just configured.
-
List sites to confirm access and browse to the site you want to transform.
-
Create a backup session for all articles you intend to transform. This establishes a restore point.
-
Run the transformation with your rules. For example, you can apply rules like wrapping images inside <p> tags with a figure wrapper and adding a text-specific class to plain text paragraphs.
-
Generate and review the diff report to verify changes before applying them.
-
Apply the confirmed changes to MT. If issues arise, use the built-in rollback to revert to the backup state.
Notes on workflow and safety
- Follow a backup → transform → diff → apply flow to minimize risk. - Always review the diff report before applying changes. - Use the rollback feature if any transformation causes undesired results. - Sessions save progress so you can pause and resume later.
Data storage and lifecycle
Backups and session data are saved under your home config path in a structure like: ~/.config/mt-content-refactor/ and include backups/ and session data with a diff-report for each session.
Available tools
mt_list_connections
List registered connections for MCP access and management.
mt_add_connection
Add a new MT Data API connection to the MCP environment.
mt_use_connection
Select which registered connection to use for subsequent operations.
mt_remove_connection
Remove a registered connection from the MCP environment.
mt_test_connection
Test the connectivity and authentication for a given connection.
mt_list_sites
List available MT sites to manage content.
mt_list_entries
List entries (articles) within a site.
mt_get_entry
Retrieve detailed data for a single article.
mt_list_pages
List pages within a site.
mt_get_page
Retrieve detailed data for a single page.
mt_list_content_types
List content types available in the MT environment.
mt_list_content_data
List content data items for retrieval or transformation.
mt_get_content_data
Get detailed content data for a particular item.
mt_create_backup
Create a backup session for selected items.
mt_get_backup_items
Fetch the items included in a backup session.
mt_set_transform
Apply a transformation result to a single item.
mt_set_bulk_transform
Apply transformation results to multiple items in bulk.
mt_generate_diff_report
Generate a diff report showing changes between before and after.
mt_apply_changes
Apply the prepared changes to MT content.
mt_restore
Rollback changes by restoring from backup.
mt_list_sessions
List active or past transformation sessions.
mt_load_session
Load a saved transformation session to continue work.
mt_delete_session
Delete a saved transformation session.