From 685c02ed81e71a0d2399f5e493c3300aa388c91e Mon Sep 17 00:00:00 2001 From: Dasemu Date: Mon, 19 Oct 2026 04:57:53 +0200 Subject: [PATCH] chore: drop Zenvairo branding ahead of repo transfer Removes the org name/URLs from docs, deploy configs, package scope and internal service/test strings, and drops the stale shared-LXC nginx snapshot (deploy/default.conf.lxc210) that also exposed sibling services. Co-Authored-By: Claude Sonnet 5 --- .env.example | 2 +- .gitignore | 4 +- CLAUDE.md | 2 +- README.md | 2 +- deploy/default.conf.lxc210 | 148 -------------------------- deploy/gemini-veo-mcp.env.template | 2 +- deploy/nginx-location.conf | 14 +-- docs/deployment.md | 4 +- docs/media-delivery.md | 4 +- package-lock.json | 4 +- package.json | 2 +- scripts/make_overlay_card.py | 2 +- src/compositor.ts | 2 +- src/index.ts | 4 +- src/public-media.ts | 2 +- src/tools.ts | 4 +- test/integration-compose-real.test.ts | 4 +- 17 files changed, 29 insertions(+), 177 deletions(-) delete mode 100644 deploy/default.conf.lxc210 diff --git a/.env.example b/.env.example index 6f3b76f..52c61ef 100644 --- a/.env.example +++ b/.env.example @@ -2,7 +2,7 @@ GEMINI_API_KEY= MCP_SERVER_TOKEN=replace-with-a-long-random-secret HOST=127.0.0.1 PORT=8087 -PUBLIC_BASE_URL=https://mcp.zenvairo.es/zenvairogoogle +PUBLIC_BASE_URL=https://mcp.example.com/media-mcp PUBLIC_MEDIA_SIGNING_SECRET=replace-with-at-least-32-random-characters PUBLIC_MEDIA_URL_TTL_SECONDS=86400 MEDIA_DIR=/opt/gemini-veo-mcp/media diff --git a/.gitignore b/.gitignore index fa325e7..921cd29 100644 --- a/.gitignore +++ b/.gitignore @@ -4,8 +4,8 @@ dist/ deploy/.basic-password deploy/.server-token deploy/gemini-veo-mcp.env -deploy/zenvairogoogle.conf -deploy/zenvairogoogle.htpasswd +deploy/media-mcp.conf +deploy/media-mcp.htpasswd media/* !media/.gitkeep gemini-veo-mcp.env diff --git a/CLAUDE.md b/CLAUDE.md index 13778ec..2cda951 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -25,7 +25,7 @@ MCP tool handlers in `src/tools.ts` dispatch to `src/provider.ts` (Gemini/Veo AP - No `development` branch exists yet; branch from `main` until one is created. ## Deployment -Deployed to an Alpine LXC container (OpenRC service `gemini-veo-mcp`, bound to `127.0.0.1:8087`, nginx reverse-proxying `/zenvairogoogle/`). See `README.md` for the update/restart commands and `docs/deployment.md` for full details. +Deployed to an Alpine LXC container (OpenRC service `gemini-veo-mcp`, bound to `127.0.0.1:8087`, nginx reverse-proxying `/media-mcp/`). See `README.md` for the update/restart commands and `docs/deployment.md` for full details. ## Gotchas - Veo 3.1 always generates audio; `with_audio=false` is rejected explicitly. diff --git a/README.md b/README.md index c5be0c8..4f0e274 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Zenvairo Media Generator MCP +# Gemini Veo Media MCP Remote, stateless (Streamable HTTP) MCP server for image generation with Gemini and video generation with Veo 3.1. It follows the `submit + poll` contract: `generate_image`/`generate_video` return a UUID immediately and `query_tasks` delivers the final result. diff --git a/deploy/default.conf.lxc210 b/deploy/default.conf.lxc210 deleted file mode 100644 index 6f9b876..0000000 --- a/deploy/default.conf.lxc210 +++ /dev/null @@ -1,148 +0,0 @@ -server { - listen 80 default_server; - server_name _; - - location /zenvairogit/ { - auth_basic "ZenvairoGit MCP"; - auth_basic_user_file /etc/nginx/htpasswd/zenvairogit; - - proxy_pass http://127.0.0.1:8081/; - proxy_http_version 1.1; - proxy_set_header Host 127.0.0.1; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $scheme; - proxy_set_header Origin ""; - - proxy_buffering off; - proxy_cache off; - proxy_read_timeout 300s; - proxy_send_timeout 300s; - - proxy_set_header Mcp-Protocol-Version $http_mcp_protocol_version; - proxy_set_header Mcp-Session-Id $http_mcp_session_id; - } - - location /zenvairocloud/ { - auth_basic "ZenvairoCloud MCP"; - auth_basic_user_file /etc/nginx/htpasswd/zenvairocloud; - - proxy_pass http://127.0.0.1:8082/; - proxy_http_version 1.1; - proxy_set_header Host 127.0.0.1:8082; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $scheme; - proxy_set_header Origin ""; - - proxy_buffering off; - proxy_cache off; - proxy_read_timeout 300s; - proxy_send_timeout 300s; - - proxy_set_header Mcp-Session-Id $http_mcp_session_id; - } - - location /zenvairoanalytics/ { - auth_basic "ZenvairoAnalytics MCP"; - auth_basic_user_file /etc/nginx/htpasswd/zenvairoanalytics; - - proxy_pass http://127.0.0.1:8083/; - proxy_http_version 1.1; - proxy_set_header Host 127.0.0.1:8083; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $scheme; - proxy_set_header Origin ""; - - proxy_buffering off; - proxy_cache off; - proxy_read_timeout 300s; - proxy_send_timeout 300s; - - proxy_set_header Mcp-Session-Id $http_mcp_session_id; - } - - location /zenvairomail/ { - auth_basic "ZenvairoMail MCP"; - auth_basic_user_file /etc/nginx/htpasswd/zenvairomail; - - proxy_pass http://127.0.0.1:8084/; - proxy_http_version 1.1; - proxy_set_header Host 127.0.0.1:8084; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $scheme; - proxy_set_header Origin ""; - - proxy_buffering off; - proxy_cache off; - proxy_read_timeout 300s; - proxy_send_timeout 300s; - - proxy_set_header Mcp-Session-Id $http_mcp_session_id; - } - - location /zenvairocrm/ { - auth_basic "ZenvairoCRM MCP"; - auth_basic_user_file /etc/nginx/htpasswd/zenvairocrm; - - proxy_pass http://127.0.0.1:8085/; - proxy_http_version 1.1; - proxy_set_header Host 127.0.0.1:8085; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $scheme; - proxy_set_header Origin ""; - - proxy_buffering off; - proxy_cache off; - proxy_read_timeout 300s; - proxy_send_timeout 300s; - - proxy_set_header Mcp-Session-Id $http_mcp_session_id; - } - - # Archivos subidos con upload_media: SIN Basic Auth, para que Meta pueda - # descargarlos al publicar (nombre de archivo aleatorio tipo UUID). - location /zenvairosocial/media/ { - proxy_pass http://127.0.0.1:8086/media/; - proxy_http_version 1.1; - proxy_set_header Host 127.0.0.1:8086; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $scheme; - - proxy_buffering off; - proxy_cache off; - proxy_read_timeout 300s; - proxy_send_timeout 300s; - } - - location /zenvairosocial/ { - auth_basic "ZenvairoSocial MCP"; - auth_basic_user_file /etc/nginx/htpasswd/zenvairosocial; - - proxy_pass http://127.0.0.1:8086/; - proxy_http_version 1.1; - proxy_set_header Host 127.0.0.1:8086; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $scheme; - proxy_set_header Origin ""; - - proxy_buffering off; - proxy_cache off; - proxy_read_timeout 300s; - proxy_send_timeout 300s; - - proxy_set_header Mcp-Protocol-Version $http_mcp_protocol_version; - proxy_set_header Mcp-Session-Id $http_mcp_session_id; - } - - include /etc/nginx/http.d/zenvairogoogle.inc; - - location = / { - return 404; - } -} diff --git a/deploy/gemini-veo-mcp.env.template b/deploy/gemini-veo-mcp.env.template index 098ae4e..fb35731 100644 --- a/deploy/gemini-veo-mcp.env.template +++ b/deploy/gemini-veo-mcp.env.template @@ -2,7 +2,7 @@ GEMINI_API_KEY= MCP_SERVER_TOKEN=__MCP_SERVER_TOKEN__ HOST=127.0.0.1 PORT=8087 -PUBLIC_BASE_URL=https://mcp.zenvairo.es/zenvairogoogle +PUBLIC_BASE_URL=https://mcp.example.com/media-mcp PUBLIC_MEDIA_SIGNING_SECRET=replace-with-at-least-32-random-characters PUBLIC_MEDIA_URL_TTL_SECONDS=86400 MEDIA_DIR=/opt/gemini-veo-mcp/media diff --git a/deploy/nginx-location.conf b/deploy/nginx-location.conf index 139ad4c..1553bda 100644 --- a/deploy/nginx-location.conf +++ b/deploy/nginx-location.conf @@ -1,5 +1,5 @@ # Public only when the application validates the expiring HMAC signature. - location /zenvairogoogle/public-media/ { + location /media-mcp/public-media/ { auth_basic off; proxy_pass http://127.0.0.1:8087/public-media/; @@ -14,9 +14,9 @@ proxy_read_timeout 600s; } - location /zenvairogoogle/media/ { - auth_basic "Zenvairo Google Media MCP"; - auth_basic_user_file /etc/nginx/htpasswd/zenvairogoogle; + location /media-mcp/media/ { + auth_basic "Media MCP"; + auth_basic_user_file /etc/nginx/htpasswd/media-mcp; proxy_pass http://127.0.0.1:8087/media/; proxy_http_version 1.1; @@ -32,9 +32,9 @@ proxy_send_timeout 600s; } - location /zenvairogoogle/ { - auth_basic "Zenvairo Google Media MCP"; - auth_basic_user_file /etc/nginx/htpasswd/zenvairogoogle; + location /media-mcp/ { + auth_basic "Media MCP"; + auth_basic_user_file /etc/nginx/htpasswd/media-mcp; client_max_body_size 40m; proxy_pass http://127.0.0.1:8087/; diff --git a/docs/deployment.md b/docs/deployment.md index 0a065fe..90b4e61 100644 --- a/docs/deployment.md +++ b/docs/deployment.md @@ -1,6 +1,6 @@ # Deployment on LXC 210 (Alpine/OpenRC) -The operational install lives in `/opt/gemini-veo-mcp`, runs as `mcp:mcp`, binds to `127.0.0.1:8087` and is supervised by OpenRC (`gemini-veo-mcp`). nginx protects `/zenvairogoogle/` with Basic auth and leaves only `/zenvairogoogle/public-media/` public; the application requires a valid, expiring HMAC signature on that route. +The operational install lives in `/opt/gemini-veo-mcp`, runs as `mcp:mcp`, binds to `127.0.0.1:8087` and is supervised by OpenRC (`gemini-veo-mcp`). nginx protects `/media-mcp/` with Basic auth and leaves only `/media-mcp/public-media/` public; the application requires a valid, expiring HMAC signature on that route. To add the API key: @@ -22,7 +22,7 @@ Reference for the deployment files in `deploy/`: - `gemini-veo-mcp.openrc`: OpenRC service. - `gemini-veo-mcp.env.template`: environment variable template (no real secrets). -- `default.conf.lxc210`, `nginx-location.conf`: nginx configuration. +- `nginx-location.conf`: nginx configuration. ## Paid integration test diff --git a/docs/media-delivery.md b/docs/media-delivery.md index 5325bfc..758b828 100644 --- a/docs/media-delivery.md +++ b/docs/media-delivery.md @@ -2,9 +2,9 @@ `query_tasks` uses `include_base64=false` by default so binaries do not accidentally enter the LLM context. Each output returns `index`, `mimeType`, `sizeBytes`, `sha256`, the protected `downloadUrl` and a signed `publicUrl` that Meta can download without credentials. Base64 remains available explicitly with `include_base64=true` when the job's aggregate binary size is at most **25 MiB exactly (26,214,400 bytes)**. -`publicUrl` uses the same domain under `/zenvairogoogle/public-media/...`, carries an HMAC signature bound to the file name and expiry, and lasts 24 hours by default (`PUBLIC_MEDIA_URL_TTL_SECONDS=86400`). The route accepts neither Basic nor Bearer because Meta must read it directly; without a valid signature it responds 403 and an expired signature responds 410. Each later `query_tasks` call issues a fresh URL while the result is still retained. +`publicUrl` uses the same domain under `/media-mcp/public-media/...`, carries an HMAC signature bound to the file name and expiry, and lasts 24 hours by default (`PUBLIC_MEDIA_URL_TTL_SECONDS=86400`). The route accepts neither Basic nor Bearer because Meta must read it directly; without a valid signature it responds 403 and an expired signature responds 410. Each later `query_tasks` call issues a fresh URL while the result is still retained. -The `downloadUrl` under `/zenvairogoogle/media/...` stays protected by the connector's HTTP Basic credentials. A Google, GCS or third-party CDN URL is never returned. The HMAC key (`PUBLIC_MEDIA_SIGNING_SECRET`, minimum 32 characters) exists only on the server and never appears in schemas, logs or responses. +The `downloadUrl` under `/media-mcp/media/...` stays protected by the connector's HTTP Basic credentials. A Google, GCS or third-party CDN URL is never returned. The HMAC key (`PUBLIC_MEDIA_SIGNING_SECRET`, minimum 32 characters) exists only on the server and never appears in schemas, logs or responses. To publish without copying or moving base64, pass `outputs[].publicUrl` directly to SocialMCP's `publish_post` as `imageUrl`, `videoUrl` or `media[].url`. Do not call `upload_media` first. diff --git a/package-lock.json b/package-lock.json index 0ce0db3..f42633a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { - "name": "@zenvairo/gemini-veo-mcp", + "name": "gemini-veo-mcp", "version": "1.1.0", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "@zenvairo/gemini-veo-mcp", + "name": "gemini-veo-mcp", "version": "1.1.0", "dependencies": { "@google/genai": "2.23.0", diff --git a/package.json b/package.json index 529136d..a4d64af 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "@zenvairo/gemini-veo-mcp", + "name": "gemini-veo-mcp", "version": "1.1.0", "private": true, "description": "Remote Streamable HTTP MCP server for Google Gemini image and Veo video generation", diff --git a/scripts/make_overlay_card.py b/scripts/make_overlay_card.py index 954268a..b8896eb 100755 --- a/scripts/make_overlay_card.py +++ b/scripts/make_overlay_card.py @@ -2,7 +2,7 @@ import sys, json from PIL import Image, ImageDraw, ImageFont, ImageFilter W, H = 720, 1280 -POPPINS_BOLD = "/usr/share/fonts/zenvairo/Poppins-Bold.ttf" +POPPINS_BOLD = "/usr/share/fonts/truetype/poppins/Poppins-Bold.ttf" NAVY = (10, 22, 48) CYAN = (45, 224, 234) WHITE = (255, 255, 255) diff --git a/src/compositor.ts b/src/compositor.ts index 3fbfb74..17e8b1e 100644 --- a/src/compositor.ts +++ b/src/compositor.ts @@ -19,7 +19,7 @@ export async function composeVideoOverlay( baseOutput: StoredOutput, overlays: VideoOverlay[], ): Promise { - const workDir = await mkdtemp(path.join(os.tmpdir(), "zenvairo-compose-")); + const workDir = await mkdtemp(path.join(os.tmpdir(), "media-compose-")); const temporaryOutput = path.join(mediaDir, `${generationId}-0.download`); try { const metadata = await probeVideo(baseOutput.path); diff --git a/src/index.ts b/src/index.ts index f760de1..1ec5307 100644 --- a/src/index.ts +++ b/src/index.ts @@ -25,7 +25,7 @@ const orphanCleanupInterval = setInterval(() => void orphanCleanup().catch((erro orphanCleanupInterval.unref(); function buildServer(): McpServer { - const server = new McpServer({ name: "zenvairo-google-media", version: "1.0.0" }); + const server = new McpServer({ name: "gemini-veo-media", version: "1.0.0" }); registerTools(server, jobs); return server; } @@ -61,7 +61,7 @@ app.get("/public-media/:filename", async (req, res) => { app.use(authenticate); -app.get("/health", (_req, res) => res.json({ ok: true, service: "zenvairo-google-media", googleCredentialsConfigured: Boolean(process.env.GEMINI_API_KEY), publicMediaSigningConfigured: publicMediaSigningConfigured() })); +app.get("/health", (_req, res) => res.json({ ok: true, service: "gemini-veo-media", googleCredentialsConfigured: Boolean(process.env.GEMINI_API_KEY), publicMediaSigningConfigured: publicMediaSigningConfigured() })); app.get("/media/:filename", (req, res) => { if (!/^[0-9a-f-]{36}-\d+\.(png|jpg|mp4)$/.test(req.params.filename)) return res.status(404).json({ error: "not_found" }); return res.sendFile(req.params.filename, { root: mediaDir, dotfiles: "deny", maxAge: 0 }, (error) => { diff --git a/src/public-media.ts b/src/public-media.ts index caa518b..b79b50e 100644 --- a/src/public-media.ts +++ b/src/public-media.ts @@ -64,7 +64,7 @@ export function validatePublicMediaSignature( function sign(filename: string, expires: number, secret: string): string { return createHmac("sha256", secret) - .update(`zenvairo-public-media-v1\n${filename}\n${expires}`, "utf8") + .update(`media-mcp-public-media-v1\n${filename}\n${expires}`, "utf8") .digest("base64url"); } diff --git a/src/tools.ts b/src/tools.ts index 30adbd9..cfe92a8 100644 --- a/src/tools.ts +++ b/src/tools.ts @@ -33,7 +33,7 @@ export function registerTools(server: McpServer, jobs: JobManager): void { server.tool("who_am_i", "List available Google image/video models, accepted arguments and current cost estimates.", { taskTraceId: taskTraceIdSchema, }, async ({ taskTraceId }) => jsonResult({ - service: "Zenvairo Google Media MCP", + service: "Gemini Veo Media MCP", taskTraceId, backend: "Gemini Developer API", authentication: { googleCredentialsConfigured: Boolean(process.env.GEMINI_API_KEY), credentialsExposed: false }, @@ -133,7 +133,7 @@ export function registerTools(server: McpServer, jobs: JobManager): void { if (job.status === "COMPLETED" && job.outputs) { const allPresent = (await Promise.all(job.outputs.map(outputExists))).every(Boolean); if (!allPresent) return jsonResult({ ...payload, status: "FAILED", error: { code: "MEDIA_EXPIRED", message: "Generated media is no longer available", retryable: false } }, true); - payload.outputs = await outputPayload(job.outputs, process.env.PUBLIC_BASE_URL || "https://mcp.zenvairo.es/zenvairogoogle", include_base64); + payload.outputs = await outputPayload(job.outputs, process.env.PUBLIC_BASE_URL || "http://127.0.0.1:8087", include_base64); } return jsonResult(payload, job.status === "FAILED"); }); diff --git a/test/integration-compose-real.test.ts b/test/integration-compose-real.test.ts index 7d435c0..3a47fa2 100644 --- a/test/integration-compose-real.test.ts +++ b/test/integration-compose-real.test.ts @@ -37,7 +37,7 @@ test("real Veo generation -> local overlay composition -> signed public URL", { base_generation_id: submitted.generationId, taskTraceId, overlays: [ - { kicker: "ZENVAIRO", text: "La automatización no debería sentirse genérica", style: "normal", start_time: 0.6, duration: 2.5 }, + { kicker: "DEMO", text: "La automatización no debería sentirse genérica", style: "normal", start_time: 0.6, duration: 2.5 }, { kicker: "ACTÚA AHORA", text: "Convierte procesos en ventaja", style: "cta", start_time: 4.8, duration: 2.5 }, ], } })); @@ -46,7 +46,7 @@ test("real Veo generation -> local overlay composition -> signed public URL", { assert.equal(composed.model, "ffmpeg-overlay"); assert.equal(composed.outputs[0].mimeType, "video/mp4"); assert.equal(composed.outputs[0].base64, undefined); - assert.match(composed.outputs[0].publicUrl, /^https:\/\/mcp\.zenvairo\.es\/zenvairogoogle\/public-media\//); + assert.match(composed.outputs[0].publicUrl, /^http:\/\/127\.0\.0\.1:8087\/public-media\//); const publicResponse = await fetch(composed.outputs[0].publicUrl); assert.equal(publicResponse.status, 200);