GenFilesMCP is a Model Context Protocol (MCP) server that generates PowerPoint, Excel, Word, or Markdown files from user requests and chat context. This MCP executes Python templates to produce files and uploads them to an Open Web UI (OWUI) endpoint. Additionally, it supports analyzing and reviewing existing Word documents by extracting their structure and adding comments for corrections, grammar suggestions, or idea enhancements.
- Features
- Status
- Prerequisites
- Installation
- Configuration
- Setup for Document Review Feature
- Usage Examples
- Star History
- File Generation: Creates files in multiple formats (PowerPoint, Excel, Word, Markdown) from user requests.
- FastMCP Server: Receives and processes generation requests via a FastMCP server.
- Python Templates: Uses customizable Python templates to generate files with specific structures.
- OWUI Integration: Automatically uploads generated files to Open Web UI's file API (
/api/v1/files/). - Document Review (Experimental): Analyzes existing Word documents and adds structured comments for corrections, grammar suggestions, or idea enhancements.
This is a Minimal Viable Product (MVP). It works for generating and uploading files but still needs improvements in:
- Security and input sanitization
- Template validation
- Logging and error handling
Use with caution: This MCP executes code and should be run in a controlled environment (Docker recommended). Avoid exposing it on public networks.
- Docker installed on your system
- Open Web UI instance running (v0.6.31 or later recommended for native MCP support)
- JWT Token from your Open Web UI admin settings
Pull the pre-built Docker image from GitHub Container Registry:
docker pull ghcr.io/baronco/genfilesmcp:v0.1.0Run the container:
docker run -d --restart unless-stopped -p YOUR_PORT:YOUR_PORT -e OWUI_URL="http://host.docker.internal:3000" -e JWT_SECRET="YOUR_JWT_SECRET" -e PORT=YOUR_PORT --name gen_files_mcp gen_files_mcp ghcr.io/baronco/genfilesmcp:v0.1.0Alternatively, use the :latest tag for the most recent version:
docker run -d --restart unless-stopped -p YOUR_PORT:YOUR_PORT -e OWUI_URL="http://host.docker.internal:3000" -e JWT_SECRET="YOUR_JWT_SECRET" -e PORT=YOUR_PORT --name gen_files_mcp gen_files_mcp ghcr.io/baronco/genfilesmcp:latestIf you need to build the image yourself:
- Clone the repository:
git clone https://github.com/Baronco/GenFilesMCP.git
cd GenFilesMCP- Build the Docker image:
docker build -t genfilesmcp .- Run the container:
docker run -d --restart unless-stopped \
-p YOUR_PORT:YOUR_PORT \
-e OWUI_URL="http://host.docker.internal:3000" \
-e JWT_SECRET="YOUR_JWT_SECRET" \
-e PORT=YOUR_PORT \
--name gen_files_mcp \
genfilesmcpThe MCP server requires the following environment variables:
| Variable | Description | Example |
|---|---|---|
OWUI_URL |
URL of your Open Web UI instance | http://host.docker.internal:3000 |
JWT_SECRET |
JWT token from OWUI for authentication | See Getting Your JWT Token |
PORT |
Port where the MCP server will listen | 8015 |
Important: From Open Web UI version v0.6.31 onwards, the platform natively supports http streamable type MCPs. This means you do not need MCPO to use this server.
For Open Web UI v0.6.31+: Configure the MCP directly in your Open Web UI "External Tools" settings. Change the type “OpenApi” to “MCP Streamable HTTP”
For earlier versions or if using MCPO: Add this configuration to your MCPO config file:
{
"mcpServers": {
"GenFilesMCP": {
"type": "streamable_http",
"url": "http://host.docker.internal:YOUR_PORT/mcp/"
}
}
}Replace YOUR_PORT with the port you configured (e.g., 8015).
The JWT token can be found in your Open Web UI Admin settings:
- Go to Admin Panel
- Navigate to Settings
- Open the Account module
- Copy your JWT token
The document review feature is experimental and requires additional setup:
- Upload a
.docxfile to your Open Web UI chat context - Create a custom tool in Open Web UI to retrieve file metadata
- In Open Web UI, go to Workspace > Tools > (+) Create
- Paste the following code:
import os
import requests
from datetime import datetime
from pydantic import BaseModel, Field
class Tools:
def __init__(self):
pass
def get_files_metadata(self, __files__: dict = {}) -> dict:
"""
Get files metadata
"""
chat_current_files = {"files": []}
if __files__ is not None:
for f in __files__:
chat_current_files["files"].append({"id": f["id"], "name": f["name"]})
return chat_current_files
else:
message = {
"message": "There are no documents uploaded in the current chat."
}
return message- Save the tool
For optimal results, create a custom agent in Open Web UI:
- Copy the system prompt from
example/systemprompt.md - Create a new agent called FileGenAgent
- Use this system prompt for the agent
- Tested successfully with GPT-5 Thinking mini
Example files: You can find the prompt and generated result in the
examplefolder:History_of_Neural_Nets_Summary_69d1751b-577b-4329-beca-ac16db7acdbd.docx
This file was generated using the GenFiles MCP server and GPT-5 mini
The review feature allows the agent to analyze uploaded documents and add structured comments for improvements.
Workflow:
- User uploads
History_of_Neural_Nets_Summary.docxto the chat - User requests a review with comments for corrections, grammar suggestions, and idea enhancements
- Agent calls the
get_files_metadatacustom tool to retrieve file ID and name - Agent uses the
full_context_docxMCP function to analyze the document structure - Agent calls the
review_docxMCP function to add comments to specific elements
Result:
Example files: Find the reviewed document in the
examplefolder:History_of_Neural_Nets_Summary_reviewed_a35adcc5-e338-47c6-a0b0-2c21602b0777.docx
Generated using the GenFiles MCP server and GPT-5 mini
The review functionality preserves the original formatting while adding structured comments