DeepL
About
Translate text using the DeepL API.
Details
- Author
- alwayssany
- Categories
- Productivity, Other, API
Jump to
Setup
Install DeepL in your MCP client (Claude Desktop, Cursor, Windsurf, and others).
Repository: https://github.com/alwayssany/deepl-fastmcp-python-server
Follow the installation instructions in the repository README, then restart your MCP client.
- Translate text between numerous languages
- Rephrase text using DeepL's capabilities
- Access to all DeepL API languages and features
- Automatic language detection
- Formality control for supported languages
- Batch translation and document translation
- Usage and quota reporting
- Translation history and usage analysis
- Support for multiple MCP transports: stdio, SSE, and Streamable HTTP
git clone https://github.com/AlwaysSany/deepl-fastmcp-python-server.git cd deepl-fastmcp-python-server
Create a.envfile or exportDEEPL_AUTH_KEYin your shell.You can do this by running the following command and then update the.envfile with your DeepL API key:
To run withStreamable HTTPtransport (recommended for web deployments):
uv run python main.py --transport streamable-http --host 127.0.0.1 --port 8000
uv run python main.py --transport sse --host 127.0.0.1 --port 8000
It will show some messages in the terminal like this:
Spawned stdio transport Connected MCP client to backing server transport
🔍 MCP Inspector is up and running athttp://127.0.0.1:6274
docker run -e DEEPL_AUTH_KEY=your_deepl_api_key -p 8000:8000 deepl-fastmcp-server
This will build the image and start the server, mapping port 8000 on your host to the container.
You'll need a DeepL API key to use this server. You can get one by signing up atDeepL API. With a DeepL API Free account you can translate up to 500,000 characters/month for free.
- DEEPL_AUTH_KEY(required): Your DeepL API key.
- DEEPL_SERVER_URL(optional): Override the DeepL API endpoint (default:https://api-free.deepl.com).
This server supports the following MCP transports:
- Stdio: Default transport for local usage.
- SSE (Server-Sent Events): Ideal for real-time event-based communication.
- Streamable HTTP: Suitable for HTTP-based streaming applications.
To configure these transports, ensure your environment supports the required protocols and dependencies.
Click onFile>Preferences>Cursor Settings>MCP>MCP Servers>Add new global MCP server
{ "mcpServers": { "deepl-fastmcp": { "command": "uv", "args": [ "--directory", "/path/to/yourdeepl-fastmcp-python-server/.venv", "run", "--with", "mcp", "python", "/path/to/your/deepl-fastmcp-python-server/main.py", "--transport", "streamable-http", "--host", "127.0.0.1", "--port", "8000" ] } } }
Note: To use Streamable HTTP or SSE transports with Cursor IDE, change the"--transport", "stdio"line to"--transport", "streamable-http", "--host", "127.0.0.1", "--port", "8000"or"--transport", "sse", "--host", "127.0.0.1", "--port", "8000"respectively, and adjust the host and port as needed.
"mcpServers": { "deepl-fastmcp": { "type": "sse", "url": "http://127.0.0.1:8000/sse" } }
and then run mcp server from terminaluv run main.py --transport sse --host 127.0.0.1 --port 8000
This MCP server integrates with Claude Desktop to provide translation capabilities directly in your conversations with Claude.
-
Install Claude Desktop if you haven't already
Create or edit the Claude Desktop configuration file:
- On macOS:~/Library/Application Support/Claude/claude_desktop_config.json
- On Windows:%AppData%\Claude\claude_desktop_config.json
- On Linux:~/.config/Claude/claude_desktop_config.json
{ "mcpServers": { "deepl-fastmcp": { "command": "uv", "args": [ "--directory", "/path/to/yourdeepl-fastmcp-python-server/.venv", "run", "--with", "mcp", "python", "/path/to/your/deepl-fastmcp-python-server/main.py", "--transport", "streamable-http", "--host", "127.0.0.1", "--port", "8000" ] } } }
Note: To use Streamable HTTP or SSE transports with Claude Desktop, change the"--transport", "stdio"line to"--transport", "streamable-http", "--host", "127.0.0.1", "--port", "8000"or"--transport", "sse", "--host", "127.0.0.1", "--port", "8000"respectively, and adjust the host and port as needed.
This server provides the following tools:
- translate_text: Translate text to a target language
- rephrase_text: Rephrase text in the same or different language
- batch_translate: Translate multiple texts in a single request
- translate_document: Translate a document file using DeepL API
- detect_language: Detect the language of given text
- get_translation_history: Get recent translation operation history
- analyze_usage_patterns: Analyze translation usage patterns from history
The following resources are available for read-only data access (can be loaded into LLM context):
- usage://deepl: DeepL API usage info.
- deepl://languages/source: Supported source languages.
- deepl://languages/target: Supported target languages.
- deepl://glossaries: Supported glossary language pairs.
- history://translations: Recent translation operation history (same asget_translation_historytool)
- usage://patterns: Usage pattern analysis (same asanalyze_usage_patternstool)
The following prompt is available for LLMs:
-
summarize: Returns a message instructing the LLM to summarize a given text.
@mcp.prompt("summarize") def summarize_prompt(text: str) -> str: return f"Please summarize the following text:\n\n{text}"
Translate text between languages using the DeepL API.
- Parameters:
- text: The text to translate
- target_language: Target language code (e.g., 'EN', 'DE', 'FR', 'ES', 'IT', 'JA', 'ZH')
- source_language(optional): Source language code
- formality(optional): Controls formality level ('less', 'more', 'default', 'prefer_less', 'prefer_more')
- preserve_formatting(optional): Whether to preserve formatting
- split_sentences(optional): How to split sentences
- tag_handling(optional): How to handle tags
Rephrase text in the same or different language using the DeepL API.
- Parameters:
- text: The text to rephrase
- target_language: Language code for rephrasing
- formality(optional): Desired formality level
- context(optional): Additional context for better rephrasing
Translate multiple texts in a single request.
- Parameters:
- texts: List of texts to translate
- target_language: Target language code
- source_language(optional): Source language code
- formality(optional): Formality level
- preserve_formatting(optional): Whether to preserve formatting
Translate a document file using DeepL API.
- Parameters:
- file_path: Path to the document file
- target_language: Target language code
- output_path(optional): Output path for translated document
- formality(optional): Formality level
- preserve_formatting(optional): Whether to preserve document formatting
Detect the language of given text using DeepL.
- Parameters:
- text: Text to analyze for language detection
- No parameters required. See tool output for details.
- No parameters required. See tool output for details.
The DeepL API supports a wide variety of languages for translation. You can use theget_source_languagesandget_target_languagestools, or thedeepl://languages/sourceanddeepl://languages/targetresources, to see all currently supported languages.
Some examples of supported languages include:
- English (en, en-US, en-GB)
- German (de)
- Spanish (es)
- French (fr)
- Italian (it)
- Japanese (ja)
- Chinese (zh)
- Portuguese (pt-BR, pt-PT)
- Russian (ru)
- And many more
For debugging information, visit theMCP debugging documentation.
If you encounter errors with the DeepL API, check the following:
- Verify your API key is correct
- Make sure you're not exceeding your API usage limits
- Confirm the language codes you're using are supported
To deploy on a server(render.com), you need to compile yourpyproject.tomltorequirements.txtbecause it doesn't supportuvright now. So to do that, you can use the following commands:
uv pip compile pyproject.toml > requirements.txt
then, create aruntime.txtfile with the python version,
echo "python-3.13.3" > runtime.txt
finally, set the environment variablePORT,DEEPL_SERVER_URLandDEEPL_AUTH_KEYwith your DeepL API key on render.com workspace before you set the entry point,
python main.py --transport sse --host 0.0.0.0 --port 8000
The MCP server is live and accessible on Render.com.
Live Endpoint:
https://deepl-fastmcp-python-server.onrender.com/sse
You can interact with the API at the above URL.
- Add more test cases
- Add more features
- Add more documentation
- Add more security features
- Add more logging
- Add more monitoring
- Add more performance optimization
Contributions are welcome! If you have suggestions for improvements or new features, please open an issue or submit a pull request.
- Author:Sany Ahmed
- Email:sany2k8@gmail.com
- DeepL API Documentation
- Model Context Protocol Documentation
Locize TMS: 26 tools for translations, TM/glossary/styleguide/screenshot context, versions. OAuth.
20+ pay-per-request APIs for AI agents — screenshots, web scraping, PDF, OCR, search, QR codes, translation & more. No API keys needed. Pay with USDC via x402. npm: @pylonapi/mcp
A MCP server for SimpleLocalize, a translation management system. Requires a SimpleLocalize API key.
US/HK markets — 110 tools: real-time quotes, options, orders, fundamentals, alerts, DCA & portfolio
Magica is your all-in-one AI platform, offering 2500+ cutting-edge tools under a single subscription.
Turn your Make scenarios into callable tools for AI assistants.
Mercado Pago's official MCP server, offering tools to interact with our API, simplifying tasks and product integration.
Connect Patent APIs like EPO OPS, USPTO ODP or Google Patents to your chatbot.
Interact with Ramp's Developer API to run analysis on your spend and gain insights leveraging LLMs
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.





