> For the complete documentation index, see [llms.txt](https://developer.doctranslate.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.doctranslate.io/mcp-model-context-protocol/v1/setup.md).

# 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:**

```bash
git clone https://github.com/thinkprompt/doctranslateio-mcp.git
cd doctranslateio-mcp
```

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 Server

**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
```

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](https://developer.doctranslate.io/api-key)

#### 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:**

```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"
    }
  }
}
```

**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:

```json
{
  "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:**

```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://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:

* **Official Documentation**: <https://developer.doctranslate.io/document-translation-api/translation-api/api-v3>
* **Interactive API Docs**: <https://api-doc.doctranslate.io/>
* **Contact Form**: <https://doctranslate.io/en/contact>
* **Email Support**: <support@doctranslate.io>
