Repository navigation
v1.7.0 — Native Gateway POST /mcp, Trilingual Admin UI (EN/繁/简), Standalone MCP & OpenCode Plugins, and Pi 1.5.2 Session Affinity
Highlights
Native Gateway Streamable HTTP MCP (POST /mcp) & stdio Bridge (bin/gemini-gateway mcp)
- Added an in-process, API-key-authenticated Streamable HTTP JSON-RPC 2.0 MCP endpoint at
POST /mcpexposingask_gemini(with inlinedata:image support and LFI blocking ofimages[].path),gemini_search(groundednative_search+ formatted Markdown citations), andgemini_quota(sanitized pool-level summary with zero emails, labels, tokens, or account IDs). - Enforced DNS-rebinding
Originallowlist (403 ORIGIN_REJECTED),MCP-Protocol-Versionvalidation (2025-06-18/2025-03-26/2024-11-05), strict JSON-RPC-32700/-32600responses, raw-bytemaxPromptBytesenforcement before image decoding, and a persistedmcpEnabledsetting (403 MCP_DISABLEDwhen disabled without affecting/v1/*). - Added
bin/gemini-gateway mcpstdio bridge with HTTPS enforcement for non-loopback hosts, cwd.envisolation, bounded concurrency (8), typed JSON-RPC request-ID tracking, and clientnotifications/cancelledaborts.
Trilingual Admin UI (English / 繁體中文 / 简体中文) & MCP Controls
- Added a compact 3-language switcher (
EN | 繁 | 简) with full Simplified Chinese (zh-CN) localization across all Admin Console views and a completeREADME.zh-CN.md. - Added MCP Quick Connect (
MCPpreset), Client Setup (MCP EndpointURL + status badge + strict JSONMCP (HTTP)with"type": "http"and local-pathMCP (stdio)tabs), API Keys dual/v1+/mcpendpoint strip, SettingsEnable MCP Streamable HTTP endpointswitch, and/mcprequest telemetry & onboarding recognition.
Standalone Zero-Dependency Extensions (extensions/mcp, extensions/opencode)
- Added
mcp-gemini-app@0.1.0: zero-dependency Node.js>=22stdio MCP server with fail-closedowner-tagged credential isolation, serialized.reclaimcross-process locking + pre-refresh inode-pinnedO_RDWRupdates, read-only external Pi auth support, retry account-epoch pinning,O_NONBLOCK | O_NOFOLLOWlocal image loading, and explicit--accept-termsToS opt-in. - Added
opencode-gemini-app@0.1.0: zero-dependency Bun/Node OpenCode provider plugin with loopback & remote OAuth flows, explicitGEMINI_OPENCODE_ACCEPT_TERMS=1opt-in, per-loader isolated tier resolution beforegemini-autoselection, post-tier-probe account identity verification, retry account-epoch pinning, deferred SSE error responses, andReadableStream.cancel()upstream abort.
Pi 1.5.2 Session Affinity (Fixes #4)
- Recognized hyphenated
session-idin explicit session header resolution (x-session-id→x-session-affinity→session-id→session_id) with strictINVALID_SESSION_IDvalidation. - Updated Pi
User-Agentmatching to support versionedpi/<version> (...)/pi/<version>headers (e.g.pi/1.5.2 (win32; node/v24.13.0; x64)) forprompt_cache_keyfallback affinity.
Verification
- Full offline pre-release suite passed: 75/75 staged product tests, 71/71 Playwright browser tests (390px + 1440px, light/dark, EN/繁/简), Python + JS SDK smoke tests, all 5 package release checks, and live 9-account gateway affinity verification.
- Multi-arch Docker image (
linux/amd64,linux/arm64) published toghcr.io/shawtim/gemini-app2api:v1.7.0and:latest.
Full Changelog: v1.6.6...v1.7.0