Docs

Quick setup.

Remote MCP works without an account at https://buyapi.ai/api/mcp. Use the CLI when you want guided setup, local fallback, or private stack sync.

§ Setup

~/.claude/mcp_servers.json
{
  "mcpServers": {
    "buyapi": {
      "url": "https://buyapi.ai/api/mcp"
    }
  }
}

Once connected, ask your agent recommend an email api for a side project. The tool call happens automatically — no wrapper library, no CLI.

Local fallback for clients without remote MCP
{
  "mcpServers": {
    "buyapi": {
      "command": "npx",
      "args": ["-y", "buyapi", "mcp"]
    }
  }
}

§ Stack sync

The scanner inspects project files on your machine. Plain scan shows a local preview first and can ask before saving; dry-run never uploads. Sync requires an API key and saves detected tools to your private dashboard.

$npx buyapi setup cursor# or codex / claude-code
$npx buyapi scan# run from project dir
$npx buyapi login# for sync / higher limits
$npx buyapi scan --sync --yes# in project dir

Today the scanner uses rules bundled in the open-source package: package names, framework config files, common service directories, and safe `.env.example` key names. Source files and environment values are not uploaded; only tool IDs, categories, confidence, and detection notes are saved.

§ Tools

Seven MCP tools. Agents can discover vendors, fetch sourced detail, inspect evidence, find similar stacks, compare head-to-head options, run directional cost math, or jump straight to a complete stack recommendation.

vendors.resolveFirst stop for category-specific vendor recommendations. Take a user question and optional category; return ranked vendor IDs, or an explicit not-in-corpus result.

Parameters

query
The user's question or task
required
category
database · auth · hosting · payments · email · ui-components
optional

Returns

A short list of vendor IDs plus, for covered category queries, a top-3 decision matrix with fit labels, confidence, tradeoffs, cost notes, freshness, and sources.

vendors.detailsFollow-up for one known vendor — pricing tiers, limits, feature grid, gotchas, comparisons, and source provenance.

Parameters

vendorId
BuyAPI vendor ID (e.g., /database/neon)
required
query
The specific question to tune the response
optional

Returns

A structured vendor profile with pricing, limits, features, known issues, comparisons, company facts, claims, freshness, and confidence.

vendors.evidenceTrust follow-up: fetch reviewed evidence rows for a vendor, category, stack, or comparison.

Parameters

subjectType
vendor · category · stack · comparison
required
subjectId
e.g. /database/supabase or database
required
limit
Maximum evidence rows
optional

Returns

Reviewed evidence rows with source type, summary, stance, confidence, source URL, author, and observed date.

stacks.findSimilarFind reviewed public stack profiles related to a vendor, or recent curated stack examples.

Parameters

vendorId
Optional BuyAPI vendor ID
optional
limit
Maximum stack profiles
optional

Returns

Public stack profiles with project summary, audience, stage, tools, roles, and confidence.

vendors.compareCompare two or more already-known vendors for a stated workload or decision.

Parameters

vendorIds
BuyAPI vendor IDs, e.g. /database/convex
required
query
The user's decision context
required
workload
Explicit workload assumptions
optional

Returns

A decision matrix with fit, tradeoffs, estimated monthly cost, confidence, freshness, and sources.

vendors.estimateCostRun directional BuyAPI cost estimates from reviewed pricing claims and explicit workload inputs.

Parameters

workload
users, MAU, storage GB, email sends, auth MAU, regions, seats, payments volume, notes
required
vendorIds
Specific BuyAPI vendor IDs
optional
category
Estimate across a category in the current corpus
optional

Returns

Cost estimates with basis, assumptions, unknowns, confidence, and source provenance. Missing workload fields become assumptions, not fabricated precision. Verify exact billing in first-party docs, vendor CLIs, or vendor MCPs before purchase or production decisions.

stacks.recommendOne call, full stack. Give BuyAPI a project description, constraints, and optional workload; get one pick per layer plus structured reasoning.

Parameters

projectDescription
What you're building (a sentence or two)
required
constraints
Budget, scale, compliance, existing tools
optional
workload
Explicit workload assumptions
optional
stackContext
Existing tools from a repo scan or saved stack
optional

Returns

The same core recommendation shape as /api/recommend: stack, decisionMatrix, costEstimate, assumptions, unknowns, alternatives, sources, and generatedAt.

§ Vendor IDs and workload hints

BuyAPI vendor IDs use /category/slug. Use exact IDs when you already know the tools you want compared.

/database/convex
/database/supabase
/database/neon
/auth/clerk
/hosting/vercel
/payments/stripe
/email/resend
/ui-components/shadcn-ui

The strongest prompts include real workload numbers: monthly active users, team seats, storage GB, email sends, auth MAU, regions, transaction volume, and budget ceiling. Use BuyAPI for the vendor decision, then pair it with Context7 or first-party docs for exact implementation APIs and version-specific code examples.

§ REST API

For non-MCP clients (scripts, web apps, your own agent frame). The same data; plain HTTPS.

GET/api/vendors/search

?query=...&category=...

{ results, decisionMatrix? } where category queries can include the same top-3 fit matrix used by vendors.resolve

GET/api/vendors/[...slug]

e.g., /api/vendors/database/neon

Full VendorProfile object (see Tools → vendors.details for shape)

POST/api/recommend

body: { projectDescription, constraints?, workload?, stackContext? }

{ stack, decisionMatrix, costEstimate, assumptions, unknowns, alternatives, sources, generatedAt }

GET/api/evidence

?subjectType=vendor&subjectId=/database/neon&limit=8

{ evidence } reviewed evidence rows with source URLs, stance, confidence, and observed dates

GET/api/stacks/similar

?vendorId=/database/convex&limit=6

{ stacks } public stack profiles with tools, roles, stage, audience, and confidence

All endpoints return JSON. No auth required at default rate limits — see below.

§ Rate limits

Anonymous

10 / min

Default. No setup, no account.

With key

60 / min

Sign in, create a dashboard API key, or run npx buyapi login for CLI-managed key storage.

10/min is plenty for a single developer — an agent makes 1–3 calls per real question. If you're rate-limited, use a keyed MCP or CLI setup and retry after the response hint.