Merchant Context

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

Resolve sourced merchant facts and safe actions before an agent acts.

已验证Streamable HTTP可网页运行网页搜索与抓取金融商业与电商

概览

AI 生成的概览

远程 MCP 服务,让助手在行动前获取有来源的商家事实、报价对比和商家自有操作交接信息。

可以做什么
  • 解析商家的缓存身份、有来源的事实、报价、条款、新鲜度与安全操作
  • 按报价、地点、价格、时间、政策、操作支持与新鲜度搜索缓存的商家记录
  • 对比两家或更多商家的有来源报价字段,未知值保持未知
  • 获取商家自有操作链接及其输入、权限、确认、有效期、重试与恢复规则
  • 执行预检:解析商家、评估意图约束并选定安全操作
  • 运行免费的商家站点诊断,并付费获取一次全新检查与缓存刷新
适用场景
当助手需要在不猜测的前提下说明某商家卖什么、价格多少、适用哪些规则,或需要选定下一步安全操作(例如需人工批准的购买)时适用。也适合仅依据有来源字段在多个商家之间比较报价。
运行要求
需要支持 Streamable HTTP 的客户端连接托管远程端点;未声明任何软件包、环境变量或请求头。付费刷新路径需要以 Base 上的 USDC 通过 x402 付款。
安装前请注意
付费刷新及其兼容别名每次收费 0.01 USDC(Base),应先展示价格并获得明确的人工批准再调用。该服务是早期公开草案,并不认证其他商务或代理协议。检查器仅访问公开 HTTPS 源站且不返回页面正文;支付记录保存哈希而非钱包地址或已签名支付令牌。

安装

在 SourceWeft 中

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

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

交给智能体安装

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

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

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

其他 MCP 客户端

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

{
  "mcpServers": {
    "merchant-context": {
      "type": "http",
      "url": "https://api.merchant.atomandbits.com/mcp"
    }
  }
}

README

Merchant Context

Merchant Context is an open merchant preflight for agent builders.

It starts with a practical question:

Can an agent tell what you sell, who it is for, what it costs, which rules apply, and what action comes next without guessing?

This repo contains:

Canonical sources

The domain schema and schema/merchant-context.schema.json must stay semantically equal. Versioned releases preserve old contracts.

Status

This is an early public draft from Atom & Bits. It is not a new payment or checkout protocol. It does not certify ACP, UCP, MCP, A2A, x402, or Web Bot Auth support.

The UCP profile declares no services, checkout capabilities, or payment handlers. It gives agents an explicit discovery response without claiming operations that do not exist.

The goal is to give merchants one testable context layer that can map to those systems as they mature.

No outside adoption is claimed from internal tests, registry views, repository activity, or self-funded payments.

Agent endpoints

  • MCP: https://api.merchant.atomandbits.com/mcp
  • Free MCP tool: resolve_merchant
  • Free HTTP: POST https://api.merchant.atomandbits.com/v1/resolve
  • Paid MCP tool: refresh_merchant
  • Paid HTTP x402: POST https://api.merchant.atomandbits.com/v1/refresh
  • Price: $0.01 USDC on Base
  • First verified settlement: Base transaction 0x2f0f…57af

The first paid call settled on 2026-08-04 and returned a live inspection of https://merchant.atomandbits.com.

Quick start

  1. Work through CHECKLIST.md.
  2. Copy examples/saas.json.
  3. Replace every sample value with a fact from your own site or system.
  4. Keep prices, stock, policies, and action URLs current.
  5. Run python3 scripts/validate.py before publishing.

Add it to an agent

The remote MCP endpoint works with clients that support Streamable HTTP:

text
https://api.merchant.atomandbits.com/mcp

Start with resolve_merchant.

It is free.

A cache hit makes no merchant fetch and no paid inspection call.

See the agent integration guide for Codex, Claude Code, Gemini CLI, Cursor, and the OpenAI Responses API.

Agents that support the open Agent Skills format can use skills/merchant-context.

Design rules

  • Facts beat slogans.
  • A URL is not an API.
  • Agents must not infer price, stock, policy, or authority.
  • Each claim should name its source and update time.
  • A purchase or other high-impact action should state when human approval is required.
  • Existing standards win. Map to them instead of inventing a private dialect.

Agent service

The worker directory contains the hosted MCP service under test. It exposes:

  • resolve_merchant, a free sourced merchant record with freshness, unknowns, safe actions, and attribution;
  • search_merchants, a neutral search over cached sourced records;
  • compare_offers, a sourced comparison that keeps unknown values;
  • get_safe_actions, a merchant-owned action handoff with approval and recovery rules;
  • preflight, the reusable resolution and action gate;
  • check_merchant, a free merchant-site diagnostic;
  • refresh_merchant, a $0.01 x402 fresh inspection that needs explicit approval;
  • inspect_merchant, a first-release compatibility alias for paid refresh;
  • direct HTTP routes under /v1; and
  • /.well-known/merchant-context, a public service record for agents and registries.

The inspector accepts public HTTPS origins only. It blocks local and IP targets, checks each redirect, caps response size and time, and returns no page body. The payment path records hashes, not wallet addresses or signed payment tokens.

Run its local checks:

sh
cd workernpm installnpm testnpm run typechecknpx wrangler deploy --dry-run

Contributing

Issues, examples, and corrections are welcome. Read CONTRIBUTING.md before opening a pull request.

License

MIT. See LICENSE.

来源:README.md,提交 846761e

工具

9

get_service_info

Describe the Merchant Context service, price, and inspection checks.

无需输入参数。

check_merchant

Run a free merchant-site diagnostic. Agents should use resolve_merchant before relying on merchant facts or actions.

输入参数merchant_url必填

resolve_merchant

Resolve cached merchant identity, sourced facts, offers, terms, freshness, and safe actions for free. Call this before relying on merchant facts or starting an action.

输入参数client_idmerchant_url必填

search_merchants

Search cached merchant records by sourced offer, place, price, timing, policy, action support, and freshness. Payment and adoption never change order.

输入参数policytimingclient_idfreshnessgeographyaction_typeitem_or_servicemax_stale_secondsmaximum_price_amountmaximum_price_currency

compare_offers

Compare only sourced offer fields from two or more merchants. Unknown values stay unknown and payment never changes order.

输入参数client_idmerchant_urls必填

get_safe_actions

Return current merchant-owned action URLs, exact inputs, authority, confirmation, expiry, retry rules, recovery, and attribution.

输入参数client_idaction_typemerchant_url必填allowed_authorityhuman_confirmation_available

preflight

Resolve one merchant, evaluate sourced intent constraints, select a safe action, state approval, and return attribution.

输入参数timingclient_idgeographyaction_typemerchant_url必填item_or_serviceallowed_authoritymax_stale_secondsmaximum_price_amountmaximum_price_currencyhuman_confirmation_available

refresh_merchant

Refresh merchant evidence

Pay for a fresh merchant inspection and cache refresh. Show the price and get explicit human approval first.

输入参数agent_id必填approved必填merchant_url必填

inspect_merchant

Refresh merchant evidence

Compatibility alias for refresh_merchant. Show the price and get explicit human approval first.

输入参数agent_id必填approved必填merchant_url必填

版本历史

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

评分

已满足适用检查项的 100%

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

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