Skip to content

v1.7.0 — Native Gateway POST /mcp, Trilingual Admin UI (EN/繁/简), Standalone MCP & OpenCode Plugins, and Pi 1.5.2 Session Affinity

Choose a tag to compare

@ShawTim ShawTim released this 22 Nov 22:52
· 23 commits to main since this release

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 /mcp exposing ask_gemini (with inline data: image support and LFI blocking of images[].path), gemini_search (grounded native_search + formatted Markdown citations), and gemini_quota (sanitized pool-level summary with zero emails, labels, tokens, or account IDs).
  • Enforced DNS-rebinding Origin allowlist (403 ORIGIN_REJECTED), MCP-Protocol-Version validation (2025-06-18 / 2025-03-26 / 2024-11-05), strict JSON-RPC -32700/-32600 responses, raw-byte maxPromptBytes enforcement before image decoding, and a persisted mcpEnabled setting (403 MCP_DISABLED when disabled without affecting /v1/*).
  • Added bin/gemini-gateway mcp stdio bridge with HTTPS enforcement for non-loopback hosts, cwd .env isolation, bounded concurrency (8), typed JSON-RPC request-ID tracking, and client notifications/cancelled aborts.

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 complete README.zh-CN.md.
  • Added MCP Quick Connect (MCP preset), Client Setup (MCP Endpoint URL + status badge + strict JSON MCP (HTTP) with "type": "http" and local-path MCP (stdio) tabs), API Keys dual /v1 + /mcp endpoint strip, Settings Enable MCP Streamable HTTP endpoint switch, and /mcp request telemetry & onboarding recognition.

Standalone Zero-Dependency Extensions (extensions/mcp, extensions/opencode)

  • Added mcp-gemini-app@0.1.0: zero-dependency Node.js >=22 stdio MCP server with fail-closed owner-tagged credential isolation, serialized .reclaim cross-process locking + pre-refresh inode-pinned O_RDWR updates, read-only external Pi auth support, retry account-epoch pinning, O_NONBLOCK | O_NOFOLLOW local image loading, and explicit --accept-terms ToS opt-in.
  • Added opencode-gemini-app@0.1.0: zero-dependency Bun/Node OpenCode provider plugin with loopback & remote OAuth flows, explicit GEMINI_OPENCODE_ACCEPT_TERMS=1 opt-in, per-loader isolated tier resolution before gemini-auto selection, post-tier-probe account identity verification, retry account-epoch pinning, deferred SSE error responses, and ReadableStream.cancel() upstream abort.

Pi 1.5.2 Session Affinity (Fixes #4)

  • Recognized hyphenated session-id in explicit session header resolution (x-session-id → x-session-affinity → session-id → session_id) with strict INVALID_SESSION_ID validation.
  • Updated Pi User-Agent matching to support versioned pi/<version> (...) / pi/<version> headers (e.g. pi/1.5.2 (win32; node/v24.13.0; x64)) for prompt_cache_key fallback 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 to ghcr.io/shawtim/gemini-app2api:v1.7.0 and :latest.

Full Changelog: v1.6.6...v1.7.0