Xcomet MCP Server logo

Xcomet MCP Server

by shuji-bonji

Evaluate machine translation quality with xCOMET scores, severity-labeled errors, batch processing, and optional GPU inference.

Install Xcomet MCP Server

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "shuji-bonji-xcomet-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "xcomet-mcp-server@latest"
      ],
      "env": {
        "XCOMET_PYTHON_PATH": "YOUR_VALUE_HERE"
      }
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Values are written into the snippet above so you can paste it as is. They never leave your browser.

Automated check passed— started and listed 3 tools correctly (1mo ago).

Overview

This MCP server lets AI agents evaluate machine translation using Unbabel's xCOMET models. It returns quality scores from 0 to 1 and detects error spans classified as minor, major, or critical. Use it to review individual translations or process multiple translation pairs efficiently.

Use cases

  • Score machine translation quality
  • Identify and classify translation errors
  • Review source and translation pairs
  • Evaluate batches of translations
  • Accelerate inference with GPU support

Key features

  • Quality scores from 0 to 1
  • Error span detection
  • Minor, major, and critical severity levels
  • Batch processing with a persistent model load
  • Optional GPU acceleration
  • JSON or Markdown response formats

Tools3

What Xcomet MCP Server lets your agent do. Expand a tool for its parameters.

Verified live~1.6k tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked Today

Recent health check succeeded.

