BuyAPI

io.github.TheSnakeFang由 GitHub 账号 TheSnakeFang 发布v0.7.1更新于 Oct 24, 2026

Vendor intelligence for AI coding agents choosing developer tools and stacks.

已验证Streamable HTTP可网页运行开发者工具数据与分析

概览

AI 生成的概览

BuyAPI 为 AI 助手提供带来源的厂商情报,用于推荐、比较和估算开发工具与整套技术栈的成本。

可以做什么
按问题或类别检索厂商,获取含定价、限额和注意事项的详细档案,以及支撑结论的证据记录。针对具体工作负载对已知厂商做逐项对比,并根据明确的工作负载输入估算月度成本。推荐完整的多层技术栈,附决策矩阵、假设、未知项、备选方案和来源。查找与某厂商相关的已审核公开技术栈案例或近期精选案例。
适用场景
当问题是要选数据库、认证服务、托管平台、支付处理、邮件服务或 UI 组件库,或想了解整套技术栈的成本时使用。它是决策支持层,不提供实现文档、代码示例或框架 API 细节。
运行要求
可使用托管的远程端点,或用 npx 启动本地进程(需 Node.js)。匿名速率限制下无需 API 密钥;在控制台创建的 API 密钥可通过 BUYAPI_API_KEY 传入或由 CLI 登录保存,以获得密钥访问和更高限额。需要能访问 BuyAPI 后端的网络。
安装前请注意
厂商数据可能过时或不完整,尤其是定价和限额,关键生产承诺应直接向厂商核实。成本估算仅为方向性参考,取决于所给的工作负载输入和假设。可选的 CLI 扫描在未使用 dry-run 时会把检测到的工具元数据和技术栈上下文上传到 BuyAPI;不会上传源代码或环境变量值。

安装

在 SourceWeft 中

  1. 打开 控制台中的 BuyAPI,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。

交给智能体安装

把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。

阅读 https://sourceweft.com/mcp/io.github.TheSnakeFang%2Fbuyapi-mcp/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。

查看智能体所依据的安装指南

其他 MCP 客户端

把它添加到你客户端的 mcpServers 配置中。

{
  "mcpServers": {
    "buyapi": {
      "type": "http",
      "url": "https://buyapi.ai/api/mcp"
    }
  }
}

README

BuyAPI CLI + MCP Server

Unbiased vendor intelligence for AI coding agents.

[Website] [NPM Version] [smithery badge] [MIT licensed]

BuyAPI helps AI agents and developers make informed infrastructure decisions. When your agent needs to pick a database, auth provider, hosting platform, payment processor, email provider, or UI component system, BuyAPI provides current, structured, neutral vendor comparisons - not training data defaults.

Quick Start

Remote MCP (Recommended)

The hosted endpoint is the primary install path and exposes the current seven-tool contract.

[Install MCP Server in Cursor]

Add to your MCP client config:

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

This is the easiest path: the client connects directly to BuyAPI over HTTP, with no local process and no npm install.

CLI Setup

Run setup to install BuyAPI into your agent:

bash
npx buyapi

Bare npx buyapi opens an interactive setup flow. It asks which coding agent you use, installs the hosted MCP config by default, can add the /stack planning skill where supported, and can log you in for higher limits and stack sync.

Or target a client directly:

bash
npx buyapi setup cursornpx buyapi setup claude-codenpx buyapi setup codexnpx buyapi setup windsurfnpx buyapi setup cline

By default setup writes the hosted MCP URL. Use --local when a client needs a local stdio process:

bash
npx buyapi setup codex --local

Claude Code and Codex can also install the /stack planning workflow:

bash
npx buyapi setup claude-code --skillnpx buyapi setup-skill codex

/stack inspects the local repo, asks for missing constraints, calls BuyAPI MCP for current vendor data, and returns a sourced Stack Decision Record. It does not sync scan data unless you explicitly ask it to.

If you use the CLI often and do not want to type npx, install it globally:

bash
npm install -g buyapibuyapi scan

In an MCP client config, use the explicit mcp command. The client launches it as a local stdio server; you do not run it manually first:

json
{  "mcpServers": {    "buyapi": {      "command": "npx",      "args": ["-y", "buyapi", "mcp"]    }  }}

Use the local path when an agent client does not support remote MCP URLs, or when you want the open-source local transport. Hosted MCP is still the recommended default. The older buyapi-mcp package is deprecated on npm so new users see one canonical package name.

Stack Scan And Sync

The CLI has a stack scanner. Plain scan prints a local preview first, then asks whether to save the private stack when the terminal is interactive:

