Skip to main content
Glama

Doctranslate.io MCP Server

by thinkprompt
MIT License
7
  • Linux
  • Apple
README.md•8.64 kB
# Doctranslate.io MCP Server [![Python](https://img.shields.io/badge/Python-3.10+-blue.svg)](https://www.python.org/downloads/) [![License](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE) [![Docker](https://img.shields.io/badge/Docker-Ready-blue.svg)](docker-compose.yml) ## Overview **Doctranslate.io MCP Server** is a Model Context Protocol (MCP) server that provides document translation, text translation, and slide creation services through API. The server supports multilingual translation, text translation with formatting options, slide creation from documents, and translation history management. ## Features - šŸ”„ **Document Translation** - Multilingual document translation with tone and domain options - šŸ“ **Text Translation** - Translate text with multiple formatting options - šŸ“„ **Slide Creation** - Create presentation slides from documents with custom templates - šŸ“Š **History Management** - Translation history tracking with filtering ## System Requirements - Python >= 3.10 - pip (Python package manager) - Docker & Docker Compose (optional) ## Quick Start ### Installation 1. **Clone repository:** ```bash git clone https://github.com/thinkprompt/doctranslateio-mcp.git cd doctranslate-mcp-server ``` 2. **Create virtual environment:** ```bash python -m venv venv source venv/bin/activate # Linux/Mac # or venv\Scripts\activate # Windows ``` 3. **Install dependencies:** ```bash pip install -r requirements.txt ``` ### Running the Application **Direct execution:** ```bash python main.py ``` **With uvicorn:** ```bash uvicorn main:server --host 0.0.0.0 --port 8000 --reload ``` **With Docker:** ```bash docker-compose up -d ``` Server will run at: `http://localhost:8000` ## šŸš€ Quickstart with Cursor To use DocTranslate MCP Server with Cursor, follow these steps: #### Step 1: Configure MCP Tool in Cursor Settings 1. Open Cursor Settings and find Tools and Intergrations 2. Click at Add a custom MCP Server #### Step 2: Paste the config #### Using Headers ```json { "mcpServers": { "doctranslate-mcp-server": { "url": "http://mcp.doctranslate.io/mcp", "type": "streamable-http", "headers": { "api_key": "YOUR_API_KEY" } } } } ``` #### Using Query Parameter ```json { "mcpServers": { "doctranslate-mcp-server": { "url": "http://mcp.doctranslate.io/mcp?api_key=YOUR_API_KEY", "type": "streamable-http" } } } ``` ## šŸš€ Quickstart with Claude Desktop ### Setting up MCP Server for Claude Desktop To use DocTranslate MCP Server with Claude Desktop, follow these steps: #### Step 1: Configure stdio in main.py Change from `streamable-http` to `stdio` in `main.py` file to be compatible with Claude Desktop. #### Step 2: Configure claude_desktop_config.json 1. Open Claude Desktop 2. Go to **Claude > Settings > Developer > Edit Config** 3. Edit the `claude_desktop_config.json` file to include the following configuration: ```json { "mcpServers": { "mcp-server-doctranslate": { "command": "path to your python environment", "args": ["path to your folder\\main.py"] } } } ``` #### Example configurations: **On Windows:** ```json { "mcpServers": { "mcp-server-doctranslate": { "command": "C:\\Users\\YourUsername\\doctranslate-mcp\\venv\\Scripts\\python.exe", "args": ["C:\\Users\\YourUsername\\doctranslate-mcp\\main.py"] } } } ``` **On Linux/Mac:** ```json { "mcpServers": { "mcp-server-doctranslate": { "command": "/home/username/doctranslate-mcp/venv/bin/python", "args": ["/home/username/doctranslate-mcp/main.py"] } } } ``` #### Step 3: Restart Claude Desktop After saving the configuration, restart Claude Desktop to apply the changes. ### More Information For detailed information about setting up MCP servers, please refer to: - **Official Website**: [https://modelcontextprotocol.io/quickstart/user](https://modelcontextprotocol.io/quickstart/user) ## šŸš€ Quickstart with Python Code ### Using the MCP Client Programmatically You can also use the DocTranslate MCP Server programmatically with Python code: #### Installation ```bash pip install langchain_mcp_adapters ``` #### Basic Usage ```python from langchain_mcp_adapters.client import MultiServerMCPClient import asyncio # Initialize MCP client client = MultiServerMCPClient( { "doctranslate": { "transport": "streamable_http", "url": "http://ip_address:port/mcp", "headers": { "api_key": "YOUR_API_KEY" } }, } ) # Get available tools asynchronously tools = asyncio.run(client.get_tools()) print("Available tools:", tools) ``` #### Available Tools The MCP Server provides the following tools: - **`mcp_doctranslate_translate_text`** - Translate text with various options - **`mcp_doctranslate_translate_document`** - Translate documents (PDF, DOCX, PPTX, etc.) - **`mcp_doctranslate_get_translation_result`** - Get translation task results - **`mcp_doctranslate_convert_to_pptx`** - Convert documents to PowerPoint format - **`mcp_doctranslate_get_user_history`** - Get user's translation history ## Authentication & Configuration ### How to Create API Key To get started with DocTranslate MCP Server, you need to create an API key by following these steps: **Step 1:** Visit [doctranslate.io/manage-api-key](https://doctranslate.io/manage-api-key) ![Step 1: Visit API Key Management Page Or click on the button API Key](images/step1-visit-api-key-page.png) **Notice:** To generate an API key on Doctranslate, you must be the owner or an administrator of a Team Subscription plan !!! **Step 2:** Click "Create API Key" button ![Step 2: Click Create API Key Button](images/step2-create-api-key-button.png) **Step 3:** Copy the generated API Key for use in your configuration ![Step 3: Copy Generated API Key](images/step3-copy-api-key.png) ### Authentication Methods The MCP Server supports two authentication methods: 1. **Headers Authentication** - Pass API key in request headers 2. **Query Parameter Authentication** - Pass API key as URL parameter Both methods provide secure access to the translation services. ### Production Domain If you want to use our hosted MCP service, replace the local URL with our production domain: **Production URL**: `http://mcp.doctranslate.io` ## Documentation For detailed API documentation and implementation guides: - **Official Documentation**: [https://developer.doctranslate.io/document-translation-api/translation-api/api-v3](https://developer.doctranslate.io/document-translation-api/translation-api/api-v3) - **Interactive API Docs**: [https://api-doc.doctranslate.io/](https://api-doc.doctranslate.io/) ## Project Structure ``` doctranslate-mcp-server/ ā”œā”€ā”€ src/ │ └── agents/tools/ │ ā”œā”€ā”€ doctranslate.py │ └── reader.py ā”œā”€ā”€ scripts/ │ └── client/ │ └── client.py ā”œā”€ā”€ docs/ │ └── doctranslate.io.md ā”œā”€ā”€ main.py ā”œā”€ā”€ requirements.txt ā”œā”€ā”€ Dockerfile ā”œā”€ā”€ docker-compose.yml └── README.md ``` ## Client Connection ### Client Connection Example ```bash # Run client connection test python scripts/client/client.py ``` ## License This project is licensed under the MIT License. Copyright (c) 2025 Doctranslate.io Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ## Authors - **Doctranslate.io Team** ## Contact - Email: support@doctranslate.io - GitHub Issues: [Create new issue](https://github.com/thinkprompt/doctranslateio-mcp/issues) --- ⭐ If this project is helpful, please give us a star!

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/thinkprompt/doctranslateio-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server