Skip to content

loopover_get_ams_miner_cohort has a REST route but no remote MCP tool or local stdio MCP tool #7797

Description

@JSONbored

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

  • loopover_get_ams_miner_cohort registered as a remote MCP tool in src/mcp/server.ts, category "maintainer".
  • loopover_get_ams_miner_cohort registered as a local stdio MCP tool in packages/loopover-mcp/bin/loopover-mcp.ts, calling the existing REST route.
  • No new REST route and no new human CLI verb added (both are explicitly out of scope for this issue).

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    gittensor:featureGittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.help wantedExtra attention is needed

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions