A lightweight, MCPO-integrated tool that lets you generate and export real files (PDF, Excel, PowerPoint, ZIP, etc.) directly from Open WebUI β just like ChatGPT or Claude.
β
Supports both Python and Docker
β
Fully configurable
β
Ready for production workflows
β
Open source & MIT licensed
π Create and export files easily from Open WebUI!
This tool allows seamless file generation and export directly from your Open WebUI environment using Python and FastAPI.
2025-09-01.00-05-09.mp4
2025-08-31.23-46-14.mp4
Best practices here: Best_Practices.md
Prompt examples here: Prompt_Examples.md
-
Clone the repo:
git clone https://github.com/GlisseManTV/OWUI_File_Gen_Export.git
-
Update env variables in
config.json: These ones only concerns the MCPO partPYTHONPATH: Path to yourLLM_Exportfolder (e.g.,C:\temp\LLM_Export) <=== MANDATORY no default valueFILE_EXPORT_BASE_URL: URL of your file export server (default ishttp://localhost:9003/files)FILE_EXPORT_DIR: Directory where files will be saved (must match the server's export directory) (default isPYTHONPATH\output)PERSISTENT_FILES: Set totrueto keep files after download,falseto delete after delay (default is false)FILES_DELAY: Delay in minut to wait before checking for new files (default is 60)UNSPLASH_ACCESS_KEY: Your Unsplash API key (no default value, not mandatory but advised) see here
-
Install dependencies:
pip install openpyxl reportlab py7zr fastapi uvicorn python-multipart mcp
-
Run the file server:
set FILE_EXPORT_DIR=C:\temp\LLM_Export\output start "File Export Server" python "YourPATH/LLM_Export/tools/file_export_server.py"
-
Use it in Open WebUI β your AI can now generate and export files in real time!
This file only concerns the MCPO part, you need to run the file server separately as shown above
This is an example of a minimal config.json for MCPO to enable file export but you can add other (or to other) MCP servers as needed.
{
"mcpServers": {
"file_export": {
"command": "python",
"args": [
"-m",
"tools.file_export_mcp"
],
"env": {
"PYTHONPATH": "C:\\temp\\LLM_Export", <==== HERE set the path to your LLM_Export folder (this one is Mandatory)
"FILE_EXPORT_BASE_URL": "http://localhost:9003/files", <==== HERE set the URL of your file export server
"FILE_EXPORT_DIR": "C:\\temp\\LLM_Export\\output", <==== HERE set the directory where files will be saved (must match the server's export directory)
"PERSISTENT_FILES": "false", <==== HERE set to true to keep files after download, false to delete after delay
"FILES_DELAY": "60" <==== HERE set the delay in minut to wait before checking for new files
"UNSPLASH_ACCESS_KEY": <== Your Unsplash API key (no default value, not mandatory but advised) see [here](https://unsplash.com/documentation#creating-a-developer-account)
},
"disabled": false,
"autoApprove": []
}
}
Use
docker pull ghcr.io/glissemantv/owui-file-export-server:latest
docker pull ghcr.io/glissemantv/owui-mcpo:latest
For OWUI-MCPO
MCPO_API_KEY: Your MCPO API key (no default value, not mandatory but advised)FILE_EXPORT_BASE_URL: URL of your file export server (default ishttp://localhost:9003/files)FILE_EXPORT_DIR: Directory where files will be saved (must match the server's export directory) (default is/output) path must be mounted as a volumePERSISTENT_FILES: Set totrueto keep files after download,falseto delete after delay (default isfalse)FILES_DELAY: Delay in minut to wait before checking for new files (default is 60)UNSPLASH_ACCESS_KEY: Your Unsplash API key (no default value, not mandatory but advised) see here
For OWUI-FILE-EXPORT-SERVER
FILE_EXPORT_DIR: Directory where files will be saved (must match the MCPO's export directory) (default is/output) path must be mounted as a volume
β This ensures MCPO can correctly reach the file export server. β If not set, file export will fail with a 404 or connection error.
Here is an example of a docker run script file to run both the file export server and the MCPO server:
docker run -d --name file-export-server --network host -e FILE_EXPORT_DIR=/data/output -p 9003:9003 -v /path/to/your/export/folder:/data/output ghcr.io/glissemantv/owui-file-export-server:latest
docker run -d --name owui-mcpo --network host -e FILE_EXPORT_BASE_URL=http://192.168.0.100:9003/files -e FILE_EXPORT_DIR=/output -e MCPO_API_KEY=top-secret -e PERSISTENT_FILES=True -e FILES_DELAY=1 -e -e LOG_LEVEL=INFO -e UNSPLASH_ACCESS_KEY=top-secret -p 8000:8000 -v /path/to/your/export/folder:/output ghcr.io/glissemantv/owui-mcpo:latest
Here is an example of a docker-compose.yaml file to run both the file export server and the MCPO server:
services:
file-export-server:
image: ghcr.io/glissemantv/owui-file-export-server:latest
container_name: file-export-server
environment:
- FILE_EXPORT_DIR=/output
ports:
- "9003:9003"
volumes:
- /your/export-data:/output
owui-mcpo:
image: ghcr.io/glissemantv/owui-mcpo:latest
container_name: owui-mcpo
environment:
- FILE_EXPORT_BASE_URL=http://file-export-server:9003/files
- FILE_EXPORT_DIR=/output
- MCPO_API_KEY=top-secret
- PERSISTENT_FILES=true
- FILES_DELAY=1
- LOG_LEVEL=INFO
- UNSPLASH_ACCESS_KEY=top-secret
ports:
- "8000:8000"
volumes:
- /your/export-data:/output
depends_on:
- file-export-server- β
.xlsx(Excel) - β
.pdf(PDF) - β
.csv(CSV) - β
.pptx(PowerPoint) - β
.zipntar.gzand.7z(Archives) - β Any other file type
OWUI_File_Gen_Export/
βββ LLM_Export/
β βββ tools/
β β βββ file_export_server.py
β β βββ file_export_mcp.py
β βββ ...
βββ docker/
β βββ file_server/
β β βββ Dockerfile.server
β β βββ file_server_compose.yaml
β β βββ file_export_server.py
β βββ mcpo/
β β βββ Dockerfile
β β βββ requirements.txt
β β βββ config.json
β β βββ MCPO_server_compose.yaml
β β βββtools/
β β βββ file_export_mcp.py
β βββ docker-compose.yaml
βββ README.md
- File output paths must match between
file_serverandMCPO - Always use absolute paths for volume mounts
{
"mcpServers": {
"file_export": {
"command": "python", <==== HERE change "python" to "python3", "python3.11" or "python3.12"
"args": [
"-m",
"tools.file_export_mcp"
],
"env": {
"PYTHONPATH": "C:\\temp\\LLM_Export" <==== HERE set the path to your LLM_Export folder (this one is Mandatory)
},
"disabled": false,
"autoApprove": []
}
}
This tool turns Open WebUI into a true productivity engine β where AI doesnβt just chat, but delivers usable, downloadable files.
MIT License β Feel free to use, modify, and distribute.
π¬ Need help? Open an issue or start a discussion on GitHub!
A big thank you to the contributors and open-source projects that made this work possible:
-
tjbck for creating Open WebUI and mcpo, foundational pillars of this integration.
-
modelcontextprotocol/servers for high-quality tools and architectural inspiration that guided the development of MCP servers and file generation workflows.
-
gentoorax for close collaboration, technical rigor, and invaluable contributions to the quality and stability of this project.
Thank you to everyone for your passion, expertise, and dedication to the open-source community. π
Using development versions of libraries is at your own risk. Always test in a safe environment first.
Use
docker pull ghcr.io/glissemantv/owui-file-export-server:dev-latest
docker pull ghcr.io/glissemantv/owui-mcpo:dev-latest
For OWUI-MCPO
MCPO_API_KEY: Your MCPO API key (no default value, not mandatory but advised)FILE_EXPORT_BASE_URL: URL of your file export server (default ishttp://localhost:9003/files)FILE_EXPORT_DIR: Directory where files will be saved (must match the server's export directory) (default is/output) path must be mounted as a volumePERSISTENT_FILES: Set totrueto keep files after download,falseto delete after delay (default isfalse)FILES_DELAY: Delay in minut to wait before checking for new files (default is 60)UNSPLASH_ACCESS_KEY: Your Unsplash API key (no default value, not mandatory but advised) see here
For OWUI-FILE-EXPORT-SERVER
FILE_EXPORT_DIR: Directory where files will be saved (must match the MCPO's export directory) (default is/output) path must be mounted as a volume
β This ensures MCPO can correctly reach the file export server. β If not set, file export will fail with a 404 or connection error.
Here is an example of a docker run script file to run both the file export server and the MCPO server:
docker run -d --name file-export-server --network host -e FILE_EXPORT_DIR=/data/output -p 9003:9003 -v /path/to/your/export/folder:/data/output ghcr.io/glissemantv/owui-file-export-server:dev-latest
docker run -d --name owui-mcpo --network host -e FILE_EXPORT_BASE_URL=http://192.168.0.100:9003/files -e FILE_EXPORT_DIR=/output -e MCPO_API_KEY=top-secret -e PERSISTENT_FILES=True -e FILES_DELAY=1 -e LOG_LEVEL=DEBUG -e UNSPLASH_ACCESS_KEY=top-secret -p 8000:8000 -v /path/to/your/export/folder:/output ghcr.io/glissemantv/owui-mcpo:dev-latest
Here is an example of a docker-compose.yaml file to run both the file export server and the MCPO server:
services:
file-export-server:
image: ghcr.io/glissemantv/owui-file-export-server:dev-latest
container_name: file-export-server
environment:
- FILE_EXPORT_DIR=/output
ports:
- "9003:9003"
volumes:
- /your/export-data:/output
owui-mcpo:
image: ghcr.io/glissemantv/owui-mcpo:dev-latest
container_name: owui-mcpo
environment:
- FILE_EXPORT_BASE_URL=http://file-export-server:9003/files
- FILE_EXPORT_DIR=/output
- MCPO_API_KEY=top-secret
- PERSISTENT_FILES=true
- FILES_DELAY=1
- LOG_LEVEL=DEBUG
- UNSPLASH_ACCESS_KEY=top-secret
ports:
- "8000:8000"
volumes:
- /your/export-data:/output
depends_on:
- file-export-server