bash
npx buyapi scan

Run it from the app, package, or monorepo root that contains project signals such as package.json, a lockfile, framework config, convex/, prisma/, Python manifests, or source imports. You can also point it at a public GitHub repo URL:

bash
npx buyapi scan https://github.com/owner/repo

If no project signals are found, the CLI prints wrong-folder guidance instead of silently returning an empty stack. Sync also skips stacks with zero known BuyAPI tools unless you pass --allow-empty.

Use --verbose to see evidence and unknown package candidates found in package.json:

bash
npx buyapi scan --verbose

For a guaranteed no-upload preview, use --dry-run. To save a private stack without prompts in automation, login once, then sync:

bash
npx buyapi loginnpx buyapi scan --sync --yes

Detection uses BuyAPI's own registry of manifest, marker-file, env-key, config-content, import, framework, and language signals. Unknown runtime packages are kept as candidates so the public tool register can learn about new AI-native tools without copying third-party detection tables. Routine dev/build tooling is filtered out before it reaches the review queue.

buyapi login opens the browser, signs in through the dashboard, creates a CLI API key, and stores it locally. You can still pass an existing key with buyapi login ba_live_... or use BUYAPI_API_KEY in CI. buyapi whoami --quiet exits 0 when a key is active and 1 when it is not. Sync uploads known detected tools plus filtered unknown package names, versions, and evidence so BuyAPI can review emerging tools. It does not upload source code, source file contents, or environment values.

scan is a human-facing CLI command, not an MCP tool. The MCP server should stay quiet on stdout because stdout carries the MCP protocol.

Read-Only CLI

The local package can query BuyAPI without starting an MCP client:

bash
npx buyapi search "realtime database with preview environments" --category databasenpx buyapi details /database/convexnpx buyapi compare /database/convex /database/supabase --query "realtime SaaS"npx buyapi recommend "B2B AI SaaS with teams and usage billing" --users 1000npx buyapi cost /email/ses --emails 50000

Use --json on read-only commands to print the raw structured response.

When To Use BuyAPI

Use BuyAPI when the question is a vendor or stack decision:

txt
Should I use Convex, Supabase, or Neon for a realtime B2B SaaS?
txt
Estimate the email cost for 50,000 transactional sends/month.
txt
What auth provider should I use for organizations, SSO later, and a generous free tier?

Use implementation docs tools such as Context7 after the decision is made and the agent needs exact APIs, code examples, or version-specific setup steps.

Tips For Better Answers

  • Use BuyAPI vendor IDs when you know them, e.g. /database/convex, /database/supabase, /hosting/vercel.
  • Include workload numbers when asking about cost: users, monthly active users, email sends, storage, bandwidth, or monthly orders.
  • Include constraints that matter: solo founder, B2B SaaS, HIPAA/SOC2 later, no credit card free tier, preview environments, realtime collaboration, or low lock-in.
  • Ask for alternatives when you want tradeoffs, not just a single recommendation.

Common launch-corpus IDs:

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

Available Tools

vendors.resolve

Search for vendors by query. Category is optional. Returns matching vendors with pricing summaries, positioning, confidence, and explicit unknown-corpus fallbacks.

Query: "I need a database for a real-time collaborative app"Category: "database"
-> Returns: Convex, Supabase, Neon, PlanetScale, Firebase with comparison metadata

vendors.details

Get detailed vendor profile: concrete pricing numbers, free tier limits, scaling characteristics, known gotchas, source provenance, and head-to-head comparisons.

Vendor ID: /database/supabaseQuery: "free tier limits for a side project"
-> Returns: Full pricing tiers, 500MB DB limit, 50K auth users, scaling triggers, and sources

vendors.evidence

Fetch recent reviewed evidence rows for a vendor, category, stack, or comparison.

Subject type: "vendor"Subject ID: /database/supabase
-> Returns: Evidence summaries with source URLs, stance, confidence, and observed dates

stacks.findSimilar

Find public stack profiles related to a vendor, or recent curated stack examples.

Vendor ID: /database/convex
-> Returns: Similar stack profiles with project summary, audience, stage, tools, and confidence

vendors.compare

Compare two or more specific vendors for a workload or decision.

Vendor IDs: ["/database/convex", "/database/supabase", "/database/neon"]Query: "realtime TypeScript SaaS with preview environments"
-> Returns: Structured decision matrix with fit, capability-by-capability yes/no/unknown coverage, tradeoffs, estimated cost, confidence, and sources

vendors.estimateCost

Run deterministic cost estimates from explicit workload inputs instead of leaving math to the model.

