Skip to content
Code Recycle

MCP server

The Model Context Protocol server exposes the same governed marketplace as the REST API, but as tools an agent runtime — Claude Code, Cursor, or any MCP-speaking client — can call directly over stdio. It adds no authority of its own: every call runs under the calling API key's principal, scopes, and budgets.

Connect it (Claude Code)

One-command install — the plugin ships the MCP server, a search-before-build skill, and an optional prompt hook that checks the marketplace before your agent rebuilds something that already exists:

claude plugin marketplace add michaelcho87/coderecycle-plugin
claude plugin install code-recycle

Any other MCP client (Cursor, etc.): clone the plugin repo and point your config at the bundled server:

{
  "mcpServers": {
    "code-recycle": {
      "command": "node",
      "args": ["<path>/coderecycle-plugin/servers/amos-mcp.mjs"],
      "env": {
        "CODE_RECYCLE_API_KEY": "amos_agent_..."
      }
    }
  }
}

Issue CODE_RECYCLE_API_KEYfor an agent principal from your organization’s agent settings — not your personal login key — so scopes and budgets stay scoped to that agent, not to you.

What it costs your agent, measured with a real one over eight tasks: two tool definitions (about 530 tokens a session), a search reply of 250–600 tokens that opens with a verdict line (strong / weak / none), and usually one call. A Sonnet-class or local model decided as well as Opus here at a third of the price or none. Calling the Messages API yourself? Put cache_controlon the tool list and system prompt — Claude Code already does — it cut the bill 41% in our runs.

Tools (19)

Discovery & planning

10 tools

Understand the catalog before spending anything.

  • search_catalog

    Natural-language search, or a GitHub URL / owner/repo for the brief on that repo. Read match.verdict first (strong / weak / none, with one sentence of guidance); a none verdict means nothing here fits and retrying with other words will not help. Returns grounded, explained results, inferred needs, and gaps the catalog can't cover.

  • inspect_product

    Full detail for one product: manifest, capabilities, offers, licenses, trust passport, versions, advisories, relationships.

  • compare_products

    Compare 2–6 products across a capability matrix with offers and trust.

  • plan_solutionneeds a key

    Assemble a compatible multi-product stack for an objective — real catalog products only; unfilled gaps reported honestly.

  • check_compatibility

    Check declared compatibility and conflicts between 2–10 products.

  • estimate_total_costneeds a key

    Estimate one-time and recurring cost for a set of offers.

  • find_similar

    Given one product, find semantically similar alternatives in the catalog.

  • find_for_my_project

    Describe your project and get listings matched to what it actually needs.

  • get_agent_brief

    A compact, machine-readable brief on one product, written for an agent deciding whether to use it.

  • export_customization_context

    Export the context a coding agent needs to customize a product you have licensed.

Commerce

4 tools

Priced, policy-evaluated, auditable — every step.

  • get_quotescope: quote

    Create a formal quote with server-side pricing.

  • request_purchasescope: purchase:request or purchase:auto

    Request a purchase from a quote. Clears immediately within policy (demo payment + entitlements returned); otherwise returns approval_requested for a human to decide. Idempotent on idempotencyKey.

  • get_purchase_status

    Get an order's state. Resumes payment and entitlement issuance idempotently once a human has approved it.

  • list_entitlements

    List the organization's active entitlements and machine-readable rights.

Invocation

1 tool

Actually calling a product your organization purchased.

  • invoke_servicescope: invoke

    Invoke a purchased product's demo API. Entitlement-gated, metered, and audited.

Trust & updates

4 tools

Stay current, and feed real outcomes back into Trust Passports.

  • check_updates

    Updates and security advisories relevant to owned entitlements.

  • subscribe_to_updates

    Subscribe the organization to a product's update channel (stable, beta, or security).

  • report_installation_outcome

    Report whether an installation succeeded — feeds Trust Passports and ranking.

  • report_runtime_outcome

    Report runtime health (uptime, error rate) for a product this org runs — feeds maintenance signals.

A read-only resource, amos://catalog/overview, is also published (catalog statistics by product type) — resources are for ambient context, not actions, so they aren’t counted among the tools above.

The governance model

MCP is a transport, not a trust boundary. Every tool call resolves to an agent principal — a governed identity distinct from the human who owns the organization — and every commerce action is evaluated server-side before anything spends.

Scopes

Each agent principal carries an explicit scope list (e.g. quote, purchase:request, invoke). A tool call missing a required scope fails closed with an explicit error, never a silent downgrade.

Budgets

Per-transaction caps, daily and monthly spend caps, and a separate cap on newly committed recurring spend are all checked before a purchase clears. Exceeding any of them routes to approval instead of failing outright.

Approvals

When policy requires approval, the order sits in approval_requested until a human decides. Agents cannot approve their own purchase requests — the decision path explicitly rejects any credential carrying an agent-principal id.

Every quote, order, invocation, and decision is written to an audit trail readable via GET /audit-events in the REST API — MCP convenience never comes at the cost of visibility.