mirror of
https://github.com/Dasemu/gemini-media-mcp.git
synced 2026-11-26 23:36:09 +00:00
Initial commit
This commit is contained in:
commit
85fbc8b05a
27 files changed
+4465
No files matched your search
@@ -0,0 +1,148 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
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_MEDIA_SIGNING_SECRET=replace-with-at-least-32-random-characters
|
||||
PUBLIC_MEDIA_URL_TTL_SECONDS=86400
|
||||
MEDIA_DIR=/opt/gemini-veo-mcp/media
|
||||
MAX_INLINE_MEDIA_MB=25
|
||||
MAX_MEDIA_MB=300
|
||||
MAX_REFERENCE_INPUT_MB=25
|
||||
MAX_MCP_REQUEST_MB=40
|
||||
MEDIA_RETENTION_HOURS=168
|
||||
TOMBSTONE_RETENTION_DAYS=30
|
||||
PYTHON_BIN=python3
|
||||
FFMPEG_BIN=ffmpeg
|
||||
FFPROBE_BIN=ffprobe
|
||||
OVERLAY_CARD_SCRIPT=/opt/gemini-veo-mcp/scripts/make_overlay_card.py
|
||||
@@ -0,0 +1,26 @@
|
||||
#!/sbin/openrc-run
|
||||
|
||||
name="gemini-veo-mcp"
|
||||
description="Gemini and Veo MCP server (Streamable HTTP, 127.0.0.1:8087)"
|
||||
command="/usr/bin/node"
|
||||
command_args="/opt/gemini-veo-mcp/dist/index.js"
|
||||
directory="/opt/gemini-veo-mcp"
|
||||
command_user="mcp:mcp"
|
||||
command_background="yes"
|
||||
pidfile="/run/${RC_SVCNAME}.pid"
|
||||
output_log="/var/log/${RC_SVCNAME}.log"
|
||||
error_log="/var/log/${RC_SVCNAME}.log"
|
||||
env_file="/opt/gemini-veo-mcp/gemini-veo-mcp.env"
|
||||
|
||||
start_pre() {
|
||||
checkpath -d -m 0750 -o mcp:mcp /opt/gemini-veo-mcp/media
|
||||
checkpath -f -m 0640 -o mcp:mcp "${output_log}"
|
||||
set -a
|
||||
[ -f "${env_file}" ] && . "${env_file}"
|
||||
set +a
|
||||
}
|
||||
|
||||
depend() {
|
||||
need net
|
||||
after nginx
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
# Public only when the application validates the expiring HMAC signature.
|
||||
location /zenvairogoogle/public-media/ {
|
||||
auth_basic off;
|
||||
|
||||
proxy_pass http://127.0.0.1:8087/public-media/;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host 127.0.0.1:8087;
|
||||
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 600s;
|
||||
}
|
||||
|
||||
location /zenvairogoogle/media/ {
|
||||
auth_basic "Zenvairo Google Media MCP";
|
||||
auth_basic_user_file /etc/nginx/htpasswd/zenvairogoogle;
|
||||
|
||||
proxy_pass http://127.0.0.1:8087/media/;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host 127.0.0.1:8087;
|
||||
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 X-MCP-Server-Token "__MCP_SERVER_TOKEN__";
|
||||
|
||||
proxy_buffering off;
|
||||
proxy_cache off;
|
||||
proxy_read_timeout 600s;
|
||||
proxy_send_timeout 600s;
|
||||
}
|
||||
|
||||
location /zenvairogoogle/ {
|
||||
auth_basic "Zenvairo Google Media MCP";
|
||||
auth_basic_user_file /etc/nginx/htpasswd/zenvairogoogle;
|
||||
client_max_body_size 40m;
|
||||
|
||||
proxy_pass http://127.0.0.1:8087/;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host 127.0.0.1:8087;
|
||||
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_set_header X-MCP-Server-Token "__MCP_SERVER_TOKEN__";
|
||||
|
||||
proxy_buffering off;
|
||||
proxy_request_buffering off;
|
||||
proxy_cache off;
|
||||
proxy_read_timeout 600s;
|
||||
proxy_send_timeout 600s;
|
||||
|
||||
proxy_set_header Mcp-Protocol-Version $http_mcp_protocol_version;
|
||||
proxy_set_header Mcp-Session-Id $http_mcp_session_id;
|
||||
}
|
||||
Reference in new issue
Block a user