Skip to content

feat(mcp): improve Claude Code ChatGPT browser consults#149

Closed
pdurlej wants to merge 6 commits into
steipete:mainfrom
pdurlej:pdurlej/mcp-let-them-fight
Closed

feat(mcp): improve Claude Code ChatGPT browser consults#149
pdurlej wants to merge 6 commits into
steipete:mainfrom
pdurlej:pdurlej/mcp-let-them-fight

Conversation

@pdurlej
Copy link
Copy Markdown
Contributor

@pdurlej pdurlej commented Apr 30, 2026

Summary

Adds a focused Claude Code / MCP browser-consult path without adding new MCP tools or changing unrelated API defaults.

  • Adds MCP consult preset chatgpt-pro-heavy.
  • Adds MCP dryRun:true so Claude/Codex can inspect the resolved Oracle run without opening Chrome or creating a session.
  • Adds MCP browserModelStrategy passthrough for parity with the CLI.
  • Adds oracle bridge claude-config --local-browser plus explicit --oracle-home-dir and --browser-profile-dir overrides for macOS/local Claude Code setups.
  • Documents the "Let Them Fight" workflow: Claude Code asks Oracle, Oracle asks ChatGPT browser mode, and the answer returns through MCP.

The preset targets gpt-5.5-pro directly, matching the current upstream model support from #156.

Public API

  • MCP consult:
    • preset?: "chatgpt-pro-heavy"
    • dryRun?: boolean
    • browserModelStrategy?: "select" | "current" | "ignore"
  • Bridge CLI:
    • oracle bridge claude-config --local-browser
    • --oracle-home-dir <path>
    • --browser-profile-dir <path>

PR / Issue Map

Validation

Latest branch head: ab735615; no code changes were needed in the final May 4 PR-body cleanup.

  • pnpm install --frozen-lockfile -> passed, including prepare/build
  • pnpm vitest run tests/mcp/consult.test.ts tests/cli/bridgeClaudeConfig.test.ts -> 2 files passed, 8 tests passed
  • pnpm run check -> passed
  • pnpm run build -> passed
  • pnpm test -> 107 files passed / 18 skipped, 656 tests passed / 41 skipped
  • pnpm run test:mcp:unit -> 5 files passed, 7 tests passed
  • pnpm run test:mcp:mcporter -> passed
  • MCP dry-run smoke: preset:chatgpt-pro-heavy, dryRun:true returned browser mode with gpt-5.5-pro and did not create a session or touch Chrome.
  • git diff --check -> passed
  • GitHub: mergeable, GitGuardian green

@pdurlej pdurlej force-pushed the pdurlej/mcp-let-them-fight branch from 946bb63 to ab73561 Compare May 3, 2026 18:35
@pdurlej
Copy link
Copy Markdown
Contributor Author

pdurlej commented May 3, 2026

Rebuilt this branch cleanly on current upstream/main and pushed as ab735615.

Rebase notes:

  • Dropped the old stacked GPT-5.5 browser/model commits that are now covered by [codex] support GPT-5.5 Pro #156.
  • Kept this PR focused on MCP consult ergonomics and Claude Code local-browser config.
  • Updated preset:"chatgpt-pro-heavy" to target the current gpt-5.5-pro model directly instead of the older gpt-5-pro alias.

Local validation on macOS:

  • pnpm install --frozen-lockfile -> passed, including prepare/build
  • pnpm vitest run tests/mcp/consult.test.ts tests/cli/bridgeClaudeConfig.test.ts -> 2 files passed, 8 tests passed
  • pnpm run check -> passed
  • pnpm run build -> passed
  • pnpm test -> 107 files passed / 18 skipped, 656 tests passed / 41 skipped
  • pnpm run test:mcp:unit -> 5 files passed, 7 tests passed
  • pnpm run test:mcp:mcporter -> passed
  • MCP dry-run smoke: preset:chatgpt-pro-heavy, dryRun:true returned browser mode with gpt-5.5-pro and did not create a session or touch Chrome.
  • git diff --check -> passed

No secrets or account details included.

@pdurlej
Copy link
Copy Markdown
Contributor Author

pdurlej commented May 4, 2026

Final refresh from my side:

  • No code changes in this last cleanup pass; I refreshed the PR body with the latest scope/test notes.
  • Current head: ab735615.
  • This remains intentionally narrow: MCP/Claude consult ergonomics and local Claude Code browser config, without pulling in the tab scheduler or Deep Research work.
  • Previously validated with focused MCP/bridge tests, pnpm run test:mcp:unit, pnpm run test:mcp:mcporter, pnpm run check, pnpm run build, pnpm test, and dry-run consult coverage.
  • GitGuardian is green and GitHub currently reports the PR as mergeable.

@steipete
Copy link
Copy Markdown
Owner

steipete commented May 4, 2026

Thanks @pdurlej. I shipped the cleaned-up version of this on main as dbef347.

What landed:

  • consult preset chatgpt-pro-heavy, hard-coded to gpt-5.5-pro with heavy browser thinking by default.
  • MCP dryRun: true support so callers can inspect the resolved Oracle run without opening Chrome or creating a session.
  • MCP browserModelStrategy passthrough for parity with the CLI.
  • oracle bridge claude-config --local-browser plus explicit local path overrides for same-Mac Claude Code + signed-in ChatGPT browser workflows.
  • README, MCP docs, bridge docs, and changelog coverage.

I didn’t merge the PR branch directly because it had become stale against current main and included unrelated browser churn after recent merged work. I replayed the focused commits onto current main and added one fix while landing: bridge config generators now keep stdout machine-readable, so oracle bridge claude-config --local-browser > .mcp.json produces valid JSON instead of including the oracle banner/tip text. There is also a CLI regression test for that.

Validation before push:

  • pnpm vitest run tests/mcp/consult.test.ts tests/cli/bridgeClaudeConfig.test.ts -> 9 passed
  • pnpm run check -> passed
  • pnpm run build -> passed
  • pnpm test -> 109 files passed / 18 skipped, 703 tests passed / 42 skipped
  • manual stdout parse for node dist/bin/oracle-cli.js bridge claude-config --local-browser -> valid JSON

Closing this PR because the cleaned-up implementation is now on main. Appreciate the focused MCP/Claude Code workflow work.

@steipete steipete closed this May 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants