Skip to content

[API View] Expose endpoints to be used on mcp and cli #12149

Merged
AlitzelMendez merged 4 commits into
Azure:mainfrom
AlitzelMendez:exponse-endpoints-for-mcp
Sep 19, 2025
Merged

[API View] Expose endpoints to be used on mcp and cli #12149
AlitzelMendez merged 4 commits into
Azure:mainfrom
AlitzelMendez:exponse-endpoints-for-mcp

Conversation

@AlitzelMendez

@AlitzelMendez AlitzelMendez commented Sep 18, 2025

Copy link
Copy Markdown
Member

effort related to #12111

Copilot AI review requested due to automatic review settings September 18, 2025 02:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR exposes API endpoints to support MCP (Model Context Protocol) and CLI usage by adding token-based authentication options for existing functionality.

  • Added a new GetReviewIdForRevision endpoint to retrieve review IDs from revision IDs
  • Moved the GetReviewContentAsync endpoint to a new hybrid authentication controller that supports both token and cookie authentication
  • Cleaned up the original ReviewsController by removing unused dependencies and the moved endpoint

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
ReviewsHybridAuthController.cs New controller with hybrid authentication for the GetReviewContentAsync endpoint
ReviewsController.cs Removed GetReviewContentAsync method and cleaned up unused dependencies
APIRevisionsTokenAuthController.cs Added GetReviewIdForRevision endpoint for token-authenticated access

Comment thread src/dotnet/APIView/APIViewWeb/LeanControllers/APIRevisionsTokenAuthController.cs Outdated
@AlitzelMendez AlitzelMendez changed the title [API Vie] Expose endpoints to be used on mcp and cli [API View] Expose endpoints to be used on mcp and cli Sep 18, 2025
Comment thread src/dotnet/APIView/APIViewWeb/LeanControllers/APIRevisionsTokenAuthController.cs Outdated
Comment thread src/dotnet/APIView/APIViewWeb/LeanControllers/ReviewsHybridAuthController.cs Outdated

@tjprescott tjprescott left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some API design issues still need ironing out. Also, I think it would be helpful if we created a TypeSpec file for our public API to aid in review. The architects have said many times "why do we not review the API for the tool we use to review APIs?".

@AlitzelMendez
AlitzelMendez merged commit fb001c0 into Azure:main Sep 19, 2025
7 checks 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.

5 participants