An MCP server for translating long-form text in chunks.
Project description
MCP Translator Server
This project provides an MCP (Model Context Protocol) server designed to facilitate the translation of long-form text documents.
Features
- Accepts paths to multiple text files for concurrent translation jobs.
- Splits each text file into manageable chunks.
- Stores chunks and their translation status in a SQLite database (
translation_progress.db), keeping track of which file each chunk belongs to. - Provides tools to:
- Initialize or restart the translation process for a specific file (
start_translation file_path=...). Clears previous progress for that file if it existed. - List all ongoing translation jobs and their progress (
list_jobs). - Fetch the next untranslated chunk for a specific file (
get_next_chunk file_path=...). - Submit the translation for a specific chunk ID (
submit_translation chunk_id=... translated_text=...).
- Initialize or restart the translation process for a specific file (
Setup
-
Install dependencies:
pip install . # Or pip install -e . for development mode
-
Download the spaCy model:
python -m spacy download xx_sent_ud_sm
Running the Server
mcp-translator
This will start the MCP server, listening for client connections. The database file (translation_progress.db) will be created in the same directory as server.py.
Usage
Connect an MCP client (like a compatible AI assistant or script) to the running server. The client can then use the available tools, making sure to specify the file_path where required (start_translation, get_next_chunk), to manage the translation workflow for different files.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mcp_translator-0.1.0.tar.gz.
File metadata
- Download URL: mcp_translator-0.1.0.tar.gz
- Upload date:
- Size: 8.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a7f69214f661ea4710d60e6b1dc4c02702b459f81844e2afdbb77cb40fce1282
|
|
| MD5 |
1a2aa322642ba478809e7398497e6957
|
|
| BLAKE2b-256 |
cd5fb6f6904e1d2c8fced97cc4d2acbb781f7f9b977d9a6537264d35a1e9efb1
|
File details
Details for the file mcp_translator-0.1.0-py3-none-any.whl.
File metadata
- Download URL: mcp_translator-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c00ac02b580d24797d8b5993223136a7e03871ffc4cf0a918a35fa8c7c5eae5c
|
|
| MD5 |
4f74c8b1becebb551c1a65f7a6ab0128
|
|
| BLAKE2b-256 |
fa8f80e90734f75addd7858af7fdaf7aaaf304abf3486fb54a4bdbc92c5e9a79
|