10/11 checks healthy over the last 86d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 2d ago via OSV.dev · xcomet-mcp-server@latest (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars2Stargazers on the source repository.
npm downloads286Package downloads in the last 30 days.
Last commit2mo agoMost recent push to the default branch.
Availability100%Our rolling endpoint + install checks that succeeded.
Install checkPassedOur sandbox started it and listed its tools.
Tools exposed3Callable tools this server registers over MCP.
Directory activity3 viewsConfig copies, upvotes, and views on AllMCPs.

From the project README

xCOMET MCP Server

npm version CI MCP License: MIT

日本語版 README はこちら

⚠️ This is an unofficial community project, not affiliated with Unbabel.

Translation quality evaluation MCP Server powered by xCOMET (eXplainable COMET).

🎯 Overview

xCOMET MCP Server provides AI agents with the ability to evaluate machine translation quality. It integrates with the xCOMET model from Unbabel to provide:

  • Quality Scoring: Scores between 0-1 indicating translation quality
  • Error Detection: Identifies error spans with severity levels (minor/major/critical)
  • Batch Processing: Evaluate multiple translation pairs efficiently (optimized single model load)
  • GPU Support: Optional GPU acceleration for faster inference
mermaid
graph LR
    A[AI Agent] --> B[Node.js MCP Server]
    B -- stdio JSON-RPC --> C[Python Worker]
    C --> D[xCOMET Model<br/>Persistent in Memory]
    D --> C
    C --> B
    B --> A

    style D fill:#9f9

🔧 Prerequisites

Python Environment

  • Python 3.9 - 3.12 recommended (3.13+ is not yet supported by xCOMET dependencies)

xCOMET requires Python with several packages. We recommend using a virtual environment:

bash
# If using uv (recommended - auto-downloads the correct Python version)
uv venv ~/.xcomet-venv --python 3.12
source ~/.xcomet-venv/bin/activate
uv pip install "unbabel-comet>=2.2.7,<3.0"

# Or using standard venv (requires Python 3.9-3.12 already installed)
python3 -m venv ~/.xcomet-venv
source ~/.xcomet-venv/bin/activate  # Windows: ~/.xcomet-venv\Scripts\activate
pip install "unbabel-comet>=2.2.7,<3.0"

Why Python 3.9-3.12? unbabel-comet declares numpy = "^1.20.0", so it resolves numpy 1.x. The last numpy 1.x release, 1.26.4, ships wheels for cp39-cp312 only. On Python 3.13 or later, pip has to build numpy from source.

Note (v0.5.0+): The Python worker now talks to Node.js over stdin/stdout (line-delimited JSON-RPC). FastAPI, uvicorn, and pydantic are no longer required — only unbabel-comet is.

Note: When using with Claude Desktop or other MCP hosts, set XCOMET_PYTHON_PATH to point to the venv Python (see Configuration).

Model Download

Important: XCOMET-XL and XCOMET-XXL are gated models on HuggingFace. You must:

  1. Create a HuggingFace account

  2. Visit Unbabel/XCOMET-XL and request access

  3. Authenticate, either via the CLI:

    bash
    source ~/.xcomet-venv/bin/activate
    hf auth login
    

    (huggingface-cli login still works but prints a deprecation warning since huggingface_hub 0.34; hf is the current command.)

    Or by setting HF_TOKEN in the MCP host's env block, which is the option when the host launches the server in an environment where no CLI login has been performed:

    json
    "env": {
      "XCOMET_PYTHON_PATH": "~/.xcomet-venv/bin/python3",
      "HF_TOKEN": "hf_..."
    }
    

    huggingface_hub reads HF_TOKEN first and falls back to the token file written by hf auth login.

Unbabel/wmt22-comet-da does not require authentication (but requires reference translations).

After authentication, download the model (~14GB for XL, ~42GB for XXL):

server.ts
source ~/.xcomet-venv/bin/activate
python -c "from comet import download_model; download_model('Unbabel/XCOMET-XL')"

Where the model is stored

Not in the virtualenv. The venv holds the Python packages; the model weights go to the huggingface_hub cache, which is a separate directory shared by every tool on the machine that pulls from the Hub.

Code
~/.xcomet-venv/                              ← Python packages only
└── lib/python3.x/site-packages/
    ├── comet/                               unbabel-comet itself
    └── torch/  transformers/  ...           its dependencies

~/.cache/huggingface/                        ← the model weights live here
└── hub/
    └── models--Unbabel--XCOMET-XL/
        ├── blobs/                           the actual ~14GB checkpoint
        └── snapshots/<revision>/
            ├── checkpoints/model.ckpt       what download_model() returns
            └── hparams.yaml

download_model() passes cache_dir=None to snapshot_download(), so huggingface_hub picks the location: HF_HUB_CACHE, which defaults to HF_HOME/hub, where HF_HOME defaults to $XDG_CACHE_HOME/huggingface (~/.cache/huggingface when XDG_CACHE_HOME is unset).

Three consequences worth knowing:

  • Rebuilding or deleting the venv does not re-download the model.
  • Several venvs, and other Hub-based tools, share the same copy.
  • The size of the venv directory does not account for the 14GB. Use hf cache scan to see what is actually on disk, and hf cache delete to remove a revision.

To put the checkpoint somewhere else — a larger volume, a shared drive — set XCOMET_SAVING_DIRECTORY (v0.7.0+) or the standard HF_HOME. Both are read at download time, so a model already downloaded to the default location is not moved; it is downloaded again into the new one.

Node.js

  • Node.js >= 22.0.0 (matches engines.node in package.json; CI runs on 22 and 24)
  • npm or yarn

📦 Installation

Note: If you just want to use xCOMET MCP Server, you do not need to clone this repository. Install the Python environment and model (see Prerequisites), then use npx (see Usage). The section below is for contributors and local development only.

Local Development

For contributors and local development:

bash
# Clone the repository
git clone https://github.com/shuji-bonji/xcomet-mcp-server.git
cd xcomet-mcp-server

# Set up Python virtual environment and install dependencies
uv venv .venv --python 3.12    # or: python3 -m venv .venv
source .venv/bin/activate
pip install -r python/requirements.txt

# Install Node.js dependencies and build
npm install
npm run build

🚀 Usage

With Claude Desktop (npx)

Add to your Claude Desktop configuration (claude_desktop_config.json):

config.json
{
  "mcpServers": {
    "xcomet": {
      "command": "npx",
      "args": ["-y", "xcomet-mcp-server@latest"],
      "env": {
        "XCOMET_PYTHON_PATH": "~/.xcomet-venv/bin/python3"
      }
    }
  }
}

Tip: If you installed Python packages system-wide or use pyenv, XCOMET_PYTHON_PATH may be omitted (auto-detection will find it). See Python Path Auto-Detection for details.

With Claude Code

Terminal
claude mcp add xcomet --env XCOMET_PYTHON_PATH=~/.xcomet-venv/bin/python3 -- npx -y xcomet-mcp-server@latest

Global Installation

If you prefer installing globally:

Terminal
npm install -g xcomet-mcp-server

Then configure:

config.json
{
  "mcpServers": {
    "xcomet": {
      "command": "xcomet-mcp-server",
      "env": {
        "XCOMET_PYTHON_PATH": "~/.xcomet-venv/bin/python3"
      }
    }
  }
}

Local Development Build

If you cloned and built the repository locally (see Installation):

config.json
{
  "mcpServers": {
    "xcomet": {
      "command": "node",
      "args": ["/path/to/xcomet-mcp-server/dist/index.js"],
      "env": {
        "XCOMET_PYTHON_PATH": "~/.xcomet-venv/bin/python3"
      }
    }
  }
}

🛠️ Available Tools

xcomet_evaluate

Evaluate translation quality for a single source-translation pair.

Parameters:

NameTypeRequiredDescription
sourcestring✅Original source text
translationstring✅Translated text to evaluate
referencestring❌Reference translation
source_langstring❌Source language code (ISO 639-1)
target_langstring❌Target language code (ISO 639-1)
response_format"json" | "markdown"❌Output format (default: "json")
use_gpuboolean❌Use GPU for inference (default: false)

Example:

config.json
{
  "source": "The quick brown fox jumps over the lazy dog.",
  "translation": "素早い茶色のキツネが怠惰な犬を飛び越える。",
  "source_lang": "en",
  "target_lang": "ja",
  "use_gpu": true
}

Response:

config.json
{
  "score": 0.847,
  "errors": [],
  "summary": "Good quality (score: 0.847) with 0 error(s) detected."
}

xcomet_detect_errors

Focus on detecting and categorizing translation errors.

Parameters:

NameTypeRequiredDescription
sourcestring✅Original source text
translationstring✅Translated text to analyze
referencestring❌Reference translation
min_severity"minor" | "major" | "critical"❌Minimum severity (default: "minor")
response_format"json" | "markdown"❌Output format
use_gpuboolean❌Use GPU for inference (default: false)

xcomet_batch_evaluate

Evaluate multiple translation pairs in a single request.

Performance Note: With the persistent server architecture (v0.3.0+), the model stays loaded in memory. Batch evaluation processes all pairs efficiently without reloading the model.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Xcomet MCP Server

It evaluates machine translation quality using a source text, a translation, and optionally a reference translation.

Evaluation provides a quality score from 0 to 1 and detected error spans with minor, major, or critical severity levels.

The evaluation tool marks the reference translation as optional, although the Unbabel/wmt22-comet-da model requires references.

The README recommends Python 3.9-3.12, Node.js 22 or newer, the unbabel-comet package, and a downloaded xCOMET model.

XCOMET-XL and XCOMET-XXL are gated models requiring Hugging Face access and CLI login; Unbabel/wmt22-comet-da does not require authentication.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewXcomet MCP Server AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/shuji-bonji-xcomet-mcp-server?style=directory)](https://allmcps.com/mcp/shuji-bonji-xcomet-mcp-server)
HTML Embed
<a href="https://allmcps.com/mcp/shuji-bonji-xcomet-mcp-server"><img src="https://allmcps.com/api/badge/shuji-bonji-xcomet-mcp-server?style=directory" alt="Xcomet MCP Server on AllMCPs" /></a>