
Marketplace Mcp
io.github.llmops-pro由 GitHub 帳號 llmops-pro 發布v0.2.3更新於 Oct 24, 2026
Publish Nostr marketplace listings (NIP-15 + Shopstr kinds 30019/30402) so agents can run a store.
概覽
讓助理以 NIP-15 和 Shopstr 格式發布與更新 Nostr 市場商品,使代理能經營店面。
- 可以做什麼
- 發布或更新 Shopstr 商店資料與 NIP-99 分類商品資訊,包含圖片、價格、運費和分類,並在中繼發布後同步到 Shopstr 快取。發布或更新供 NIP-15 原生用戶端使用的 NIP-15 攤位和商品,僅發布到中繼。列出自己的 NIP-15 攤位和商品,可依攤位篩選。在啟用兩步確認時確認待發布的交易。
- 適用情境
- 當你希望代理建立、重新發布或維護 Nostr 市場店面時使用,例如在 shopstr.store 上,或在 Plebeian Market 等 NIP-15 用戶端上;也適合把商品資訊當作版本化檔案由 CI 部署。
- 執行需求
- 以 npm 套件形式在本機執行(npx marketplace-mcp),需要 Node 20 以上版本。必須設定 NOSTR_RELAYS,填入以逗號分隔的 wss:// 中繼位址,為空時伺服器會拒絕啟動。需要簽署者:NOSTR_NIP46_URI(建議)或 NOSTR_PRIVATE_KEY;沒有簽署者時只能唯讀執行。同步 Shopstr 快取需要對 shopstr.store 的對外 HTTPS,並將 SHOPSTR_CACHE_ENABLED 設為 true。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Marketplace Mcp,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
marketplace-mcp
A NOSTR storefront for your LLM agent — speaks both dialects. MCP server that lets an agent create + update marketplace events on your behalf, in two dialects out of the box:
- NIP-15 (kind:30017 stalls + kind:30018 products) for NIP-15-native clients (Plebeian Market, etc.).
- Shopstr-modern (kind:30019 shop profile + kind:30402 NIP-99 classified listings) — what
shopstr.storeactually renders. Includes an automatic cache-POST so events appear on the storefront, not just on relays.
Seven tools, defense-in-depth safety, MIT licensed.
v0.2 — dual-dialect publisher. v0.1.x shipped NIP-15-only and the listings never appeared on shopstr.store because Shopstr is a Postgres-backed CMS that only renders events from its own DB (populated via
POST /api/db/cache-event) and its cacheable-event allowlist excludes NIP-15 kinds. v0.2 adds the Shopstr-modern tools and the cache-POST hook so the storefront actually populates. NIP-15 tools left in place for non-Shopstr targets.
Why this server exists
Shopstr (the canonical Bitcoin-Lightning marketplace UI on NOSTR) is not a relay-reading Nostr client — it's a Next.js app with a Postgres cache. Its marketplace page renders products from its own DB, populated when clients POST signed events to /api/db/cache-event. The cacheable-event allowlist (in shopstr-eng/shopstr → utils/db/cache-event-policy.ts) excludes NIP-15 stall/product kinds; modern Shopstr uses kind:30019 (shop profile with merchants: [<pubkey>]) and kind:30402 (NIP-99 Classified Listings, all data in tags). Without a ["t","shopstr"] tag the listing won't surface; without at least one ["image",<url>] tag the card silently never renders.
marketplace-mcp v0.2 builds the right events, POSTs them to Shopstr's cache after the relay publish, and keeps the legacy NIP-15 tools intact for anyone targeting other clients.
What you can build with this
- A self-driving Shopstr storefront — agent generates shop profile + product listings from a config file, republishes whenever metadata changes, drops fresh
t-tag categories per product for discoverability. Same call publishes to relays AND mirrors to Shopstr's cache. - A sales-channel multiplexer — the same product events propagate to every NIP-15- or NIP-99-aware client (Shopstr, Plebeian Market, etc.) by virtue of being on shared relays. Pick your dialect per-tool; publish to both if your audience spans clients.
- A listing-as-code workflow — version-control your product JSON in git; CI calls
shopstr_create_or_update_productto deploy. Republish with the sameid= idempotent update (parameterized-replaceable events). - Cross-server identity — pair with
nostr-ops-mcpandnwc-mcpto wire identity + commerce. Same signer, same npub, three specialized tool surfaces.
The seven tools
Shopstr-modern (new in v0.2) — required for shopstr.store visibility
NIP-15 legacy — for NIP-15-native clients (not Shopstr)
Common
Requirements
- Node 20+
- A NOSTR signer — strongly preferred: a NIP-46 bunker URI from Amber, nsec.app, or any NIP-46 implementation. Dev path: raw
nsecin.env. - Relays your audience reads from. Sensible defaults in
.env.example(relay.damus.io,nos.lol,relay.nostr.band,relay.primal.net). - For Shopstr-modern publishes: outbound HTTPS to
shopstr.store(or your own Shopstr deployment).
Install
Configure
The server auto-loads .env from this binary's own directory (next to dist/) — deliberately NOT from cwd, to avoid env-var collision when multiple MCP servers run in the same Claude Code session.
Required
Signer — provide AT MOST one (without a signer the server runs read-only)
Shopstr cache mirror (new in v0.2)
shopstr.store reads from its own Postgres DB, not from open relays. After kind:30019/30402 events publish to relays, the server POSTs them to the configured cache URL so the storefront surfaces them. Failures are logged in the audit log but never roll back the relay publish (a Nostr event already broadcast can't be rolled back anyway).
The NIP-15 tools (kind:30017/30018) ignore these — those kinds aren't on Shopstr's cacheable allowlist anyway.
Optional safety knobs
Quickstart: publish your first storefront on shopstr.store
Visit https://shopstr.store/marketplace/<your-npub> to see your storefront. (If you've registered a Shopstr profile slug for your npub, the URL canonicalises to /marketplace/<your-slug>.) Browsers buy through Shopstr's invoice-generation flow → sats land in the Lightning wallet linked to your Shopstr profile.
NIP-15 alternative (for non-Shopstr clients)
If you're targeting NIP-15-native clients instead of (or in addition to) Shopstr, the legacy tools still work:
You can publish both dialects for the same product to maximise client coverage; they don't collide.
Wire into an MCP client
Same .env-via-binary-dir pattern as the rest of the substrate — leave the env block empty in client config; secrets stay in marketplace-mcp/.env.
Safety model
The publish pipeline runs in this order, for both NIP-15 and Shopstr-modern tools:
NOSTR_READ_ONLYgate.- Signer presence — refuse if no signer.
- RateLimiter — rolling
eventsbucket (NOSTR_MAX_EVENTS_PER_MINUTE). - Confirm gate — if
NOSTR_REQUIRE_CONFIRM=true, returns a token;marketplace_confirm_publishexecutes. The confirm dispatcher routes by tool name so Shopstr-modern publishes re-attach their cache-POST hook automatically. - Sign + publish via NDK.
afterPublishhook (Shopstr-modern only) — POST the signed event toSHOPSTR_CACHE_URL. Failures logged in audit (after_publish.shopstr_cache.{ok, status, error}) but never roll back the relay publish.- Audit log entry.
KindAllowlist is omitted because the kinds (30017/30018/30019/30402) are hard-coded in the tool implementations — there's no agent-supplied kind to validate.
If you want stricter behavior, pair with nostr-ops-mcp and use its kind allowlist on the same npub — but most users find that overhead unnecessary for a single-purpose marketplace server.
Testing
Companion servers
nwc-mcp— Lightning wallet. The "payment" side of selling.nostr-ops-mcp— General NOSTR primitives. The marketplace MCP is the specialized cousin; nostr-ops-mcp is the generalist.albyhub-admin-mcp— Hub-level admin via Alby Hub's HTTP API. The other half of the wallet story (NWC handles payments, this handles node/channel/sub-wallet ops).
License
MIT — see LICENSE.
Contact / Issues
Built by LLMOps.Pro.
- NOSTR:
npub1hdg932jvwc3jdvkqywgqv0ue4nn60exrf92asy8mtazt3hjg7d2s2yw0nw— follow, DM, zap. - Lightning Address:
[email protected]— for support zaps and "this was useful" tips. - Bug reports / feature requests: open a GitHub issue (link forthcoming).
- Security issues: please disclose privately via NOSTR DM before opening a public issue.
來源:README.md,提交 6040f0d
工具
0版本歷史
1- v0.2.3最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分