Vendor IDs: ["/email/ses"]Workload: { "emailSendsPerMonth": 50000 }
-> Returns: Amazon SES estimated at $5/month, basis, assumptions, unknowns, and sources

stacks.recommend

Describe your project and get a complete stack recommendation with cost projections, a decision matrix, assumptions, unknowns, alternatives, and sources.

Use this for stack/vendor/tool decisions, not local implementation questions like CSS layout, TypeScript compiler errors, or framework API usage.

Project: "SaaS for restaurant inventory with real-time updates"Constraints: "Solo founder, under $50/month until 1000 users"Stack context: [{ "vendorSlug": "/database/convex", "category": "database", "confidence": "high" }]
-> Returns: Full stack (hosting + DB + auth + payments + email) with structured cost and decision data

Setup by Client

Claude Code

Add to your Claude Code MCP settings:

json
{  "mcpServers": {    "buyapi": {      "url": "https://buyapi.ai/api/mcp"    }  }}
Cursor

In Cursor Settings -> MCP Servers, add:

json
{  "mcpServers": {    "buyapi": {      "url": "https://buyapi.ai/api/mcp"    }  }}
VS Code (Copilot)

Add to .vscode/mcp.json:

json
{  "servers": {    "buyapi": {      "url": "https://buyapi.ai/api/mcp"    }  }}
Windsurf

Add to your Windsurf MCP config:

json
{  "mcpServers": {    "buyapi": {      "url": "https://buyapi.ai/api/mcp"    }  }}
Local (stdio)
json
{  "mcpServers": {    "buyapi": {      "command": "npx",      "args": ["-y", "buyapi", "mcp"]    }  }}

API Keys

BuyAPI currently works without an API key at the anonymous rate limit. Signed-in users can create dashboard API keys for keyed access, usage analytics, and stack sync.

The local package reads either BUYAPI_API_KEY or the key stored by buyapi login:

json
{  "mcpServers": {    "buyapi": {      "url": "https://buyapi.ai/api/mcp",      "env": {        "BUYAPI_API_KEY": "ba_live_..."      }    }  }}

CLI Reference

bash
buyapi                             # Show setup guidancebuyapi setup <client>              # Install MCP config for an agentbuyapi setup <client> --skill      # Install MCP config and the /stack skillbuyapi setup-skill <client>        # Install the /stack skill onlybuyapi mcp                         # Run the local MCP server over stdiobuyapi login                       # Browser login and local key storagebuyapi login <api-key>             # Store an existing API keybuyapi logout                      # Remove the stored API keybuyapi whoami                      # Verify the active local keybuyapi whoami --quiet              # Auth check for scriptsbuyapi scan [dir]                  # Scan locally, then optionally save stackbuyapi scan https://github.com/x/y  # Scan a public GitHub repobuyapi scan --sync --yes           # Save detected tools without promptsbuyapi search <query>              # Search vendorsbuyapi details <vendorId>          # Fetch one vendor profilebuyapi compare <ids...>            # Compare vendorsbuyapi recommend <prompt>          # Recommend a stackbuyapi cost <ids...>               # Estimate cost from workload flagsbuyapi --version                   # Print the CLI version

Common flags:

bash
--category <name>       Limit search/cost to a category--query <text>          Add workload or decision context--client <name>         Setup target: claude-code, cursor, codex, windsurf, cline--local                 Write local stdio MCP config during setup--skill                 Also install the /stack planning skill during setup--print                 Print setup config instead of writing it--name <text>           Stack name for scan sync--stack-name <text>     Alias for --name--stack <slug>          Stable stack slug/name to update--summary <text>        Stack notes for scan sync--sync                  Save scan output to your dashboard--dry-run               Preview scan output without uploading--verbose               Include scanner evidence details--all                   Include lower-confidence supporting detections--allow-empty           Save even when no known tools were detected--force                 Alias for --allow-empty--yes                   Skip sync confirmation prompt--users <n>             Monthly active users--emails <n>            Email sends per month--orders <n>            Monthly orders--json                  Print raw structured JSON

Covered Categories

CategoryVendors
DatabaseSupabase, Convex, Neon, PlanetScale, Firebase
AuthSupabase Auth, Clerk, Auth0, Auth.js
HostingVercel, Netlify, Railway, Fly.io
PaymentsStripe, LemonSqueezy, Paddle, RevenueCat
EmailResend, SendGrid, Postmark, Amazon SES
UI Componentsshadcn/ui

How It Works

This MCP server is a thin TypeScript client that calls the BuyAPI backend API. It contains no vendor data; lightweight comparison and cost formatting mirrors the hosted endpoint while vendor intelligence is served from buyapi.ai.

