DeepL Translator MCP server

Integrates with DeepL API to provide high-quality text translation between multiple languages with comprehensive error handling and request validation
Back to servers
Provider
watchdealer-pavel
Release date
Apr 11, 2025
Language
TypeScript
Stats
3 stars

The DeepL MCP Server provides a convenient interface for accessing DeepL translation capabilities through the Model Context Protocol (MCP). It allows AI assistants to perform translations and retrieve language information using the DeepL API.

Prerequisites

Before installing the DeepL MCP Server, ensure you have:

  • Node.js and npm/yarn installed on your system
  • A DeepL API key (available with both Free and Pro plans from DeepL Pro API)

Installation

To install the DeepL MCP Server:

git clone https://github.com/watchdealer-pavel/deepl-mcp-server.git
cd deepl-mcp-server
npm install
npm run build

This process compiles the TypeScript source code into JavaScript and places the output in the build/ directory.

Configuration

The server requires your DeepL API key via the DEEPL_API_KEY environment variable. You'll need to configure your MCP client to run this server with the proper environment variable.

Configuring Cline / Roo Code (VS Code Extension)

  1. Open your VS Code MCP settings, typically located at: ~/Library/Application Support/Code/User/globalStorage/rooveterinaryinc.roo-cline/settings/mcp_settings.json

  2. Add this configuration under the mcpServers key:

"deepl-translator": {
  "command": "node",
  "args": ["/path/to/your/deepl-mcp-server/build/index.js"],
  "env": {
    "DEEPL_API_KEY": "YOUR_DEEPL_API_KEY"
  },
  "disabled": false,
  "alwaysAllow": []
}

Configuring Claude Desktop App

  1. Open the Claude Desktop App configuration file, typically at: ~/Library/Application Support/Claude/claude_desktop_config.json

  2. Add this configuration under the mcpServers key:

"deepl-translator": {
  "command": "node",
  "args": ["/path/to/your/deepl-mcp-server/build/index.js"],
  "env": {
    "DEEPL_API_KEY": "YOUR_DEEPL_API_KEY"
  },
  "disabled": false,
  "alwaysAllow": []
}

Important: Replace /path/to/your/deepl-mcp-server/build/index.js with the actual absolute path to the compiled server file on your system, and YOUR_DEEPL_API_KEY with your real DeepL API key.

Usage

After configuration, you can use the server's tools from your AI assistant using the use_mcp_tool command. The server provides two main functions:

Listing Supported Languages

To retrieve a list of languages supported by DeepL:

<use_mcp_tool>
  <server_name>deepl-translator</server_name>
  <tool_name>list_languages</tool_name>
  <arguments>
    {
      "type": "target"
    }
  </arguments>
</use_mcp_tool>

The type parameter is optional and can be "source" or "target". If omitted, it will list all languages.

Translating Text

To translate text between languages:

<use_mcp_tool>
  <server_name>deepl-translator</server_name>
  <tool_name>translate_text</tool_name>
  <arguments>
    {
      "text": ["Hello world", "How are you?"],
      "target_lang": "DE",
      "source_lang": "EN"
    }
  </arguments>
</use_mcp_tool>

Parameters:

  • text: An array of strings to translate (required)
  • target_lang: Target language code, e.g., DE, FR, ES (required)
  • source_lang: Source language code (optional - DeepL will auto-detect if omitted)

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later