Feature request: expose an MCP server so AI agents can interact with PRs and issues
Maintainer antworten meist innerhalb von 1 Tag
@alexr00 arbeitet bereits daran.
Seit 16.10.2026.
Bewertung
Dieses Issue wurde noch nicht bewertet.
Beschreibung
Summary
Add a Model Context Protocol (MCP) server to the extension so that AI coding agents running inside VS Code (Claude Code, GitHub Copilot extensions, etc.) can programmatically invoke the extension's PR and issue capabilities without a human clicking UI elements.
Motivation
The extension already exposes a rich set of commands through VS Code's command palette. Agents like Claude Code can call vscode.commands.executeCommand, but that requires the agent to be running inside VS Code and to know the exact command IDs. An MCP server would give any MCP-capable agent a stable, discoverable, schema-validated interface, regardless of how it is hosted.
Concretely: when an agent is working a PR (rebasing, fixing CI, iterating on review feedback) it currently has to shell out to gh CLI for everything. If the extension exposed an MCP server the agent could instead call typed tools and get back structured data that matches what the extension already knows — open diffs, review threads, CI status, notifications — without leaving the editor context.
Proposed tool groups
The list below was derived by querying contributes.commands from the extension's package.json and grouping commands by functional area. Each group maps naturally to one or more MCP tools.
Pull request lifecycle
| MCP tool | Source commands |
|---|---|
create_pull_request |
pr.create, pr.pushAndCreate, pr.createPrMenuCreate, pr.createPrMenuDraft |
get_pull_request |
pr.openDescription, pr.refreshPullRequest, pr.refreshList |
checkout_pull_request |
pr.pick, pr.checkoutByNumber, pr.checkoutFromDescription, pr.pickInWorktree, pr.pickInWorktreeFromDescription |
merge_pull_request |
pr.merge, pr.acceptMerge, pr.createPrMenuMerge, pr.createPrMenuMergeWhenReady, pr.createPrMenuRebase, pr.createPrMenuSquash |
mark_ready_for_review |
pr.readyForReview, pr.readyForReviewAndMerge |
get_pull_request_diff |
pr.openChanges, pr.openDiffView, pr.showDiffAll, pr.showDiffSinceLastReview |
add_to_stack |
pr.addToStack |
generate_title_and_description |
pr.generateTitleAndDescription |
Review
| MCP tool | Source commands |
|---|---|
start_review |
pr.startReview, pr.preReview |
submit_review |
review.approve, review.requestChanges, review.comment |
create_review_comment |
pr.createComment, pr.createSingleComment, pr.addFileComment |
edit_review_comment |
pr.editComment, pr.saveComment, pr.deleteComment |
resolve_review_thread |
pr.resolveReviewThread, pr.unresolveReviewThread |
create_suggestion |
pr.makeSuggestion, review.createSuggestionFromChange, review.createSuggestionsFromChanges |
apply_suggestion |
pr.applySuggestion, pr.applySuggestionWithCopilot |
mark_file_viewed |
pr.markFileAsViewed, pr.unmarkFileAsViewed, pr.resetViewedFiles |
diff_with_pr_head |
review.diffWithPrHead, review.diffLocalWithPrHead, pr.diffOutdatedCommentWithHead |
Issues
| MCP tool | Source commands |
|---|---|
create_issue |
issue.createIssue, issue.createIssueFromSelection, issue.createIssueFromClipboard, issue.createIssueFromFile |
get_issue |
issue.openIssue, issue.openDescription, issue.getCurrent |
start_working_on_issue |
issue.startWorking, issue.startWorkingBranchPrompt |
stop_working_on_issue |
issue.stopWorking |
copy_issue_link |
issue.copyIssueUrl, issue.copyIssueNumber, issue.copyGithubPermalink |
Notifications
| MCP tool | Source commands |
|---|---|
list_notifications |
notifications.refresh |
mark_notification_read |
notification.markAsRead, notifications.markPullRequestsAsRead |
mark_notification_done |
notification.markAsDone, notifications.markPullRequestsAsDone |
summarize_notification |
notification.chatSummarizeNotification |
Metadata helpers (new PR creation)
| MCP tool | Source commands |
|---|---|
add_assignees |
pr.addAssigneesToNewPr |
add_reviewers |
pr.addReviewersToNewPr |
add_labels |
pr.addLabelsToNewPr |
add_milestone |
pr.addMilestoneToNewPr |
add_projects |
pr.addProjectsToNewPr |
Implementation notes
- The MCP server can be registered via
vscode.lm.registerMcpServer(available since VS Code 1.99) and activated lazily when an MCP-capable client connects. - For read-only tools (
get_pull_request,list_notifications, …) the server can delegate directly to the extension's existing data models — no extra GitHub API calls needed. - For write tools (
submit_review,merge_pull_request, …) a confirmation prompt to the user would be appropriate before the first call, similar to how Copilot Edits asks for approval. - The
github.api.preloadPullRequestinternal command suggests there is already an API surface; the MCP server could build on that.
Alternatives considered
- Using the
ghCLI: works but has no awareness of what the extension has already fetched; forces duplicate API calls and loses the extension's diff/comment context. - VS Code Language Model tools: the
vscode.lmtool registration API is closer but limited to Copilot Chat inside VS Code; MCP reaches agents running outside the editor.
Related
- MCP spec: https://modelcontextprotocol.io/
- VS Code MCP extension hosting docs: https://code.visualstudio.com/api/extension-guides/mcp
- Vorherrschende Sprache
- TypeScript
- Sterne
- 2.6k
- Forks
- 805
- Ø Merge
- 1 T. 23 Std.
- Gemergte PRs (30 T.)
- 41
Entwicklungsumgebung
Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus microsoft/vscode-pull-request-github
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
microsoft/vscode-pull-request-github#9072 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Issue 3 — DocumentationOffen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
microsoft/vscode-pull-request-github#8792 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Plugin no longer gives access to GitHub issues while using personal account.Evtl. vergeben @alexr00 hat das vor 2 Tagen übernommen. Offeninfo-needed
microsoft/vscode-pull-request-github#9064 · 2 Kommentare · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
Dependabot PR description is blank in VS Code but renders correctly on GitHubEvtl. vergeben @alexr00 hat das vor 3 Tagen übernommen. Offen
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 50/100
microsoft/vscode-pull-request-github#9063 · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
Configurable issue completion triggerEvtl. vergeben @alexr00 hat das vor 3 Tagen übernommen. Offen
microsoft/vscode-pull-request-github#9062 · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in microsoft/vscode-pull-request-github
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
polarsource/polar#15580 ·
Maintainer antworten meist innerhalb von 1 Tag
-
accepted bug via-triage
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 69/100
pingdotgg/t3code#20931 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug/1-unconfirmed kind/bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 83/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
ranxianglei/billion-context#3583 ·
Maintainer antworten meist innerhalb von 1 Tag