Rosetta Mcp

io.github.ewalid由 GitHub 帳號 ewalid 發布v0.1.1更新於 Oct 24, 2026

AI-powered Excel translation preserving formatting, formulas, and data integrity.

概覽

AI 產生的概覽

本機 MCP 伺服器,透過 Claude AI 翻譯 Excel 檔案中的文字,同時保留公式、格式、圖表與版面配置。

可以做什麼
將 Excel 活頁簿翻譯成目標語言,可指定來源語言、輸出檔案與要處理的特定工作表,並提供領域背景以提升準確度。寫回譯文時保留公式、格式、合併儲存格、圖表、圖片、下拉選單與富文字。不會修改原始檔案,結果另存為新檔案。估算可翻譯儲存格數量與翻譯成本,並預覽將被翻譯的儲存格。
適用情境
適合需要把價目表、表單或問卷等試算表本地化成其他語言、又不希望破壞其結構的情況,且願意為 Anthropic 的翻譯呼叫付費。
執行需求
以本機程序在使用者電腦上執行(僅限桌面端),透過 uv 或 Python 3.11+ 啟動;清單中列出的是 npm 套件。需要 Anthropic API 金鑰,透過環境變數 ANTHROPIC_API_KEY 提供,並需要連線至 Anthropic API 的網路存取。
安裝前請注意
必須提供 ANTHROPIC_API_KEY 金鑰並妥善保密。翻譯呼叫由 Anthropic 計費,通常每個檔案數美分。儲存格文字會傳送到 Anthropic 的 Claude API 進行翻譯,機密試算表請謹慎使用。原始檔案不會被修改,結果寫入新檔案。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Rosetta Mcp,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

Rosetta

[PyPI version] [Python 3.11+] [License: MIT]

AI-powered Excel translation CLI. Translates Excel files while preserving formatting, formulas, and data integrity.

What it does

Rosetta translates all text in your Excel files using Claude AI, without breaking:

  • Formulas and calculations
  • Formatting (fonts, colors, borders)
  • Merged cells and layouts
  • Charts and images
  • Dropdown menus
  • Rich text (bold, italic within cells)

Prerequisites

You need a Claude API key from Anthropic.

  1. Go to console.anthropic.com
  2. Create an account (or sign in)
  3. Go to API Keys and create a new key
  4. Copy the key (starts with sk-ant-...)

Note: API usage is billed by Anthropic. See anthropic.com/pricing for current rates. Translating a typical Excel file costs a few cents.

Installation

Install from PyPI:

bash
pip install rosetta-xl

Then set your API key:

bash
# Linux/macOSexport ANTHROPIC_API_KEY=sk-ant-your-key-here
# Windows (Command Prompt)set ANTHROPIC_API_KEY=sk-ant-your-key-here
# Windows (PowerShell)$env:ANTHROPIC_API_KEY="sk-ant-your-key-here"

Or create a .env file in your working directory:

ANTHROPIC_API_KEY=sk-ant-your-key-here

Usage

bash
# Translate to Frenchrosetta input.xlsx -t french
# Translate to Spanish with custom output namerosetta input.xlsx -t spanish -o translated.xlsx
# Specify source language (auto-detected by default)rosetta input.xlsx -s english -t german
# Translate only specific sheetsrosetta input.xlsx -t french --sheets "Sheet1" --sheets "Data"
# Add context for better translations (e.g., domain-specific terms)rosetta input.xlsx -t french -c "Medical terminology document"

Options

OptionShortDescription
--target-lang-tTarget language (required)
--source-lang-sSource language (auto-detect if omitted)
--output-oOutput file path (default: input_translated.xlsx)
--sheetsSheets to translate (can repeat, default: all)
--context-cDomain context for better accuracy
--batch-size-bCells per API call (default: 50)

Examples

Translate a price list to multiple languages:

bash
rosetta prices.xlsx -t french -o prices_fr.xlsxrosetta prices.xlsx -t german -o prices_de.xlsxrosetta prices.xlsx -t spanish -o prices_es.xlsx

Translate a medical form with context:

bash
rosetta patient_form.xlsx -t french -c "Medical intake form with clinical terminology"

Translate only the "Questions" sheet:

bash
rosetta survey.xlsx -t japanese --sheets "Questions"

Troubleshooting

"ANTHROPIC_API_KEY not set"

  • Make sure you've exported the key: export ANTHROPIC_API_KEY=sk-ant-...
  • Or create a .env file with the key

"Invalid API key"

"Rate limit exceeded"

  • You've hit Anthropic's rate limits. Wait a minute and try again
  • Or reduce batch size: rosetta input.xlsx -t french -b 20

How it works

  1. Extracts all text cells from your Excel file
  2. Sends text to Claude AI for translation (in batches)
  3. Writes translations back, preserving all formatting
  4. Saves the translated file

Your original file is never modified.

Web App & API

Rosetta also includes a web application and REST API for browser-based translations.

Running the API server

bash
# Install with uv (recommended)uv sync
# Start the serveruv run uvicorn rosetta.api:app --reload
# Or with pippip install -e .uvicorn rosetta.api:app --reload

The API runs at http://localhost:8000 by default.

Running the frontend

bash
cd frontendnpm installnpm run dev

The frontend runs at http://localhost:5173 and connects to the API.

API Endpoints

EndpointMethodDescription
/translatePOSTTranslate an Excel file (returns file)
/translate-streamPOSTTranslate with real-time progress via SSE
/estimatePOSTGet cell count and cost estimate
/sheetsPOSTList sheet names in a file
/countPOSTCount translatable cells
/previewPOSTPreview cells that will be translated
/healthGETHealth check

Real-time Progress

The /translate-stream endpoint uses Server-Sent Events (SSE) to stream translation progress in real-time. The frontend automatically falls back to the standard /translate endpoint on networks that don't support SSE (e.g., corporate proxies).

MCP Integration

Rosetta includes MCP (Model Context Protocol) servers for both Claude Desktop and Claude Web.

For Claude Desktop (Local)

Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json):

json
{  "mcpServers": {    "rosetta": {      "command": "uv",      "args": ["run", "--directory", "/path/to/rosetta", "python", "-m", "rosetta.api.mcp"],      "env": {        "ANTHROPIC_API_KEY": "your-key-here"      }    }  }}

Usage: Use local file paths for best results.

Translate ~/Downloads/report.xlsx to French

For Claude Web (Browser)

Note: Claude.ai does not yet support custom MCP servers in the browser (as of January 2026).

Current recommendation: Use the web app for browser-based translations.

See MCP_USAGE.md for detailed instructions.

Requirements

  • Python 3.11+
  • Anthropic API key

License

MIT

來源:README.md,提交 909eacc

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.1.1最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分