Skip to main content

XLIFF MCP Server

An MCP (Model Context Protocol) server for processing XLIFF and TMX translation files. This server provides tools for parsing, validating, and manipulating translation files commonly used in localization workflows.

Features

  • XLIFF Processing: Parse and extract translation units from XLIFF files
  • TMX Processing: Parse and extract translation units from TMX files
  • Tag Preservation: Special processing mode that preserves inline tags for AI translation
  • Validation: Validate XLIFF and TMX file formats
  • Translation Replacement: Replace target translations in XLIFF files

Installation

python setup.py

Manual Installation

Using pip

pip install -r requirements.txt
pip install -e .

Using the install script

./install.sh  # Unix/Linux/macOS
install.bat   # Windows

Configuration

For Claude Desktop

Add the server to your Claude Desktop configuration file:

macOS/Linux: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %AppData%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "xliff-processor": {
      "command": "python",
      "args": ["-m", "xliff_mcp.server"],
      "cwd": "/absolute/path/to/xliff-mcp-server"
    }
  }
}

Or if using uv:

{
  "mcpServers": {
    "xliff-processor": {
      "command": "uv",
      "args": ["run", "python", "-m", "xliff_mcp.server"],
      "cwd": "/absolute/path/to/xliff-mcp-server"
    }
  }
}

Available Tools

process_xliff

Process XLIFF content and extract translation units.

Parameters:

  • file_name (string): Name of the XLIFF file
  • content (string): XLIFF file content

Returns: JSON with translation units including:

  • fileName, segNumber, unitId, percent, source, target, srcLang, tgtLang

process_xliff_with_tags

Process XLIFF preserving inline tags for AI translation.

Parameters:

  • file_name (string): Name of the XLIFF file
  • content (string): XLIFF file content

Returns: JSON with translation units preserving original formatting tags

validate_xliff

Validate XLIFF content format.

Parameters:

  • content (string): XLIFF file content to validate

Returns: JSON with validation status, message, and unit count

replace_xliff_targets

Replace target translations in XLIFF file.

Parameters:

  • content (string): Original XLIFF file content
  • translations (string): JSON array of translations with segNumber/unitId and aiResult/mtResult

Returns: JSON with updated XLIFF content and replacement count

process_tmx

Process TMX content and extract translation units.

Parameters:

  • file_name (string): Name of the TMX file
  • content (string): TMX file content

Returns: JSON with translation units including metadata

validate_tmx

Validate TMX content format.

Parameters:

  • content (string): TMX file content to validate

Returns: JSON with validation status and unit count

Usage Examples

Once configured in Claude Desktop, you can use the tools like this:

  1. Process an XLIFF file: "Please process this XLIFF file and show me the translation units"

  2. Validate XLIFF format: "Can you validate if this XLIFF content is properly formatted?"

  3. Replace translations: "Replace the target translations in this XLIFF file with these new translations"

  4. Process TMX file: "Extract all translation units from this TMX file"

Development

Running tests

python -m pytest tests/

Running the server directly

python -m xliff_mcp.server

Requirements

  • Python 3.10+
  • mcp[cli] >= 1.2.0
  • translate-toolkit >= 3.0.0
  • lxml >= 4.9.0
  • pydantic >= 2.0.0

License

MIT

Support

For issues and questions, please open an issue on the GitHub repository.

Metadata

Release files for xliff-mcp-server 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for xliff-mcp-server 0.1.1
File Size Uploaded Provenance
xliff_mcp_server-0.1.1.tar.gz 32.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for xliff-mcp-server 0.1.1
File Interpreter ABI Platform
xliff_mcp_server-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 46.7 kB

Release files / xliff_mcp_server-0.1.1.tar.gz

Download URL xliff_mcp_server-0.1.1.tar.gz
Size 32.0 kB
Tags Source
SHA-256 checksum
How to use checksums
9c5192b498d320f1e47ca71db2e811e5927aa219aaba42f903cdcad193c9b7d0
BLAKE2b-256 checksum
How to use checksums
6f3b79dce022f26baa4971181e705fe6c93ca44b6fd5dde34a35e2c5a0fe4059
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.13

Release files / xliff_mcp_server-0.1.1-py3-none-any.whl

Download URL xliff_mcp_server-0.1.1-py3-none-any.whl
Size 14.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3f366ab2de0372bcc8e1cec95b47bca6495332e15effdef720da8e2f70803be6
BLAKE2b-256 checksum
How to use checksums
f5875705e5f51fb9d39f9488611861c245d66df2d0cb440d1e30c3d6ebf1a7a6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.13

Security for xliff-mcp-server 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page