Skip to main content
Glama
kaenozu

Browser AI Debate MCP

by kaenozu

Browser AI Debate MCP

A Model Context Protocol (MCP) server that runs a structured multi-round debate between ChatGPT Web and Gemini Web by operating both in Chrome via CDP (Chrome DevTools Protocol). It uses browser automation rather than provider APIs.

What It Does

  1. Opens ChatGPT Web and Gemini Web in the same Chrome session

  2. Sends the same question to both models independently

  3. Makes each model critique the other response

  4. Requests revised answers

  5. Produces a final conclusion and an independent audit

  6. Returns structured results with confidence, rationale, risks, and provider status

Related MCP server: guru-pk-mcp

Important

  • Requires logged-in ChatGPT and Gemini browser sessions

  • Uses browser UI automation, so provider UI changes can break selectors

  • Does not require OpenAI or Gemini API keys

  • Stores the dedicated profile only in .browser-ai-profile/, which is gitignored

  • Does not terminate a user-owned Chrome process

Prerequisites

  • Node.js 20 or newer

  • Google Chrome desktop

Setup

git clone https://github.com/kaenozu/browser-ai-debate-mcp.git
cd browser-ai-debate-mcp
npm install
npm run build

Chrome Preparation

Auto-launch

When BROWSER_AI_CDP_URL is not set, the server attempts to launch a dedicated Chrome profile automatically.

npm start

Connect to an existing logged-in Chrome

  1. Log into ChatGPT and Gemini in Chrome.

  2. Enable remote debugging at chrome://inspect/#remote-debugging.

  3. Configure the CDP endpoint before starting the server.

Windows Command Prompt:

set BROWSER_AI_CDP_URL=http://127.0.0.1:9222
npm start

PowerShell:

$env:BROWSER_AI_CDP_URL = "http://127.0.0.1:9222"
npm start

Pre-launch a dedicated profile

npm run login

Log into both services, close Chrome, then run:

npm run chrome:debug

Start the MCP server in another terminal:

npm start

MCP Client Configuration

The public server identifier remains browser-ai-debate, and the public tool name remains browser_ai_debate for compatibility.

Auto-launch configuration:

{
  "mcpServers": {
    "browser-ai-debate": {
      "command": "node",
      "args": ["dist/index.js"]
    }
  }
}

Existing Chrome via CDP:

{
  "mcpServers": {
    "browser-ai-debate": {
      "command": "node",
      "args": ["dist/index.js"],
      "env": {
        "BROWSER_AI_CDP_URL": "http://127.0.0.1:9222"
      }
    }
  }
}

browser_ai_debate Tool

Example input:

{
  "question": "Why is not swallowing exceptions important in TypeScript?",
  "context": "We have 70 source files and 23 try-catch blocks that swallow errors",
  "decisionCriteria": ["reliability", "debuggability", "user experience", "maintainability"],
  "maxRounds": 3,
  "timeoutMs": 900000
}

Field

Required

Default

Description

question

Yes

Debate question, up to 100,000 characters

context

No

Additional context

decisionCriteria

No

Evaluation criteria

maxRounds

No

3

Maximum 1–5 rounds

timeoutMs

No

900000

Total timeout, minimum 30,000 ms

providerTimeoutMs

No

derived

Per-provider timeout

includeTranscript

No

true

Include the transcript

finalizer

No

chatgpt

Provider that produces the final decision

Timeout and Partial Results

  • timeoutMs covers queue wait time and all debate phases

  • Provider failures are returned explicitly

  • If only one provider completes, the result is marked partial

  • Partial output is never presented as a complete result

Security Notes

  • Browser profiles and credentials are not committed to Git

  • Conversation content is not sent to an additional external service by this MCP server

  • User-owned Chrome is not terminated by the server

  • Dedicated Chrome processes started by the server are cleaned up on shutdown

Troubleshooting

CDP connection fails

  1. Confirm Chrome remote debugging is enabled.

  2. Confirm BROWSER_AI_CDP_URL points to the active endpoint.

  3. Check that port 9222 is available and reachable.

  4. Run npm run chrome:debug to start the dedicated profile explicitly.

  5. Open http://127.0.0.1:9222/json/version locally to confirm the endpoint responds.

AUTH_REQUIRED

The stored browser session has expired or is not logged into one of the providers.

  1. Run npm run login.

  2. Log into ChatGPT and Gemini.

  3. Close the profile window and retry.

