Skip to content

refactor: source OAuth proxy from shared bes-mcp-oauth package - #5

Merged
julianam-w merged 1 commit into
mainfrom
extract-bes-mcp-oauth
Aug 15, 2026
Merged

refactor: source OAuth proxy from shared bes-mcp-oauth package#5
julianam-w merged 1 commit into
mainfrom
extract-bes-mcp-oauth

Conversation

@julianam-w

Copy link
Copy Markdown
Collaborator

Summary

Extracts the Google OAuth proxy (rag/oauth_proxy.py + rag/auth.py) into the
shared bes-mcp-oauth
package (v0.1.0) so every BES MCP server uses one implementation.
mcp_server.py now imports GoogleOAuthProxyProvider from the package, and the
two modules are removed here. This unblocks tupaia-metadata-mcp (and future
servers) reusing the same OAuth without copying code.

Net −476 / +14 lines: an added dependency + one import line, minus the two
relocated modules.

Test plan

  • uv lock resolves bes-mcp-oauth @ v0.1.0 (added; 76 packages).
  • uv sync --no-dev installs it from the tag.
  • Import check passes: import mcp_server; from bes_mcp_oauth import GoogleOAuthProxyProvider, GoogleTokenVerifier — the provider resolves from bes_mcp_oauth.oauth_proxy, no ImportError.
  • Not yet exercised: a live Google browser sign-in. Recommend a smoke test on the next Railway deploy from this branch before merge (import parity makes a regression unlikely).

Risk / rollback

Low — pure code relocation, no behaviour change; the package contains the same
code verbatim (only oauth_proxy.py's internal import made package-relative).
Rollback: revert this commit (restores the in-repo modules) and redeploy.

Extract the Google OAuth proxy (oauth_proxy.py + auth.py) into the shared bes-mcp-oauth package so BES MCP servers (bes-codebases, tupaia-metadata-mcp, ...) share one implementation. Behaviour is unchanged: mcp_server imports GoogleOAuthProxyProvider from the package, and the two modules are removed here. Verified with uv sync + an import check.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@julianam-w
julianam-w merged commit 5987b78 into main Aug 15, 2026
@julianam-w
julianam-w deleted the extract-bes-mcp-oauth branch August 15, 2026 23:31
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