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.
Before installing the DeepL MCP Server, ensure you have:
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.
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.
Open your VS Code MCP settings, typically located at:
~/Library/Application Support/Code/User/globalStorage/rooveterinaryinc.roo-cline/settings/mcp_settings.json
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": []
}
Open the Claude Desktop App configuration file, typically at:
~/Library/Application Support/Claude/claude_desktop_config.json
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.
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:
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.
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)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.
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"
]
}
}
}
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.
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.