Skip to main content

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=...).

Setup

  1. Install dependencies:

    pip install .
    # Or pip install -e . for development mode
    
  2. 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

mcp_translator-0.1.6.tar.gz (14.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_translator-0.1.6-py3-none-any.whl (15.4 kB view details)

Uploaded Python 3

File details

Details for the file mcp_translator-0.1.6.tar.gz.

File metadata

  • Download URL: mcp_translator-0.1.6.tar.gz
  • Upload date:
  • Size: 14.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.10

File hashes

Hashes for mcp_translator-0.1.6.tar.gz
Algorithm Hash digest
SHA256 621d4f6915a55b6d5fcd723da3fe9f13216e7d2a1db0ef128315ff9a7897e2e1
MD5 8d26abcda8939278b7126ce8799c0650
BLAKE2b-256 838cdad59dd228d87133c5d949e4377ae5bfdcb69bffe749a2b6e1b9161ab42c

See more details on using hashes here.

File details

Details for the file mcp_translator-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: mcp_translator-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 15.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.10

File hashes

Hashes for mcp_translator-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 44cf61e789301ba489f1892af69bd3c5e9a37f7f530a4947b6ebe4a76605a15a
MD5 9f1969f2a79576645819fd3e6509410b
BLAKE2b-256 a6e2e7ec6b9938113f246b2bef4b17662fa9b57e7f31b1f0e5c450a7487f07ae

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page