Swop

io.github.Travisswopv0.2.1更新於 Oct 9, 2026

Sell to people and AI agents: create products, a storefront, and USDC payment links from chat.

已驗證Streamable HTTP可網頁執行Business & CommerceFinance

概覽

AI 產生的概覽

讓助理建立商品、店面與 USDC 付款連結,並可瀏覽或購買 Swop 商店中的商品。

功能
Swop 透過 Streamable HTTP 提供商務端點。公開工具可搜尋與查詢 swop.id 身分、讀取任何賣家的商品及其 USDC 價格與 x402 購買連結,並回傳一個同時給人和代理使用的商品連結。取得 OAuth 授權範圍後,工具可建立與更新商品、在 SmartSite 上精選商品、建立結帳、註冊 HMAC 簽章的 webhook、編輯店面、發布動態,並讀取個人資料、訂單、餘額與商店餘額。
適用情境
當助理需要賣東西時使用:上架商品、產生可分享的購買連結、在自有網站嵌入結帳,或讓代理從 Swop 商店購買。也適合查看自己的訂單、餘額與店面狀態。
執行需求
遠端 MCP 端點 Streamable HTTP,不需要本機套件或執行環境。公開工具不需要帳號。帳號與寫入工具使用 OAuth 2.1(動態用戶端註冊與 PKCE),授予 profile.read、wallet.read、smartsite.write 與 commerce.write 範圍。需要能連線至 Swop API 的網路。
安裝前請注意
寫入工具會建立與修改商品、店面、連結、webhook 與公開動態,動態在兩步預覽確認後會公開發布。webhook 使用 HMAC 簽章。商務端點沒有轉帳工具,但另一個完整端點增加了錢包與市場工具,其涉及資金的動作需要擁有者在 Swop 應用程式中開啟有上限的 AI 消費。加密付款不做身分驗證,USDC 交易應視為不可撤銷。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Swop,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。

{
  "mcpServers": {
    "swop": {
      "type": "http",
      "url": "https://mcp.swopme.co/mcp/commerce"
    }
  }
}

README

Swop MCP

Sell to people and AI agents, paid in USDC, from any MCP client.

Connect: https://mcp.swopme.co/mcp/commerce (Streamable HTTP) Public tools need no account; account tools use OAuth 2.1 (dynamic client registration, PKCE). Registry: io.github.Travisswop/swop

  • Create products and get one link: people see a Buy page, agents get an x402 USDC challenge
  • Feature products on your Swop SmartSite
  • Checkout on your own site with signed webhooks (checkout.paid, payout.released)
  • Browse and buy from any swop.id's store
  • Orders, SmartSite editing, swop.id lookup

Sellers are agent-payable in USDC as soon as they add a product, with no verification step.

Setup for Claude, ChatGPT, Cursor and Grok: docs/add-swop-to-your-ai.md

claude mcp add --transport http swop https://mcp.swopme.co/mcp/commerce

Tools (/mcp/commerce)

Public, no account:

  • swop_search_identities, swop_lookup_identity: swop.id → profile + wallet addresses
  • swop_get_store: any seller's products with USDC prices and an x402 buy URL for each
  • swop_get_product_link: the one link that sells a product to people and agents

Sell (scope commerce.write):

  • swop_create_product, swop_update_product, swop_list_my_products, swop_feature_product

Checkout on your own site (scope commerce.write):

  • swop_create_checkout, swop_get_checkout
  • swop_register_webhook, swop_list_webhooks, swop_test_webhook, swop_remove_webhook (HMAC-signed checkout.paid / payout.released)
  • swop_register_embed_origin, swop_list_embed_origins, swop_remove_embed_origin

SmartSite storefront (scope smartsite.write):

  • swop_get_my_smartsite, swop_update_my_smartsite, swop_add_link, swop_remove_link
  • swop_create_feed_post: public post as the linked SmartSite, caption + up to 4 images. Two-step: preview returns a sealed previewId; confirm resends the identical content, and each preview publishes at most once. The backend hosts the images; this server uploads nothing.

Account (scopes profile.read, wallet.read):

  • swop_get_my_profile, swop_get_my_orders, swop_get_my_balances, swop_list_my_tokens (store-credit "Bucks")

The commerce endpoint has no tools that send funds. Its OAuth metadata (/.well-known/oauth-protected-resource/mcp/commerce) advertises only profile.read wallet.read smartsite.write commerce.write.

Full endpoint (/mcp)

https://mcp.swopme.co/mcp stays live for existing Swop users. It is the commerce set plus wallet and market tools (sends, x402 payments, swaps, perps and prediction-market data); the money-moving ones need the owner to turn on AI spending, with caps, in the Swop app. New setups should use /mcp/commerce. The same OAuth link works on both endpoints.

Run

npm installnpm run dev          # Streamable HTTP on :8788 (POST /mcp and /mcp/commerce), stateless JSON modenpm run dev:stdio    # stdio transport for local clientsnpm run build && npm startnpm run smoke        # endpoint smoke test (in-process); `npm run smoke -- https://mcp.swopme.co` for prod

Env: SWOP_API_BASE (default https://apps.apiswop.co), PREDICTIONS_API_BASE (default https://polymarket.apiswop.co), PUBLIC_BASE_URL (default https://mcp.swopme.co), PORT (default 8788).

Local test with Claude Code:

claude mcp add swop --transport http http://localhost:8788/mcp/commerce

Deploy

Stateless Vercel function (project swop-mcp), served at mcp.swopme.co (never swop.tech). Deployed only with vercel deploy --prod; a git push does not ship it. Registry entry: server.json, published with mcp-publisher publish.

Where this fits

The AI-assistant edge of the platform. Exposes Swop to anything that speaks MCP, reaching the same API every first-party client uses.

mermaid
graph LR    ai["Claude / ChatGPT / Cursor"] --> mcp["<b>swop-mcp</b>"]    mcp --> api["swop-app-backend<br/>apps.apiswop.co"]

The identity rule that matters here: crypto payment is never KYC-gated. An agent can pay a seller in USDC with no verification step. Verification gates the card scope only — never ask a crypto path for identity.

For the cross-repo map, see swop-app-backend/docs/ECOSYSTEM.md.

License

MIT — see LICENSE.

Ask Swop read connectors

The full /mcp endpoint now exposes swop_get_token_price, swop_get_sports, and swop_get_help, using the same verified adapters as Ask Swop in the app and Messages. All three require the linked account's profile.read scope and cannot transfer funds. swop_get_help is also available on /mcp/commerce; prices and sports remain on the full endpoint. Exact token contracts and network names are preserved. Provider failures and ambiguous assets return an explanation rather than an invented price, score or market.

Run npm run build && node scripts/test-assistant-connectors.mjs for protocol, authentication, input-validation and endpoint-isolation checks.

來源:README.md,提交 692948b

工具

0
工具後設資料尚未被收錄。

版本歷史

3
  1. v0.2.1最新Oct 2, 2026
  2. v0.2.0Oct 1, 2026
  3. v0.1.1Sep 16, 2026