Skip to content

feat(mcp-cli): add gittensory_find_opportunities to the packages/gittensory-mcp stdio surface #2309

Description

@JSONbored

Add the same gittensory_find_opportunities tool to the packages/gittensory-mcp stdio CLI (bin/gittensory-mcp.js), so a contributor using the published npm package gets the identical cross-repo discovery capability without needing the hosted Worker. Mirrors the existing proxy pattern already used for gittensory_check_before_start in the same file (an apiPost/apiGet call against the hosted API), so the CLI stays a thin, versioned wrapper rather than reimplementing the ranking logic client-side.

Deliverables

  • Register gittensory_find_opportunities in packages/gittensory-mcp/bin/gittensory-mcp.js via server.registerTool(...), following the exact shape of the neighboring gittensory_check_before_start registration (same file, ~line 363): same inputSchema fields as the hosted tool, proxying to a new /v1/opportunities/find (or equivalent) endpoint via the file's existing apiPost helper.
  • Confirm the CLI's existing packageVersion/compatibilityPath version-negotiation guard (already present at the top of bin/gittensory-mcp.js) covers this new tool the same way it covers every existing proxied tool — i.e. no special-casing needed, just confirm via a test that an old CLI talking to a newer API degrades gracefully.
  • A unit/integration test (mirroring test/unit/mcp-discovery.test.ts's stdio-connect pattern) spawning the actual CLI binary via StdioClientTransport, calling gittensory_find_opportunities, and asserting the response shape matches the hosted tool's output schema.
  • Update packages/gittensory-mcp/README.md's tool list/table (if one exists) to include the new tool, matching how every other tool is documented there.

References

  • packages/gittensory-mcp/bin/gittensory-mcp.js line ~363 (gittensory_check_before_start registration + its apiPost proxy call) — the exact pattern to mirror for the new tool
  • test/unit/mcp-discovery.test.ts — the existing stdio-client-connect test pattern (spawns bin/gittensory-mcp.js via StdioClientTransport)
  • the companion hosted-tool issue (feat(mcp): add gittensory_find_opportunities tool to the hosted /mcp Worker) — defines the exact input/output schema this CLI proxy must match byte-for-byte

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

    Status
    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions