Skip to main content
Glama
Gemini Argon Bridge

Gemini Argon Bridge

by Aldiyuar

Gemini Argon Bridge (MCP Server & CLI)

MCP Protocol Node.js License: MIT Google AI Studio

High-performance Model Context Protocol (MCP) server & CLI bridging AI assistants (Antigravity, Claude Desktop, Cursor, Windsurf) with Google AI Studio's Gemini 4 Argon reasoning model via an authenticated real-browser CDP session.


🌟 Key Highlights

  • 🧠 Deep Reasoning Oracle: Direct access to Gemini 4 Argon's extended chain-of-thought, returning both [ARGON_THOUGHTS] (full reasoning trace) and [ARGON_RESPONSE] (verdict & code).

  • πŸš€ Sub-Millisecond Input Streaming: Uses native DOM prototype property setters (HTMLTextAreaElement.prototype.value) to inject 85,000+ characters in 13 milliseconds, bypassing sluggish CDP keystroke simulation.

  • πŸ“¦ Massive Context Offloading (>120k chars): Automatically converts massive inputs into temporary file attachments, uploads them into AI Studio's file dock, and awaits backend tokenization stabilization before executing.

  • πŸ”’ Cross-Process IPC Locking & CDP Multiplexing: Share a single headless/headful Chromium instance between multiple MCP calls and independent CLI executions with zero collision or port conflicts.

  • πŸ’Ύ Google Drive Persistence & Session Resumption: Every conversation is automatically titled, saved to Google Drive, and can be resumed across sessions via semantic session_id or Google Drive prompt_id.

  • πŸ›‘οΈ 100% API Quota-Free: Operates through your authenticated Google AI Studio web accountβ€”no pay-per-token API keys, tier restrictions, or rate limit caps.


Related MCP server: Chrome DevTools MCP

πŸ—οΈ Architecture

flowchart TD
    subgraph Clients["AI Clients & CLI"]
        AGY["Antigravity / Gemini IDE"]
        CLD["Claude Desktop / Cursor"]
        CLI["ask-argon CLI Tool"]
    end

    subgraph MCP["Gemini Argon Bridge"]
        STDIO["mcp-server.js (Stdio JSON-RPC)"]
        ENGINE["ArgonEngine (engine.js)"]
        IPCLOCK["IPC File Lock & Mutex"]
        LRU["LRU Tab Manager & Session Registry"]
    end

    subgraph Browser["Google Chrome CDP"]
        CHROME["Isolated Chromium Profile"]
        CDP["Chrome DevTools Protocol (WebSocket)"]
        STUDIO["Google AI Studio Web UI\n(Gemini 4 Argon Session)"]
    end

    AGY <-->|Stdio MCP| STDIO
    CLD <-->|Stdio MCP| STDIO
    CLI <-->|Direct Engine| ENGINE
    STDIO <--> ENGINE
    ENGINE <--> IPCLOCK
    ENGINE <--> LRU
    ENGINE <-->|Puppeteer CDP| CDP
    CDP <--> CHROME
    CHROME <--> STUDIO

πŸš€ Quick Start

1. Prerequisites

  • Node.js: v18.0.0 or higher (node -v)

  • Browser: Google Chrome (or Microsoft Edge) installed on your system.

2. Installation

# Clone the repository
git clone https://github.com/Aldiyuar/gemini-argon-bridge.git
cd gemini-argon-bridge

# Install dependencies
npm install

3. One-Time Interactive Login

Launch Chrome with the dedicated isolated profile (~/.gemini/argon-browser-profile) to sign into your Google account:

# Windows (via batch script)
login.bat

# Or directly via Node.js (Windows / Linux / macOS)
node login.js
  1. Chrome will open to Google AI Studio.

  2. Sign in with your Google account.

  3. Accept terms and open/test any prompt to verify access.

  4. Close the browser. Your session cookies and tokens remain safely persisted in the isolated user profile.


βš™οΈ Configuration

1. Google Antigravity / Gemini CLI

Add to ~/.gemini/config/mcp_config.json:

{
  "mcpServers": {
    "gemini-argon": {
      "command": "node",
      "args": [
        "C:\\path\\to\\gemini-argon-bridge\\mcp-server.js"
      ]
    }
  }
}

2. Claude Desktop

Add to %APPDATA%\Claude\claude_desktop_config.json (Windows) or ~/Library/Application Support/Claude/claude_desktop_config.json (macOS):

{
  "mcpServers": {
    "gemini-argon": {
      "command": "node",
      "args": [
        "/path/to/gemini-argon-bridge/mcp-server.js"
      ]
    }
  }
}

3. Cursor / Windsurf

Add to .cursor/mcp.json or Global MCP Settings:

{
  "mcpServers": {
    "gemini-argon": {
      "command": "node",
      "args": [
        "/path/to/gemini-argon-bridge/mcp-server.js"
      ]
    }
  }
}

