Skip to content

raedkit/OWUI_File_Gen_Export

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

117 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

OWUI_File_Gen_Export – Export Files Directly from Open WebUI

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.

Multi files

2025-09-01.00-05-09.mp4

Single archive

2025-08-31.23-46-14.mp4

πŸš€ Quick Start

Best practices here: Best_Practices.md

Prompt examples here: Prompt_Examples.md

πŸ”§ For Python Users

  1. Clone the repo:

    git clone https://github.com/GlisseManTV/OWUI_File_Gen_Export.git
  2. Update env variables in config.json: These ones only concerns the MCPO part

    • PYTHONPATH: Path to your LLM_Export folder (e.g., C:\temp\LLM_Export) <=== MANDATORY no default value
    • FILE_EXPORT_BASE_URL: URL of your file export server (default is http://localhost:9003/files)
    • FILE_EXPORT_DIR: Directory where files will be saved (must match the server's export directory) (default is PYTHONPATH\output)
    • PERSISTENT_FILES: Set to true to keep files after download, false to 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
  3. Install dependencies:

    pip install openpyxl reportlab py7zr fastapi uvicorn python-multipart mcp
  4. 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"
  5. Use it in Open WebUI β€” your AI can now generate and export files in real time!


PYTHON EXAMPLE

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": []
		}
}

🐳 For Docker User (Recommended)

Use

docker pull ghcr.io/glissemantv/owui-file-export-server:latest
docker pull ghcr.io/glissemantv/owui-mcpo:latest

πŸ› οΈ DOCKER ENV VARIABLES

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 is http://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 volume
  • PERSISTENT_FILES: Set to true to keep files after download, false to 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

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.


DOCKER EXAMPLE

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

πŸ“¦ Supported File Types

  • βœ… .xlsx (Excel)
  • βœ… .pdf (PDF)
  • βœ… .csv (CSV)
  • βœ… .pptx (PowerPoint)
  • βœ… .zipn tar.gz and .7z (Archives)
  • βœ… Any other file type

πŸ“‚ Project Structure

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

πŸ“Œ Notes

  • File output paths must match between file_server and MCPO
  • Always use absolute paths for volume mounts

⚠️Some users are experiencing trouble with the MCPO server, please use this fix⚠️

{
  "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": []
		}
}

🌟 Why This Matters

This tool turns Open WebUI into a true productivity engine β€” where AI doesn’t just chat, but delivers usable, downloadable files.


πŸ“„ License

MIT License – Feel free to use, modify, and distribute.


πŸ“¬ Need help? Open an issue or start a discussion on GitHub!


🌟 Credits

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. πŸ™Œ



πŸš€ Quick Start for Development Versions

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

πŸ› οΈ DOCKER ENV VARIABLES

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 is http://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 volume
  • PERSISTENT_FILES: Set to true to keep files after download, false to 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

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.


DOCKER EXAMPLE

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

About

Create and export files easily from Open WebUI!

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • Python 100.0%