HiveMCP
MCP server that generates and edits PowerPoint, Word, and Excel files for OpenWebUI, exposing both MCP and OpenAPI interfaces for document creation and editing.
README
HiveMCP
Generates and edits PowerPoint, Word and Excel files for OpenWebUI. Runs as a container, exposed both as an MCP Streamable HTTP server and as an OpenAPI tool server from the same FastAPI app.
Why both: OpenWebUI renders inline iframes only for tool results carrying
Content-Disposition: inline, and that path exists for OpenAPI tool servers but not for
the native MCP surface. MCP gives protocol compatibility, OpenAPI gives the configuration
GUI. See docs/IMPLEMENTATION_PLAN.md for the full
reasoning and the milestone plan.
Status
| Milestone | Scope | State |
|---|---|---|
| M0 | Integration spikes (Files-API ownership, Rich-UI render, OWUI version) | offen |
| M1 | Skeleton: config, auth, health, download, Dockerfile | fertig |
| M2 | Render core: pptx / docx / xlsx from a spec | fertig |
| M3 | MCP + OpenAPI surfaces, OpenWebUI file delivery | fertig |
| M4 | Templates: upload, inspect, fill | offen |
| M5 | Configuration GUI as an iframe | offen |
| M6 | Editing files uploaded to the chat | offen |
| M7 | Skill, K8s manifests, hardening | offen |
Quick start
uv venv && source .venv/bin/activate
uv pip install -e ".[dev]"
cp .env.example .env
pytest
python -m hivemcp # http://localhost:8080/healthz
Docker
make up # build, start, wait for healthy
make smoke # verify it actually works
make logs
make down
make owui additionally starts an OpenWebUI instance on http://localhost:3000, which
is what the M0 integration spikes need.
Without make:
docker compose -f deploy/docker-compose.yml up --build -d --wait
./deploy/smoke.sh
Two things the compose file does deliberately:
- Named volume, not a bind mount. The container runs as uid 10001; a host directory
would arrive owned by your user and every write would fail with
Permission denied. HIVE_SIGNING_KEYis fixed. Left unset, each start generates a new key and every download link minted before the restart stops working.
Connecting OpenWebUI
Both surfaces are added under Admin Settings → Integrations → +. Adding MCP servers is admin-only; regular users may only add OpenAPI servers.
| MCP | OpenAPI | |
|---|---|---|
| Type | MCP (Streamable HTTP) |
OpenAPI |
| URL | http://hivemcp:8080/mcp |
http://hivemcp:8080 |
| Auth | None in dev, otherwise Bearer |
same |
Use http://host.docker.internal:8080 instead when OpenWebUI runs in a container and
HiveMCP does not. Set Auth to None unless you configured HIVE_AUTH_TOKEN:
choosing Bearer without filling in the key sends an empty Authorization header, which
most servers reject outright.
Paste this into the connection's Headers field so tool calls carry the caller's identity. OpenWebUI expands the tokens server-side:
{
"X-Hive-User-Id": "{{USER_ID}}",
"X-Hive-User-Email": "{{USER_EMAIL}}",
"X-Hive-Groups": "{{USER_GROUPS}}",
"X-Hive-Chat-Id": "{{CHAT_ID}}"
}
Both can be registered at once. MCP gives protocol compatibility with other clients; OpenAPI is the surface that can return Rich UI embeds, which the configuration GUI needs in M5.
Layout
hivemcp/
app.py FastAPI factory: health, download, both surfaces
config.py HIVE_* settings; refuses to start unauthenticated in prod
auth.py bearer check, identity headers, HMAC-signed UI links
surfaces/
mcp_server.py MCP Streamable HTTP, stateless, mounted at /mcp
openapi_tools.py /tools/* with explicit operation ids
core/
service.py shared logic: validation, render semaphore, delivery
models.py DeckSpec / DocSpec / SheetSpec / RenderOptions
delivery.py signed URL, OpenWebUI upload, composite with fallback
render/ pptx.py, docx.py, xlsx.py, theme.py
files/owui_client.py OpenWebUI Files API
files/workdir.py artifact store on the PVC, with TTL sweep
deploy/ Dockerfile, docker-compose.yml, smoke.sh
docs/IMPLEMENTATION_PLAN.md
tests/
The renderers know nothing about FastAPI or MCP. Both surfaces are thin adapters over
core/, which keeps them from drifting apart and makes the interesting logic testable
without HTTP.
Design notes worth knowing
Specs are strict. Every model sets extra="forbid". A model that invents a field gets
a validation error it can correct on the next turn rather than a silently dropped value
and a wrong-looking document.
Untrusted text never becomes an Excel formula. Cell values starting with =, +, -
or @ are prefixed with ' unless the column is explicitly typed formula. Spreadsheet
content originates from model output and uploaded documents, so this is the formula
injection boundary.
Fonts are a name, not a file. OOXML stores only the font name; if the reader's machine lacks it, their viewer substitutes silently. Fonts outside the set that ships with Office produce a warning on the render result.
Page counts are estimates. Word paginates at open time using the installed fonts and
printer driver, so no library can know the real count. The result field is called
page_estimate for that reason.
Errors name their location. A failure on slide 7 says so, because the model needs to know where to fix the spec, not just what was wrong.
Configuration
See .env.example. Two settings matter more than they look:
HIVE_SIGNING_KEY— must be set explicitly when running more than one replica. Each pod otherwise generates its own key at start-up, and download links break whenever a request lands on a different pod than the one that signed the link.HIVE_ENVIRONMENT=prod— makes the service refuse to start without an auth token and OpenWebUI credentials, rather than coming up silently unauthenticated.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。