The File Converter MCP server provides multiple tools for converting various document and image formats. Built on the Model Context Protocol (MCP), it enables AI agents to transform files between formats like DOCX, PDF, images, Excel, HTML, and Markdown.
Clone the repository
git clone https://github.com/wowyuarm/file-converter-mcp.git
cd file-converter-mcp
Create a virtual environment (recommended)
python -m venv venv
# On Unix/Linux/macOS
source venv/bin/activate
# On Windows
venv\Scripts\activate
Install dependencies
pip install mcp docx2pdf pdf2docx pillow pandas pdfkit markdown
Alternatively, using uv:
uv add "mcp[cli]" docx2pdf pdf2docx pillow pandas pdfkit markdown
Note: Some conversion libraries may require additional system dependencies. Check their documentation for details.
To run the server in development mode:
mcp dev file_converter_server.py
To make the server available on Claude Desktop:
mcp install file_converter_server.py --name "File Converter"
@File Converter
docx2pdf
input_file: path/to/document.docx
or with direct content:
@File Converter
docx2pdf
file_content_base64: [base64 encoded string]
@File Converter
pdf2docx
input_file: path/to/document.pdf
@File Converter
convert_image
input_file: path/to/image.png
output_format: jpg
or:
@File Converter
convert_image
file_content_base64: [base64 encoded string]
input_format: png
output_format: jpg
@File Converter
excel2csv
input_file: path/to/spreadsheet.xlsx
@File Converter
html2pdf
input_file: path/to/document.html
For versatile conversion between supported formats:
@File Converter
convert_file
input_file: path/to/file.docx
input_format: docx
output_format: pdf
or with direct content:
@File Converter
convert_file
file_content_base64: [base64 encoded string]
input_format: docx
output_format: pdf
If Claude or another agent can't find your uploaded file:
Try specifying a full path
@File Converter
docx2pdf
input_file: /tmp/file.docx
Use content-based conversion instead
@File Converter
docx2pdf
file_content_base64: [base64 encoded string]
The server implements a robust file search strategy that:
All conversions return either:
{"success": true, "data": "base64 encoded file content"}
{"success": false, "error": "error message"}
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.