
Gatefareio
io.github.gatefareio由 GitHub 帳號 gatefareio 發布v1.1.0更新於 Oct 27, 2026
Marketplace of paid HTTP APIs. USDC micropayments via x402 on Base. Non-custodial.
概覽
將 AI 助理接入 Gatefare 付費 HTTP API 市場,可搜尋目錄並透過 x402 在 Base 上以 USDC 按次付費呼叫。
- 可以做什麼
- 搜尋、檢視與瀏覽 API 目錄:支援依價格與分類篩選的全文搜尋、單一 API 詳情、分類清單、自動完成
- 發起付費 API 呼叫並自動處理 402 與本機簽章,查詢錢包餘額,預估多次呼叫的總成本
- 發布與管理自己的付費 API、檢視營收,並觸發鏈上分帳撥款
- 檢舉惡意或被盜用的 API
- 工具會依已設定的憑證自動註冊,助理不會看到無法使用的工具
- 適用情境
- 適合想讓助理發掘並按次購買 HTTP API、不需訂閱或 API 金鑰的情境;也適合在 Gatefare 發布付費 API 的使用者,在聊天用戶端中管理介面並檢視營收。
- 執行需求
- 透過 npx 執行 npm 套件 @gatefare/mcp 的本機 Node.js 程序,需在 Claude Desktop、Cursor 等 MCP 用戶端中設定。買方工具需要 WALLET_PRIVATE_KEY(EVM 私鑰),可選 WALLET_BUDGET_USD 與 WALLET_NETWORK;發布方工具需要 GATEFARE_PAT。自架部署可用 GATEFARE_BASE_URL 覆寫位址。需要連線至 Gatefare 與 Base 的網路。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Gatefareio,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
@gatefare/mcp
[npm version] [npm downloads] [bundle size] [License: MIT] [CI] [MCP Registry] [mcp.so] [Glama] [Base]
Give your AI agent a wallet and a marketplace.
@gatefare/mcpis a Model Context Protocol server that connects Claude Desktop, Cursor, or any MCP-compatible agent to the Gatefare catalog of paid HTTP APIs. Payments settle as USDC on Base via the open x402 standard — no SaaS keys, no subscriptions, no escrow. Non-custodial: signing happens locally; the private key never leaves your machine.
[Demo: install, list tools, real call against gatefare.io]
Quick start
1. Drop into your client
Claude Desktop — ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
Cursor — ~/.cursor/mcp.json or project-level .cursor/mcp.json:
Restart the client. The agent now has 5 read-only tools — discovery + safety. Try:
"Search Gatefare for weather APIs."
2. Add a wallet to make paid calls
Add env to the same config:
Buyer tools (call_api, get_wallet_balance, estimate_cost) become available. The
WALLET_BUDGET_USD cap is a runtime safety net — for a hard cap, fund the wallet with
only what you're willing to spend.
"What's London's weather right now? Spend up to $0.001."
3. (Optional) Publish your own APIs
Get a PAT at gatefare.io/dashboard/tokens and add:
Publisher tools (register_api, list_my_apis, update_api, get_revenue,
distribute) appear.
"Publish my API at https://api.example.com/sentiment for $0.001 per call."
Tools
13 tools across 4 domains. Tools auto-register based on which env vars are set — the agent never sees a tool it can't use.
Discovery — always available
Buyer — needs WALLET_PRIVATE_KEY
Publisher — needs GATEFARE_PAT
Safety — always available
Configuration
Examples
Discover & buy in one breath (Claude Desktop)
You: Find me a sub-$0.001 weather API and call it for "Tokyo".
Claude: Calling
gatefare.search_apiswithmax_price: 0.001…
Founddemo-weatherby @alice at $0.001/call.
Callinggatefare.call_apiwithslug: "demo-weather",query: {city: "Tokyo"}…
Tokyo is 22°C, partly cloudy. Paid 0.001 USDC. Receipt:settled-tx-0x9a…
Programmatic — Python agent
See examples/ for runnable variants: Claude Desktop, Cursor, Python,
TypeScript, and a pure-discovery walkthrough.
Not building an AI agent? Picking the right tool
If you want to pay for x402 APIs from a backend (no agent), use Coinbase's
official x402 SDKs — x402-python (PyPI), coinbase/x402/go, …/java, or
@x402/fetch. They handle the
payment flow; you don't need this MCP server.
If you want to browse the Gatefare catalog from any language, hit the
REST API directly: gatefare.io/api/catalog
(OpenAPI 3.1 spec).
Full breakdown of which tool fits which use case in
docs/integrations.md.
Direct CLI (for debugging)
Errors
Tool results include isError: true and a structured body
{ error: <code>, message: <human>, details?: <any> }. Codes are stable —
agents can switch on them for retry / surfacing logic.
How it works (the 30-second version)
- The agent calls
gatefare.call_api { slug: "demo-weather", … }. - We
GET https://gatefare.io/p/demo-weather(no payment yet). - The Gatefare proxy returns 402 Payment Required with
accepts: [{network, payTo, maxAmountRequired, …}]. - We sign an EIP-3009
transferWithAuthorizationfor that exact amount and recipient on the configured network. - We retry the request with the signed
X-Paymentheader (base64-encoded JSON, x402 v2). - Gatefare verifies the signature, settles the USDC transfer, and proxies the call to the upstream API.
- We hand the upstream response (and a payment receipt) back to the agent.
The signature is single-use, time-bounded, and never leaves your machine for any
purpose other than this exact transfer to this exact payTo. The private key
is never logged.
Security
- Non-custodial. Private keys live in your env, signing happens locally, no Gatefare service ever sees them.
- Network confusion-resistant. A malicious gateway returning Sepolia-only requirements to a mainnet user is rejected — we never sign for a chain the user didn't configure.
- Cryptographically random nonces. No
Date.now()-based collisions. - Validity window clamped to 1 hour even if the server requests more.
- Strict input validation. Slugs are
^[a-z0-9_-]+$and URL-encoded; no path traversal.targetUrlblocksfile://,localhost, cloud metadata IPs,.local, and.internalhosts at registration time. - Secret hygiene. Tests assert that the private key and PAT never appear in stderr / stdout, ever.
Development
To use a local checkout in your client config:
Architecture
Test layout
Contributing
Issues and PRs welcome. See CONTRIBUTING.md for the workflow, style guide, and how to add a new tool.
Related packages
Gatefare ships three first-party packages. They share the same x402 protocol and the same backend, so a project can mix them as needed:
License
MIT © Gatefare
Links
- 🌐 Marketplace: gatefare.io
- 📚 API docs: gatefare.io/docs
- 🤖 LLM context (single file): gatefare.io/llms-full.txt
- 📐 OpenAPI spec: gatefare.io/openapi.json
- 🐦 Twitter: @Gatefareio
- 🔌 Model Context Protocol: modelcontextprotocol.io
- 💸 x402 standard: x402.org
來源:README.md,提交 6e3a63d
工具
0版本歷史
1- v1.1.0最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分