Skip to main content

Gemini

A Gemini MCP gateway for long inputs, files, quota-aware model routing, and local text-to-speech. It runs either directly against Google AI Studio or through a gemini-router fleet; both modes expose the same gateway tools.

Install and configure

pnpm dlx @vernikr/gemini setup
# or: npx -y @vernikr/gemini setup

Choose Direct to use a local API-key pool and ledger, or Fleet to connect to a router service you operate. The setup command guides key entry, writes local configuration, and can merge the MCP server entry into supported client configurations.

The npm launcher checks PyPI for a newer Python core at CLI startup. If the registry is unavailable, it uses the version paired with the launcher. Disable the check for a command with --no-update, or for an MCP client or shell with GEMINI_AUTO_UPDATE=0. --help and --version do not make a registry request. Direct uvx installs can select a version explicitly:

uvx --from 'vernikr-gemini==<VERSION>' gemini --version

For an AI agent or non-interactive setup, pass all choices explicitly:

npx -y @vernikr/gemini setup --backend direct \
  --keys-file /absolute/path/keys.txt --write-client freebuff --json

npx -y @vernikr/gemini setup --backend router --vps-host <YOUR_VPS_HOST> \
  --vps-user <SSH_USER> --projects-dir ~/projects \
  --write-client freebuff --json

The setup command prints a verification prompt after configuration. Restart the MCP client, then ask its Gemini server to run the prompt's quota_status check. See the consumer guide for client configuration and deployment details.

Capabilities

  • Large text inputs: overlapping chunks are analyzed individually and consolidated; structured progress, logs, and request traces are available to the caller.
  • Files: upload tickets accept supported documents, images, and audio. Extractable text uses the chunked pipeline; media supported by Gemini is sent as a measured provider file.
  • Routing: the router backend shares a SQLite quota ledger across clients. Direct mode uses a local ledger and does not require a server.
  • TTS: gemini tts file.md creates a mono MP3 from UTF-8 .txt or .md input. The CLI shows a live overall progress bar: completed chunks advance the percentage, and MP3 encoding completes it. The progress is based on completed work, not a time estimate.
  • Operations: gemini quota, calls, logs, doctor, and prune inspect local or shared state without making an unrequested generation call.

The TTS command accepts --voice, --style, --output, --bitrate, and --no-wait. Direct mode uses local keys. Router mode reads the proxy token over SSH into memory and forwards requests over a short-lived loopback-only tunnel. ffmpeg must be installed for MP3 encoding.

MCP connection

The setup command can write client configuration. For a manual Fleet connection over SSH:

{
  "mcpServers": {
    "gemini": {
      "command": "ssh",
      "args": ["<SSH_USER>@<YOUR_VPS_HOST>", "~/.local/bin/gemini", "stdio"],
      "env": { "GEMINI_AUTO_UPDATE": "0" }
    }
  }
}

For Direct mode, run the npm launcher as the MCP command and keep API keys in the gateway's private configuration directory rather than embedding them in the client JSON. See docs/06-consumer.md and docs/freebuff-wiring.md.

Development

This checkout requires Python 3.12 or later. To run the test suite and linter:

uv sync --extra dev
uv run pytest -q
uv run ruff check src tests
python scripts/check_secrets.py
npm test --prefix packaging/npm

Tests mock provider responses and do not require live API keys. For a router change, run the tests and checks in the gemini-router repository as well.

Documentation

Metadata

Release files for vernikr-gemini 0.28.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vernikr-gemini 0.28.0
File Size Uploaded Provenance Actions
vernikr_gemini-0.28.0.tar.gz 212.5 kB Without provenance Details for vernikr_gemini-0.28.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for vernikr-gemini 0.28.0
File Interpreter ABI Platform Actions
vernikr_gemini-0.28.0-py3-none-any.whl Python 3 none any Details for vernikr_gemini-0.28.0-py3-none-any.whl

Total release size: 308.2 kB

Release files / vernikr_gemini-0.28.0.tar.gz

Download URL vernikr_gemini-0.28.0.tar.gz
Size 212.5 kB
Tags Source
SHA-256 checksum
How to use checksums
727eb18c1f306248e7b421b9fde3ed838dce3b3fc734cd6f744f6cf273226982
BLAKE2b-256 checksum
How to use checksums
672f611de733706bcc7f49d2075b8103386b54675ade5e984aaddfd0cac34580
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / vernikr_gemini-0.28.0-py3-none-any.whl

Download URL vernikr_gemini-0.28.0-py3-none-any.whl
Size 95.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4e4d0994c05659758c557f318fb6068dd502016a760f60d830a16a5b2718962d
BLAKE2b-256 checksum
How to use checksums
06b7ab4d40b8f63565cf5922e95101bdb0a4124999a55a474e8c3381f2c6e3c5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for vernikr-gemini 0.28.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.28.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page