Add MCP server with OAuth for Cursor, Claude, ChatGPT, and Gemini - #7
Merged
Conversation
…ini. stdio (`loadpath mcp`) for local hosts; Streamable HTTP at /mcp with PKCE, dynamic client registration, CIMD, and a consent page for remote hosts. Co-authored-by: Damon <Modsofthenation@users.noreply.github.com>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (11)
📝 WalkthroughWalkthroughThis change adds MCP access to Loadpath through local stdio and authenticated Streamable HTTP modes. It adds repository, review, architecture, and SCM tools; compact responses; OAuth 2.1 flows; CLI options; application integration; documentation; and end-to-end tests. ChangesMCP integration
Estimated code review effort: 4 (Complex) | ~60 minutes Sequence Diagram(s)sequenceDiagram
participant MCPClient
participant LoadpathOAuthProvider
participant FastAPIApp
participant MCPTools
MCPClient->>LoadpathOAuthProvider: register client and authorize with PKCE
LoadpathOAuthProvider-->>MCPClient: authorization code redirect
MCPClient->>LoadpathOAuthProvider: exchange authorization code
LoadpathOAuthProvider-->>MCPClient: access token
MCPClient->>FastAPIApp: MCP request with bearer token
FastAPIApp->>LoadpathOAuthProvider: validate access token
FastAPIApp->>MCPTools: execute requested tool
MCPTools-->>MCPClient: compact MCP response
Possibly related PRs
Suggested reviewers: ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Co-authored-by: Damon <Modsofthenation@users.noreply.github.com>
Co-authored-by: Damon <Modsofthenation@users.noreply.github.com>
Modsofthenation
marked this pull request as ready for review
August 15, 2026 01:00
This was referenced Aug 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Loadpath’s review loop lived in the local app and CLI. Cursor, Claude, ChatGPT, and Gemini can all speak MCP; remote hosts also expect OAuth 2.1 on Streamable HTTP.
What changed
loadpath mcp— stdio MCP for Cursor / Claude Desktop. No OAuth; the process is already the user’s.loadpath servehosts Streamable HTTP MCP at/mcpwith an in-process OAuth 2.1 authorization server:--oauth-pin)--public-urlfor HTTPS tunnels (Claude / ChatGPT / Gemini)list_workspaces,init_repo,index_repo,architecture,review,detect_repo,list_pull_requests,post_review_comment.reviewreturns the brief (confidence, sinks, reviewers), not the full graph.The local UI and
/api/*stay unauthenticated. MCP HTTP requires a Bearer token.Tests
pytest -m "not playwright"(includingtests/e2e/test_mcp_oauth.py: metadata, DCR+PKCE, consent, CIMD, billing-path review).Summary by CodeRabbit
New Features
/mcp.Documentation
Tests