The source is fully open so you can verify there's no prompt injection or hidden behavior. scan previews locally first and only uploads after explicit confirmation or --sync; --dry-run never uploads. Sync sends detected tool metadata, derived stack context, checked file names, repo URL metadata when provided, and filtered unknown package candidates for review. It does not send source code or environment values.

Data Transparency

  • All vendor data is publicly viewable at buyapi.ai
  • Every profile shows when it was last updated and data source
  • BuyAPI does not accept payment from vendors for ranking influence
  • Inaccurate-data reporting, suggested edits, reviews, and vendor-claim requests exist behind moderation; vendor self-service editing is not live.

Troubleshooting

  • If your MCP client supports remote MCP URLs, use https://buyapi.ai/api/mcp first.
  • If remote MCP is not supported, configure the local stdio server with command: "npx" and args: ["-y", "buyapi", "mcp"].
  • Do not add banners or prompts to the stdio server command; stdout is reserved for MCP protocol messages.
  • If anonymous rate limits are hit, create an API key in the BuyAPI dashboard and pass it as BUYAPI_API_KEY where your client supports environment variables.
  • If a tool or vendor is missing, ask BuyAPI anyway. Unknown requests are treated as demand signals for future corpus expansion.

Disclaimer

BuyAPI profiles combine first-party sources, manual review, public evidence, and structured estimates. Vendor data can become stale or incomplete, especially pricing and limits. Use BuyAPI as a decision-support layer, verify critical production commitments directly with the vendor, and report outdated facts through the website when the reporting flow is available.

License

MIT

来源:README.md,提交 6ff62a0

工具

7

vendors.resolve

First stop for category-specific vendor recommendations and vendor ID discovery. Finds BuyAPI vendor IDs for a user question; provide category when known. Use this when the user asks which provider in a category fits their constraints. With a covered category, the response includes ranked results plus a top-3 decision matrix with fit labels, confidence, tradeoffs, cost notes, freshness, and sources. Do not use this for local coding/debugging/docs questions unless they involve choosing a software vendor or tool. If the category is outside BuyAPI's corpus, the tool returns an explicit "not in corpus yet" result instead of inventing vendors.

输入参数query必填category

vendors.details

Follow-up tool for one known vendor. Retrieves detailed pricing, features, limits, gotchas, comparisons, and source provenance. Call vendors.resolve first unless the user already provided a BuyAPI vendor ID like /database/supabase. Use this after a candidate is selected and the user needs claim-level pricing, limit, gotcha, or provenance details.

输入参数queryvendorId必填

vendors.evidence

Returns recent reviewed BuyAPI evidence rows for a vendor, category, stack, or comparison. Use this when the user asks why BuyAPI believes something, what sources support a recommendation, or what recent human/source/opinion/history signals exist. This is a trust and provenance follow-up, not the first recommendation tool.

输入参数limitsubjectId必填subjectType必填

stacks.findSimilar

Finds reviewed public stack examples related to a vendor, or recent curated stack examples. Use this when the user asks who uses a tool, what similar builders use, or wants examples of real stack combinations. Do not use it as a generic recommendation tool.

输入参数limitvendorId

vendors.compare

Compares two or more already-known BuyAPI vendors for a specific workload or decision. Use this when the candidate set is known, for head-to-head questions like "Convex vs Supabase vs Neon for a realtime SaaS" or "Stripe vs Paddle for a marketplace". If the user has not named candidates, use vendors.resolve first.

输入参数query必填workloadvendorIds必填

vendors.estimateCost

Produces directional monthly cost estimates from BuyAPI pricing data and explicit workload inputs. Use this only when the user asks for cost math and provides explicit workload inputs. Missing workload fields are returned as assumptions or unknowns instead of being hallucinated. Treat results as BuyAPI claim-based estimate math; verify exact billing in first-party docs, vendor CLIs, or vendor MCPs before purchase or production decisions.

输入参数categoryworkload必填vendorIds

stacks.recommend

Recommends a complete stack from BuyAPI's corpus with a structured decision matrix, cost estimate, assumptions, unknowns, alternatives, and sources. Use this when the user is starting a project or asks for a complete multi-layer stack choice. Do not use this for local coding/debugging/docs questions that do not involve software or vendor selection. Do not call vendors.resolve first; this tool handles retrieval and ranking.

输入参数workloadstackFactsconstraintsstackContextprojectDescription必填

版本历史

1
  1. v0.7.1最新Sep 16, 2026

评分

已满足适用检查项的 100%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通必需25 分
  • 已声明认证方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分