Setup

Setting Up Doctranslate.io MCP Server

There are two methods to set up and use the Doctranslate.io MCP Server:

  1. Self-hosted setup using our GitHub repository

  2. Using our hosted MCP service

Method 1: Self-Hosted Setup

System Requirements

  • Python >= 3.10

  • pip (Python package manager)

  • Docker & Docker Compose (optional)

Installation Steps

  1. Clone repository:

git clone https://github.com/thinkprompt/doctranslateio-mcp.git
cd doctranslateio-mcp
  1. Create virtual environment:

python -m venv venv
source venv/bin/activate  # Linux/Mac
# or
venv\Scripts\activate  # Windows
  1. Install dependencies:

pip install -r requirements.txt

Running the Server

Direct execution:

python main.py

With uvicorn:

uvicorn main:server --host 0.0.0.0 --port 8000 --reload

With Docker:

docker-compose up -d

Your server will be running at: http://localhost:8000

Method 2: Using Our Hosted Service

Quick Setup

Instead of setting up your own server, you can use our hosted MCP service. Simply use the following production URL in your configuration:

Production URL: http://mcp.doctranslate.io

Authentication

Before you can start using the service, you'll need a valid API key. You can find instructions on how to obtain one here

Integration Methods

1. Cursor Integration

Step 1: Configure MCP Tool in Cursor

  1. Open Cursor Settings and find Tools and Integrations

  2. Click "Add a custom MCP Server"

Step 2: Add Configuration

Using Headers:

{
  "mcpServers": {
    "doctranslate-mcp-server": {
      "url": "http://mcp.doctranslate.io/mcp",
      "type": "streamable-http",
      "headers": {
        "api_key": "YOUR_API_KEY"
      }
    }
  }
}

Using Query Parameter:

{
  "mcpServers": {
    "doctranslate-mcp-server": {
      "url": "http://mcp.doctranslate.io/mcp?api_key=YOUR_API_KEY",
      "type": "streamable-http"
    }
  }
}

2. Claude Desktop Integration

Step 1: Configure claude_desktop_config.json

  1. Open Claude Desktop

  2. Go to Claude > Settings > Developer > Edit Config

  3. Add the following configuration:

{
  "mcpServers": {
    "mcp-server-doctranslate": {
      "url": "http://mcp.doctranslate.io/mcp",
      "type": "streamable-http",
      "headers": {
        "api_key": "YOUR_API_KEY"
      }
    }
  }
}

Step 2: Restart Claude Desktop

After saving the configuration, restart Claude Desktop to apply changes.

3. Python Code Integration

Installation:

pip install langchain_mcp_adapters

Basic Usage:

from langchain_mcp_adapters.client import MultiServerMCPClient
import asyncio

# Initialize MCP client
client = MultiServerMCPClient(
    {
        "doctranslate": {
            "transport": "streamable_http",
            "url": "http://mcp.doctranslate.io/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:

  • translate_text - Translate text with various options

  • translate_document - Translate documents (PDF, DOCX, PPTX, etc.)

  • get_translation_result - Get translation task results

  • convert_to_pptx - Create presentation slides from documents with custom templates

  • get_user_history - Get user's translation history

Documentation & Support

For detailed API documentation and implementation guides:

Last updated