πŸ› οΈ MCP Tools Reference

The server registers 3 tools under the Model Context Protocol:

1. ask_argon

Executes deep reasoning prompts in Gemini 4 Argon.

Parameter

Type

Required

Description

prompt

string

Yes

The core inquiry, audit request, or problem specification.

session_id

string

No

Semantic conversation slug (e.g. auth-audit). Keeps multi-turn state. Defaults to anonymous.

file_paths

array<string>

No

List of absolute local file paths (.ts, .py, .json, .md, .pdf, etc.) to attach.

timeout_sec

number

No

Maximum wait time in seconds (default: 360, max: 1200).

prompt_id

string

No

Existing Google Drive prompt resource ID to resume an existing web session.

Example Return:

[ARGON_THOUGHTS]
1. Analyzing attached state_machine.ts...
2. Detected race condition between event queue flush and mutex release at line 142.
3. Solution requires double-checked locking with atomic CAS.

[ARGON_RESPONSE]
### Root Cause Analysis
The race condition stems from...

```typescript
// Verified minimal diff

### 2. `argon_status`
Returns real-time health and diagnostics of the bridge:
- Browser running status & CDP WebSocket URL
- IPC mutex state (`isLocked`)
- Active sessions and attached tab count
- Persistent Google Drive prompt registry

### 3. `reset_argon`
Closes browser tabs and frees memory:
- With `session_id`: Closes the specific tab and unregisters the session.
- Without arguments: Closes all tabs and cleans up temporary scratch files.

---

## πŸ’» CLI Usage

The package includes a standalone CLI (`ask-argon-cli.js`) that shares the browser instance with MCP without conflicts:

```bash
# Direct single prompt
node ask-argon-cli.js "Explain the difference between optimistic and pessimistic locking"

# Attach local files for deep review
node ask-argon-cli.js "Audit these files for security flaws" --file src/auth.ts --file src/jwt.ts

# Multi-turn session continuation
node ask-argon-cli.js "Fix the race condition you identified" --session bug-hunt-1

# Save output to markdown file
node ask-argon-cli.js "Design a high-throughput event bus" --output architecture.md

πŸ§ͺ Verification & Automated Tests

Run the end-to-end integration test suite:

npm test

The test runner will:

  1. Spawn mcp-server.js via stdio JSON-RPC.

  2. Initialize the protocol and query argon_status.

  3. Dispatch an ask_argon query.

  4. Concurrently launch ask-argon-cli.js in a parallel process to verify IPC lock arbitration and WebSocket endpoint reuse.

  5. Verify mathematical precision (17 + 25 = 42) and custom token presence (ΠΠ Π“ΠžΠ_ОК).

  6. Perform clean LIFO session teardown via reset_argon.


πŸ“‚ Repository Structure

gemini-argon-bridge/
β”œβ”€β”€ package.json               # Node.js manifest with bin shortcuts & dependencies
β”œβ”€β”€ engine.js                  # Core ArgonEngine (CDP browser lifecycle, DOM injection, IPC)
β”œβ”€β”€ mcp-server.js              # Model Context Protocol stdio transport server
β”œβ”€β”€ ask-argon-cli.js           # Production CLI companion tool
β”œβ”€β”€ login.js                   # Interactive profile setup & Google authentication
β”œβ”€β”€ login.bat                  # One-click Windows setup launcher
β”œβ”€β”€ mcp_config.example.json    # Example configuration templates for IDEs
β”œβ”€β”€ skills/
β”‚   └── argon-reasoning/
β”‚       └── SKILL.md          # Antigravity skill for automated deep reasoning routing
β”œβ”€β”€ tests/
β”‚   └── integration.test.js    # Concurrency and end-to-end verification test suite
β”œβ”€β”€ LICENSE                    # MIT License
└── README.md                  # Documentation and API reference

πŸ“„ License

This project is licensed under the MIT License. Created and maintained by Aldiyuar.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI coding assistants to control and inspect a live Chrome browser through DevTools for automated testing, performance analysis, debugging, and web scraping. Provides reliable browser automation using Puppeteer with comprehensive DevTools access.
    1,876,272 npm
    3
    Apache 2.0
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI coding assistants to control and inspect a live Chrome browser for automation, debugging, performance analysis, network monitoring, and DOM interaction through Chrome DevTools Protocol.
    1,876,272 npm
    Apache 2.0
  • A
    license
    Not graded
    quality
    A
    maintenance
    Enables AI agents to drive a live, persistent self-hosted Chromium session over MCP, running browser actions via Playwright/CDP, capturing page snapshots, screenshots and videos, and managing uploads and downloads in the same tabs and signed-in accounts a human user can take over at any time.
    1 npm
    Apache 2.0