Provider UI or DOM selectors changed

Authentication succeeds, but the provider page no longer matches the expected UI.

  1. Retry with a fresh dedicated profile.

  2. Confirm the provider page works manually.

  3. Report the provider, page state, and observed error without including credentials or private conversation content.

  4. Update only the provider selector module (src/providers/<provider>/selectors.ts) and its sanitized fixture test (tests/provider-selector-smoke.test.ts). Keep fixtures free of real conversation content.

  5. Run npm test and npm run check before opening a PR.

The normal CI suite runs the sanitized DOM fixture and fallback-order tests. The opt-in .github/workflows/live-smoke.yml is manual-only, checks out master, requires the protected provider-live-smoke environment, and reads only BROWSER_AI_CDP_URL from secrets. It must never be enabled for pull requests or execute untrusted PR code. Live smoke requires logged-in ChatGPT and Gemini tabs in the operator's CDP session; those checks are intentionally an external gate.

Auto-launch cannot find Chrome

Confirm Chrome is installed in a standard location, or use an explicit CDP connection with BROWSER_AI_CDP_URL.

Windows Quick Start

start.bat

Manual start:

npm run build
npm start

Interactive MCP inspection:

npm run inspector

OpenCode MCP Registration

Existing logged-in Chrome:

{
  "mcpServers": {
    "browser-ai-debate": {
      "command": "cmd",
      "args": ["/c", "node", "C:/path/to/browser-ai-debate-mcp/dist/index.js"],
      "env": {
        "BROWSER_AI_CDP_URL": "http://127.0.0.1:9222"
      }
    }
  }
}

For dedicated auto-launch mode, omit the env block.

Available Tools

1 tool
browser_ai_debateA

Runs a structured multi-round debate between ChatGPT Web and Gemini Web using browser automation via CDP. Returns a structured conclusion with confidence score, rationale, and provider-level details. No API keys or external APIs are used.

ParametersJSON Schema
NameRequiredDescriptionDefault
contextNoAdditional context for the debate
questionYesThe question to debate between ChatGPT and Gemini
finalizerNoWhich provider makes the final decision
maxRoundsNoMaximum debate rounds (1-5)
timeoutMsNoTotal timeout in milliseconds
decisionCriteriaNoDecision criteria to evaluate conclusions against
includeTranscriptNoInclude full transcript in output
providerTimeoutMsNoPer-provider timeout in milliseconds

Output Schema

ParametersJSON Schema
NameRequiredDescription
auditYes
roundsYes
statusYes
maxRoundsYes
providersYes
rationaleYes
agreementsYes
conclusionYes
confidenceYes
durationMsYes
nextActionsYes
totalRoundsYes
disagreementsYes
remainingRisksYes
partialExplanationNo
geminiConversationUrlNo
chatgptConversationUrlNo

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description explains the method (browser automation via CDP) and output, but lacks details on potential side effects, reliability, or dynamic behavior. With no annotations, more transparency would be helpful, but the core behavior is conveyed.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences, each serving a clear purpose: what it does, what it returns, and a key feature. No wasted words, highly efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers input, process, and output. An output schema exists. It could mention error handling or limitations, but overall it's sufficiently complete for a tool with well-documented parameters.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the description does not need to add parameter meaning. It focuses on the overall tool purpose. Baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it runs a structured multi-round debate between ChatGPT Web and Gemini Web using browser automation via CDP, with a specific output. No siblings exist, so no need for differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

While no explicit alternatives are given due to no siblings, the description highlights that no API keys or external APIs are used, which is a key usage hint. It could benefit from more explicit when-to-use guidance, but it's clear enough.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 1 tool updatev0.1.0
    • First observedbrowser_ai_debate

TDQS

A4.1/5.0
Disambiguation5/5

Only one tool exists, so there is no possibility of confusion or overlap with other tools.

Naming Consistency5/5

With a single tool, naming consistency is not applicable; the name is descriptive and appropriate.

Tool Count3/5

A single tool for a dedicated task is borderline; while it covers the stated purpose, a server with only one tool feels thin and limits flexibility.

Completeness4/5

The tool fully covers the intended debate workflow from start to conclusion. Minor gaps like configurable rounds are absent but not critical.

Maintenance

ActivityMaintained
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/kaenozu/browser-ai-debate-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server