Skip to content

Add ChatGPT OAuth login mode#1

Merged
ZeroPointSix merged 12 commits into
mainfrom
codexweb/chatgpt-login-adapter
Jun 13, 2026
Merged

Add ChatGPT OAuth login mode#1
ZeroPointSix merged 12 commits into
mainfrom
codexweb/chatgpt-login-adapter

Conversation

@ZeroPointSix

Copy link
Copy Markdown
Owner

Summary

Adds an opt-in ChatGPT-compatible mode for chrome-devtools-mcp:

  • --chatgpt starts a Streamable HTTP MCP server while keeping default stdio behavior unchanged.
  • /mcp supports authenticated Streamable HTTP sessions.
  • OAuth discovery, dynamic client registration, PKCE authorization-code login, and token exchange are exposed for ChatGPT connector login.
  • Static Bearer token auth remains available for direct testing.
  • Adds Docker deployment support and setup documentation.

Temporary VPS Deployment

Live test deployment:

Runtime secrets are stored on the VPS in /root/chrome-devtools-mcp-chatgpt.env and are not included in the repository or this PR.

Validation

Passed:

  • Docker image build from deploy/chatgpt.Dockerfile
  • Focused HTTP/OAuth test: npm run test:no-build tests/chatgpt-http-server.test.ts
  • Public /health returns HTTP 200
  • OAuth authorization-server metadata returns expected endpoints
  • OAuth protected-resource metadata returns expected resource/auth server references
  • Unauthenticated /mcp returns 401 with WWW-Authenticate resource metadata
  • Static Bearer token MCP initialize works over public HTTPS
  • Static Bearer token tools/list works over the same session and returns 29 tools
  • Dynamic OAuth client registration works
  • PKCE authorize + token exchange works
  • OAuth Bearer token MCP initialize works over public HTTPS

Not fully green yet:

  • Full test run in a plain node:22-bookworm container failed because Chrome was not installed.
  • Full test run inside the built Chrome image ran through many tests but exited non-zero late with repeated TargetCloseError: Protocol error (Target.setDiscoverTargets): Target closed failures. This looks like Docker/Chrome test environment instability rather than a direct failure of the ChatGPT HTTP/OAuth path.
  • Required remote sandbox testing was blocked by the known schema mismatch where the tool backend requires note but the exposed schema rejects it, so VPS validation was used instead.

Trace

Detailed workspace notes: docs/workspace/2026-06-13-codexweb-chatgpt-login-adapter.md

Copy link
Copy Markdown
Owner Author

CodexWeb deployment note for this draft:

  • Temporary VPS deployment is live at https://tmp1.zerodotsix.top/mcp with health at https://tmp1.zerodotsix.top/health.
  • Docker build for deploy/chatgpt.Dockerfile passed after adding .dockerignore and fixing build dependency ordering.
  • Focused ChatGPT HTTP/OAuth test passed: npm run test:no-build tests/chatgpt-http-server.test.ts.
  • Public validation passed for health, OAuth metadata, unauthenticated 401 discovery header, static Bearer MCP initialize/tools list, dynamic client registration, PKCE login, token exchange, and OAuth Bearer MCP initialize.
  • Full suite is not green in the current Docker test environment: one run lacked Chrome, and the Chrome image run exited late with repeated TargetCloseError: Protocol error (Target.setDiscoverTargets): Target closed failures. This needs a CI or Chrome-capable sandbox rerun before marking ready.
  • Required remote sandbox validation was blocked by the known schema mismatch where the backend requires note but the exposed schema rejects it, so VPS validation was used for now.

Detailed notes are in docs/workspace/2026-06-13-codexweb-chatgpt-login-adapter.md.

Copy link
Copy Markdown
Owner Author

CodexWeb temporary deployment update:

  • The VPS test deployment login secret was reset to the user-provided temporary test value for ChatGPT UI validation.
  • The container chrome-devtools-mcp-chatgpt-test was restarted and is healthy.
  • Public health check passes at https://tmp1.zerodotsix.top/health.
  • OAuth /authorize smoke check with the updated secret returned HTTP 302 to the ChatGPT callback with the authorization code redacted from logs.

The test secret itself is intentionally not written into this PR comment.

@ZeroPointSix ZeroPointSix marked this pull request as ready for review June 13, 2026 08:05
@ZeroPointSix ZeroPointSix merged commit 16e411d into main Jun 13, 2026

Copy link
Copy Markdown
Owner Author

CodexWeb merge closeout:

  • PR Add ChatGPT OAuth login mode #1 was marked ready and merged into main.
  • Merge commit: 16e411d26d67ded5a96aea89f9a886947ae2ce46.
  • The merge used the previously validated head SHA df9bdba01ae19c89c4cd1c09b33cad7c7e19818b.
  • The temporary VPS test service at https://tmp1.zerodotsix.top/mcp was intentionally left running unchanged per user request.
  • Known follow-up remains: rerun the full suite in CI or a Chrome-capable sandbox when available; prior focused HTTP/OAuth and public VPS smoke validations passed.

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.

1 participant