feat(mcp): register loopover_get_contributor_profile as a local stdio MCP tool (#7760) - #7958
Conversation
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Tip ✅ LoopOver review result - approve/merge recommendedReview updated: 2026-07-21 23:08:17 UTC
Review summary Nits — 6 non-blocking
Decision drivers
Context & advisory signals — never blocks the verdict
Linked issue satisfactionAddressed Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://loopover.ai/docs/loopover-commands 🧪 Experimental — new and may change. 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7958 +/- ##
===========================================
- Coverage 89.00% 11.75% -77.25%
===========================================
Files 90 1 -89
Lines 21504 2194 -19310
Branches 3707 840 -2867
===========================================
- Hits 19139 258 -18881
+ Misses 2187 1914 -273
+ Partials 178 22 -156
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Summary
loopover_get_contributor_profilewas a remote MCP tool (src/mcp/server.ts) with acontributor-profileCLI mirror (CLI mirror for loopover_get_contributor_profile #6737), but had no local stdio MCP tool registration — so a self-host operator using the local stdio server (not the CLI or remote MCP) could not call it.loopover_monitor_open_prs, and reuses the same REST endpoint the CLI already calls (no duplicated HTTP logic).Closes #7760
Change
packages/loopover-mcp/bin/loopover-mcp.ts): registeredloopover_get_contributor_profile(loginShape) next to its sibling, with a matchingSTDIO_TOOL_DESCRIPTORSentry (discoverycategory). The tool summary is the remote tool's own fixed sentence (server.tsuses the identical string), so the two surfaces never drift; the full API payload rides along asstructuredContent.getContributorProfile(login)as the single source of truth forGET /v1/contributors/:login/profile, and pointed both the new stdio tool and the existingcontributorProfileCliat it — the CLI no longer inlines the endpoint path.contributorProfileCliis now exported (likemaintainCli) so an in-process test can drive it directly; the subprocess CLI harness is not v8-instrumentable, so this is what makes the shared call graded by Codecov.Tests
test/unit/mcp-cli-contributor-profile-inprocess.test.ts: in-process coverage (dynamicimport+InMemoryTransport, mirroringmcp-cli-plan-issues.test.ts) — the stdio tool registers and proxiesGET .../profile, url-encodes the login, and the exportedcontributorProfileCliprints the header + API summary (plain) and re-serializes the payload (--json).test/unit/mcp-tool-rename-aliases.test.ts: bumped the live stdio-tool count pin 89 → 90 (comment + three assertions).test/unit/mcp-cli-contributor-profile.test.tsis unchanged.Validation
git diff --checkclean;npm run build:mcp+ packagebuild:tsctypecheck clean.vitestsuites pass (mcp-cli-contributor-profile-inprocess,mcp-cli-contributor-profile,mcp-tool-rename-aliases,mcp-cli-tools).packages/loopover-mcp/bin/**/*.tsis in Codecov's scope (not ignored), and its coverage comes only from in-process importers. Verified fromcoverage-final.jsonthat every changed line is executed (stdio handler, the sharedgetContributorProfilecall from both the tool and the CLI) and that there are zero branches on any changed line — the summary is a fixed string, not a branchypayload.summary ?? …helper, precisely to avoid an uncovered fallback arm.UI Evidence
N/A — local stdio MCP tool + a one-line CLI refactor only; no
apps/loopover-ui/**or other visible surface changed.