Context
GET /v1/repos/:owner/:repo/ams-miner-cohort (src/api/routes.ts:3072) returns the AMS-vs-human contributor-mix dashboard comparison (buildAmsMinerCohortComparison), gated by requireRepoMaintainer — the exact same per-repo maintainer gate loopover_get_maintainer_noise uses. The route's own comment even says it "mirrors maintainer-noise above." Despite that, it has no remote MCP tool (nothing in MCP_TOOL_CATEGORIES or the register(...) block in src/mcp/server.ts) and no local stdio MCP tool (packages/loopover-mcp/bin/loopover-mcp.ts) — it's reachable only over raw HTTP by a maintainer's own session or a maintainer-authenticated static token.
Requirements
⚠️ Required pattern — mirror loopover_get_maintainer_noise's two-surface shape exactly (src/mcp/server.ts:1923-1930, stdio registration packages/loopover-mcp/bin/loopover-mcp.ts:1459-1467). That tool has no separate human CLI verb either — do not invent one for this tool; the local stdio registration alone is the correct scope, matching maintainer-noise, label-audit, and maintainer-lane's existing precedent.
- Register
loopover_get_ams_miner_cohort as a remote MCP tool in src/mcp/server.ts, using ownerRepoShape as the input schema (same shape loopover_get_maintainer_noise uses) and calling the existing GET /v1/repos/:owner/:repo/ams-miner-cohort route's underlying buildAmsMinerCohortComparison (or the route itself, matching whichever pattern getMaintainerNoise's private method already uses).
- Add
loopover_get_ams_miner_cohort to MCP_TOOL_CATEGORIES as "maintainer" (the category loopover_get_maintainer_noise and loopover_get_gate_precision already use).
- Register
loopover_get_ams_miner_cohort as a local stdio MCP tool in packages/loopover-mcp/bin/loopover-mcp.ts, calling GET ${repoBase}/ams-miner-cohort via the existing apiGet helper — mirror the loopover_get_maintainer_noise stdio block exactly.
- Do not add a new human-typable CLI verb (e.g.
loopover-mcp ams-miner-cohort) — out of scope, matching the sibling tool's own surface.
- Do not change
buildAmsMinerCohortComparison, the REST route, or its requireRepoMaintainer gate — this is purely about adding the two missing mirror surfaces.
Deliverables
Test Coverage Requirements
src/mcp/server.ts and packages/loopover-mcp are both covered by this repo's Codecov patch gate — 99%+ on every changed line/branch. Add a unit test for the new remote-tool registration (mirroring whatever existing test covers loopover_get_maintainer_noise's remote registration) and a stdio-tool test matching the existing convention for sibling tools (check packages/loopover-mcp's own coverage.include scoping before assuming it's identical to the top-level src/** gate).
Expected Outcome
loopover_get_ams_miner_cohort is callable via remote MCP and local stdio MCP, matching its existing REST route — a maintainer or self-host operator can pull the AMS-vs-human cohort comparison through any MCP client, not just raw HTTP.
Links & Resources
src/api/routes.ts:3072 (existing REST route, requireRepoMaintainer-gated)
src/mcp/server.ts:1923-1930, packages/loopover-mcp/bin/loopover-mcp.ts:1459-1467 (the loopover_get_maintainer_noise two-surface pattern to mirror)
src/mcp/server.ts:1798-1890 (MCP_TOOL_CATEGORIES map, where the new entry belongs)
Context
GET /v1/repos/:owner/:repo/ams-miner-cohort(src/api/routes.ts:3072) returns the AMS-vs-human contributor-mix dashboard comparison (buildAmsMinerCohortComparison), gated byrequireRepoMaintainer— the exact same per-repo maintainer gateloopover_get_maintainer_noiseuses. The route's own comment even says it "mirrors maintainer-noise above." Despite that, it has no remote MCP tool (nothing inMCP_TOOL_CATEGORIESor theregister(...)block insrc/mcp/server.ts) and no local stdio MCP tool (packages/loopover-mcp/bin/loopover-mcp.ts) — it's reachable only over raw HTTP by a maintainer's own session or a maintainer-authenticated static token.Requirements
loopover_get_ams_miner_cohortas a remote MCP tool insrc/mcp/server.ts, usingownerRepoShapeas the input schema (same shapeloopover_get_maintainer_noiseuses) and calling the existingGET /v1/repos/:owner/:repo/ams-miner-cohortroute's underlyingbuildAmsMinerCohortComparison(or the route itself, matching whichever patterngetMaintainerNoise's private method already uses).loopover_get_ams_miner_cohorttoMCP_TOOL_CATEGORIESas"maintainer"(the categoryloopover_get_maintainer_noiseandloopover_get_gate_precisionalready use).loopover_get_ams_miner_cohortas a local stdio MCP tool inpackages/loopover-mcp/bin/loopover-mcp.ts, callingGET ${repoBase}/ams-miner-cohortvia the existingapiGethelper — mirror theloopover_get_maintainer_noisestdio block exactly.loopover-mcp ams-miner-cohort) — out of scope, matching the sibling tool's own surface.buildAmsMinerCohortComparison, the REST route, or itsrequireRepoMaintainergate — this is purely about adding the two missing mirror surfaces.Deliverables
loopover_get_ams_miner_cohortregistered as a remote MCP tool insrc/mcp/server.ts, category"maintainer".loopover_get_ams_miner_cohortregistered as a local stdio MCP tool inpackages/loopover-mcp/bin/loopover-mcp.ts, calling the existing REST route.Test Coverage Requirements
src/mcp/server.tsandpackages/loopover-mcpare both covered by this repo's Codecov patch gate — 99%+ on every changed line/branch. Add a unit test for the new remote-tool registration (mirroring whatever existing test coversloopover_get_maintainer_noise's remote registration) and a stdio-tool test matching the existing convention for sibling tools (checkpackages/loopover-mcp's owncoverage.includescoping before assuming it's identical to the top-levelsrc/**gate).Expected Outcome
loopover_get_ams_miner_cohortis callable via remote MCP and local stdio MCP, matching its existing REST route — a maintainer or self-host operator can pull the AMS-vs-human cohort comparison through any MCP client, not just raw HTTP.Links & Resources
src/api/routes.ts:3072(existing REST route,requireRepoMaintainer-gated)src/mcp/server.ts:1923-1930,packages/loopover-mcp/bin/loopover-mcp.ts:1459-1467(theloopover_get_maintainer_noisetwo-surface pattern to mirror)src/mcp/server.ts:1798-1890(MCP_TOOL_CATEGORIESmap, where the new entry belongs)