@vernikr/gemini-mcp 0.8.0 → 0.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +82 -13
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,19 +1,88 @@
1
1
  # @vernikr/gemini-mcp
2
2
 
3
- One-command Gemini **free-tier** MCP gateway (Python core: `gemini-mcp-gateway` on PyPI,
4
- bootstrapped via [uv](https://docs.astral.sh/uv/) — no system Python needed). Works
5
- **without any server**: default `direct` mode talks to Google AI Studio straight from
6
- your machine; `router` mode joins a fleet gateway with a shared quota ledger.
3
+ Gemini **free-tier** MCP gateway that needs **no server**: your MCP client (Freebuff,
4
+ Claude Desktop, Cursor, …) talks to Google AI Studio through a quota-aware router —
5
+ cascading Flash chain, per key×model RPD/RPM/TPM budgeting, minute-limit waiting,
6
+ massive-body chunked analysis with consolidation. Python core `gemini-mcp-gateway`
7
+ (PyPI), bootstrapped via [uv](https://docs.astral.sh/uv/) — no system Python needed.
8
+
9
+ ## Get API keys (free)
10
+
11
+ <https://aistudio.google.com/app/apikey> — several keys = several times the quota
12
+ (20 requests/day per key×model).
13
+
14
+ ## Wiring — 2 options
15
+
16
+ ### A · Wizard (recommended): `setup`, then paste one JSON block
7
17
 
8
18
  ```bash
9
- pnpm dlx @vernikr/gemini-mcp setup # wizard: AI Studio keys → ~/.config/gemini-mcp
10
- # → live key probe → client snippets
11
- pnpm dlx @vernikr/gemini-mcp doctor # self-check with fix commands
12
- pnpm dlx @vernikr/gemini-mcp quota # free-tier budget table
13
- pnpm dlx @vernikr/gemini-mcp uninstall --yes # remove keys+config
19
+ pnpm dlx @vernikr/gemini-mcp setup
14
20
  ```
15
21
 
16
- Features: quota-aware routing across the Flash chain (two routes: `optimal` /
17
- `best_available`), massive-body chunked analysis with consolidation, file ingest with
18
- server-side RTF/DOCX→Markdown extraction, async tickets for long jobs, structured
19
- agent-facing errors. Repo: github.com/vernikr/gemini-mcp
22
+ What it does — and what it does NOT:
23
+
24
+ - asks one question (simple/direct vs fleet/router; pick **1**);
25
+ - takes keys through a **masked** prompt and stores them in `~/.config/gemini-mcp/.env`
26
+ (mode `0600` — the only place keys live), plus a minimal `config.yaml`;
27
+ - probes keys live (listModels — zero quota spent) and prints fingerprints, never keys;
28
+ - **prints** the ready `mcpServers` JSON for your client — it does **not** edit any
29
+ client config itself (formats differ per client; you paste the block once).
30
+
31
+ After the wizard the client JSON needs no env/keys — the gateway auto-discovers
32
+ `~/.config/gemini-mcp/`:
33
+
34
+ ```json
35
+ {
36
+ "mcpServers": {
37
+ "gemini": { "command": "npx", "args": ["-y", "@vernikr/gemini-mcp", "stdio"] }
38
+ }
39
+ }
40
+ ```
41
+
42
+ ### B · JSON-only (skip the wizard entirely)
43
+
44
+ Is pasting JSON into `mcp.json` enough? **Yes — if the keys travel in its `env`**
45
+ (without keys anywhere the gateway fails fast by design):
46
+
47
+ ```json
48
+ {
49
+ "mcpServers": {
50
+ "gemini": {
51
+ "command": "npx",
52
+ "args": ["-y", "@vernikr/gemini-mcp", "stdio"],
53
+ "env": { "GEMINI_API_KEYS": "AIza…key1,AIza…key2" }
54
+ }
55
+ }
56
+ }
57
+ ```
58
+
59
+ Backend auto-resolves to `direct`; logs and the local usage ledger (`state.db` —
60
+ quota counters survive restarts) go to `~/.config/gemini-mcp/`. Trade-off vs option A:
61
+ keys sit in the client config file instead of a `0600` `.env`.
62
+
63
+ Where to paste (restart the client fully afterwards): Freebuff `~/.agents/mcp.json` ·
64
+ Claude Desktop `~/Library/Application Support/Claude/claude_desktop_config.json` ·
65
+ Cursor `~/.cursor/mcp.json`. First launch pays a one-time uv resolve (~10–20 s).
66
+
67
+ ## Commands
68
+
69
+ ```bash
70
+ pnpm dlx @vernikr/gemini-mcp doctor # keys, chain, limits, live probe, ledger
71
+ pnpm dlx @vernikr/gemini-mcp quota # per key×model budget table (live)
72
+ pnpm dlx @vernikr/gemini-mcp calls -n 20 # local audit tail
73
+ pnpm dlx @vernikr/gemini-mcp uninstall --yes # remove keys, config and ledger
74
+ ```
75
+
76
+ All commands accept `--json` (agent-facing output). MCP tools: `analyze_large`,
77
+ `gemini_generate`, `analyze_file` (server-side RTF/DOCX extraction), `analyze_result`,
78
+ `quota_status`, `router_logs`. Every compute answer starts with a one-line `report`
79
+ (`backend=direct · route=… · model=… · req=N · …s · clean run`).
80
+
81
+ ## How the shim works
82
+
83
+ `bin/gemini-mcp.js` is a ~30-line bootstrap: it runs the version-pinned Python core
84
+ (`uvx --from gemini-mcp-gateway==<same version> gemini-mcp …`), self-installing uv
85
+ through `npx -y @astral-sh/uv` when needed. Zero logic in JS; npm ↔ PyPI versions are
86
+ lockstep. Fleet mode (shared quota ledger on your own server) and full docs:
87
+ [github.com/vernikr/gemini-mcp](https://github.com/vernikr/gemini-mcp) —
88
+ `docs/06-consumer.md`, `docs/08-dual-mode.md`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vernikr/gemini-mcp",
3
- "version": "0.8.0",
3
+ "version": "0.8.2",
4
4
  "description": "One-command Gemini free-tier MCP gateway: quota-aware model routing, massive-body chunked analysis, file ingest (RTF/DOCX→Markdown), async tickets. Thin bootstrap for the Python core gemini-mcp-gateway.",
5
5
  "bin": {
6
6
  "gemini-mcp": "bin/gemini-mcp.js"