HiggsHole
An MCP server that enables local AI agents to generate images and videos through the OpenRouter API, manage a browsable media library, and track generation costs.
README
HiggsHole
A self-hosted AI image and video generation console with a browsable media library, backed by the OpenRouter API and exposed to local AI agents over MCP.
Status: implemented. Web UI, REST API, MCP server and systemd unit are in place and covered by an offline test suite. See the design specification.
What it does
- Text-to-image, text-to-video, image-to-image and image-to-video generation through a single OpenRouter API key
- Model picker built from OpenRouter's live capability catalogue — no hardcoded model list, so new models appear without a code change
- Generated media stored on local disk with metadata embedded in the files themselves, browsable and playable in the web UI
- Any result can be fed back in as a reference for an edit or improvement pass, with the lineage recorded
- An MCP server (stdio) exposing the same functionality to locally running AI agents
- Spend controls: provider-enforced key limits, a local ledger of actual costs, and a daily cap
What it deliberately does not do
- No prompt rewriting — prompts are passed to the provider verbatim
- No authentication — intended for a trusted LAN
- No multi-user support
- No batch generation —
nis fixed at 1 so every generation has its own cost record
Quick start
uv sync
uv run pytest -q # the whole suite, offline and free
uv run higgshole # serves http://127.0.0.1:8077
The suite makes no network requests and costs nothing: a socket-blocking
fixture enforces that rather than trusting convention. The single billable test
is opt-in behind HIGGSHOLE_LIVE_TESTS and skipped by default.
MCP tools
Eleven tools, each a thin translation of one REST call — see docs/mcp.md for client registration:
| Tool | Behaviour |
|---|---|
list_models |
Image and video models with capability constraints |
generate_image |
Synchronous; returns the finished asset |
generate_video |
Returns a job ID immediately — does not block |
get_job |
Status, with optional bounded long-polling |
upload_asset |
Ingests a local file, returning a reusable asset ID |
list_media |
Browse with filters |
get_media |
Full metadata for one item, including lineage |
delete_media |
Removes a generation, its files and its thumbnails |
list_projects |
Enumerate projects |
create_project |
Create a project |
get_budget |
Provider-authoritative credit plus local cap status |
Every asset-returning tool provides both the local filesystem path and the HTTP
URL, since agents run on the same host. Costs are strings or null — never 0
to represent an unknown cost.
Design notes
The specification records several verified corrections to OpenRouter's published documentation, including the true job-status enumeration, the unreliability of client-side video cost estimation, and the ephemerality of result URLs. These were established against the live API and its OpenAPI specification rather than the prose docs, which contradict it in places.
Requirements
- Python 3.12+
ffmpeg/ffprobe- An OpenRouter API key
Runs anywhere Python and ffmpeg run. A systemd unit is provided for boot-time startup on Linux — see docs/deployment.md — but nothing in the architecture depends on it.
Configuration
Everything is configured through environment variables, readable from a .env
file — see .env.example for the full list with defaults. By
default the app writes under ${XDG_DATA_HOME:-~/.local/share}/higgshole and
${XDG_STATE_HOME:-~/.local/state}/higgshole and binds to 127.0.0.1, so a
fresh clone runs unprivileged with no setup.
Exposing it to your local network is a deliberate act: change
HIGGSHOLE_BIND_HOST. There is no authentication, by design.
If you set a daily spend cap, also set a credit limit on the OpenRouter key itself. That limit is enforced provider-side and is the only guard that cannot be defeated by a bug in this application.
Licence
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。
mcp-server-qdrant
这个仓库展示了如何为向量搜索引擎 Qdrant 创建一个 MCP (Managed Control Plane) 服务器的示例。