lampac-mcp
Allows the cabinet to use Google AI Studio (Gemini) as an LLM provider to generate candidate movie and series titles for AI-curated Lampa rows, with TMDB validation of the proposed titles.
Allows the cabinet to use a local Ollama server as an OpenAI-compatible LLM provider to propose titles for AI-curated Lampa rows, keeping generation on the local network.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
lampac-mcp (Alpha)
A client-neutral MCP server for Lampa behind Lampac. The rows of Lampa's main screen are curated by AI — from the web cabinet (an idea in plain words → an LLM proposes titles → TMDB confirms them) or by an MCP client — and Lampa shows them instead of its usual TMDB rows. The same service can stand in for CUB, Lampa's cloud service, so that Lampa's CUB requests stay on your network.

Screenshots are taken from a demo instance with invented rows and generated posters.
Rows are stored by this service as JSON. It does not write to CUB, Lampac catalog/card, or Lampa's own data.
What is included
MCP endpoint at
/mcpusing JSON-RPC over Streamable HTTP (2025-11-25).get_ai_rows— read the main-screen rows in display order.set_ai_row— create or replace one row:id,title,kind(movies,series,cartoons,anime),style(posterorwide16:9 cards), TMDB cards, optionalposition. Disabled by default (see below).delete_ai_row— remove a row. Disabled by default.inspect_title_sources— a read-only/lite/eventsrequest to a configured Lampac instance for one TMDB title. This is a snapshot, not a root-cause diagnosis or an automatic fix.get_tvctl_log— optionally read the latest reports fromEX.TvCtl; it sends no commands to a device.GET /api/collection— read-only feed for the Lampa plugin:rows, plus the first row astitle/itemsfor older plugin builds.GET /api/tmdb/<path>— read-only TMDB for TV front-ends (e.g. Glint): the server adds itsTMDB_API_KEY, so the key never reaches the TV; only list/title/season/person/search paths, answers cached for 30 minutes, CORS*./cub/*— local CUB stand-in (see below) andGET /api/cub-logwith the last requested paths.plugin/lampac-mcp.js— Lampa 3 plugin that builds the main screen from the rows./cabinet— web cabinet (Ukrainian UI): rows (order, edit, delete, regenerate from the stored idea), new rows from an idea, AI provider keys and models, MCP token, users, CUB log.
Related MCP server: stremio-mcp
Cabinet
Open http://<host>:8787/cabinet/. On first start there is one user admin with the password
admin (or CABINET_ADMIN_PASSWORD); until that default password is changed, the server refuses
everything except changing it. More users can be added in the cabinet.
AI providers: Gemini (Google AI Studio key), and through one OpenAI-compatible client: Groq, OpenRouter (with a free-only model filter), Mistral, a local Ollama (no key; nothing leaves your network) or any other server with
/chat/completions. Keys are stored indata/settings.json(mode 600) and never sent back to the browser; the model list comes from the provider. Only the idea and the proposed titles go to the provider. After a 429 the request is repeated once after the wait the provider asks for; output is capped (Groq:max_completion_tokens,reasoning_effort: lowfor gpt-oss models).Generation: the model proposes titles (original and English title, year, type); each one is looked up in TMDB with
TMDB_API_KEY. Titles TMDB does not know, namesakes from another year and titles without a translation inTMDB_LANGUAGEare dropped. Cards without images get them from TMDB when the cabinet shows the rows.MCP token: "Issue a new token" replaces
MCP_TOKENat once; the token is shown once, with theclaude mcp add --transport http …command.Hardening: sessions in
HttpOnly; SameSite=Strictcookies, same-origin check on writes, login attempts limited,Content-Security-Policywithout inline scripts, optionalCABINET_HOSTSallowlist against DNS rebinding. Keep the cabinet on a trusted network or behind your own login.
Run
Docker
docker build -t lampac-mcp .
docker run -d --name lampac-mcp --restart unless-stopped \
-e MCP_TOKEN=... -e MCP_ENABLE_WRITES=false \
-v "$PWD/data:/data" -p 8787:8787 lampac-mcpThe image listens on all interfaces inside the container (HOST=0.0.0.0) and keeps rows in /data.
Publish the port only where you need it.
Node
Requires Node.js 20 or later; only Node's built-in modules are used, there are no runtime dependencies.
cp .env.example .env # set MCP_TOKEN to a random value of at least 32 characters
set -a; . ./.env; set +a
npm startThe MCP URL is http://<host>:8787/mcp. The server rejects a present Origin that is not in
ALLOWED_ORIGINS and requires bearer authentication on /mcp. Keep it on a trusted network; do not expose it
through a public reverse proxy without HTTPS, the token and an extra login in front.
Tests
npm test starts temporary server processes on loopback with a temporary data file; it does not contact Lampac.
Enable row writes
Writes are off by default. Set MCP_ENABLE_WRITES=true only after configuring the MCP host to show a human
approval prompt for tool calls. set_ai_row and delete_ai_row also require this exact phrase:
I have reviewed and approve changing the AI rows.MCP itself does not enforce a confirmation UI; the host's approval prompt is part of the safety boundary. The phrase is an additional guard, not proof that a human approved the call.
Rows are saved to ./data/collections.json (/data/collections.json in Docker); set COLLECTIONS_FILE to
change it. A file from the first alpha (one { title, items } collection) is read as one wide row.
The feed is public to the Lampa plugin; do not put private notes in card fields.
Connect Lampa
The recommended way is through Lampac, so that Lampa reads the feed from its own origin (no CORS, no mixed
http/https): module EX.Mcp and the plugin from lampac-extra.
"EX.Mcp": { "collectionUrl": "http://<lampac-mcp host>:8787/api/collection" }The plugin replaces the main screen of Lampa's TMDB source with the rows; rows of Lampa itself and other plugins ("Continue watching", episode releases) follow at the bottom. Card details (poster or backdrop, title, overview, rating) come from Lampa's own TMDB source and are cached on the device for a day. Without rows, or when the feed is unreachable, the usual TMDB main screen is shown. Checked with Lampa 3.3.4 on Samsung Tizen 4.0 and Android TV.
Local CUB stand-in
Lampac's CubProxy forwards Lampa's /cub/red/<path> requests to {cub.scheme}://{cub.domain}/<path>.
Point it at this service to keep them local:
"cub": { "scheme": "http", "domain": "<lampac-mcp host>:8787/cub", "useproxy": false }Keep cub.api_key and cub.mirror as they are: other Lampac modules read them from the same section.
The stand-in answers 404 to API calls (Lampa then shows no comments, reactions or CUB collections), an empty
script for /cub/plugin/*, and accepts POSTs (logs, reactions) without storing them. GET /api/cub-log
lists the last 200 requested paths without query strings.
Some requests do not go through Lampac: Lampa 3.3.4 sends https://tmdb.cub.best/watch?id=… when a title
enters the history, ads requests and WebSocket connections straight from the device. Turn off what Lampa allows in
lampainit.js (lampa_settings.socket_use, account_use, disable_features.discuss and others) and block
the CUB domains in your DNS for the rest.
Read-only diagnostics
Set LAMPAC_URL to the Lampac base URL, then call inspect_title_sources with the TMDB id, movie or tv,
and the title. Optional fields: original title/language, year, IMDb id, is_anime.
get_tvctl_log needs LAMPAC_ROOT_PASSWORD from your secret manager. It calls the read-only /tvctl/log
route and returns at most 200 lines. Do not put the password in source control, tool arguments or logs.
Configuration
Variable | Default | Purpose |
| none | Required bearer token; at least 32 characters |
| none | Comma-separated exact origins allowed on |
|
| Listen address |
|
| Listen port |
| none | Lampac base URL for source inspection |
| none | Lampac root password for optional read-only EX.TvCtl log access |
|
| Enables |
|
| JSON persistence path; |
| none | TMDB key for row generation and card images in the cabinet |
|
| TMDB API base (Lampac's TMDB proxy works) |
|
| Poster base for the cabinet |
|
| Language of titles and the translation check |
| none ( | Password of the first user on first start |
| none (any) | Comma-separated |
Protocol and safety notes
The endpoint implements initialization,
tools/list,tools/call,ping, and notifications needed by the 2025-11-25 Streamable HTTP flow. GET on/mcpreturns 405; there is no server-to-client SSE stream.Originis checked when present, as required by the MCP transport specification. Authentication is bearer-token based.Use trusted MCP clients. Tool metadata and server-side phrases cannot replace the host's approval UI.
Support
If this project is useful to you, you can support its development with a crypto donation:
Network | Address |
Bitcoin (BTC) |
|
Ethereum (ETH) |
|
Solana (SOL) |
|
Send each coin only on the network named in its row: a transfer made on another network cannot be recovered.
License
GNU Affero General Public License v3.0 only. See LICENSE.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
Related MCP Connectors
MCP server for interacting with the Supabase platform
Remote MCP server for Web3TV creators — manage your account over MCP.
Host any HTTP API as a standard MCP server; auto-distribute to 12+ mainstream agent platforms.
An authenticated remote MCP server for user-owned devices and one-shot capability invocation.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceSelf-hosted MCP proxy and aggregation platform. Register multiple upstream MCP servers and expose them through a single unified endpoint with namespace routing, multi-transport support (HTTP/SSE, stdio, OpenAPI→MCP), per-tool overrides, and a web admin UI.18MIT
- AlicenseBqualityBmaintenanceUnified MCP server for Stremio enabling search, metadata, catalogs, and stream listings via Stremio's addon APIs, plus Android TV playback control over adb.25537 PyPI9MIT
- FlicenseNot gradedqualityAmaintenanceEnables MCP clients to search and manage playlists, library, catalog, discovery, playback, and the Up Next queue across macOS, Windows, and Linux.-
- FlicenseNot gradedqualityAmaintenanceEnables LLMs and MCP clients to discover, add, configure, enable, disable, and proxy other MCP servers, aggregating their tools into a unified hub with persistent configurations.-