# Merchant Context [Health: Active]

**Category:** 💻 Developer Tools  
**Repository:** https://github.com/ihint/merchant-context  
**GitHub Stars:** 0  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/merchant-context

## Description
Check whether a merchant exposes the public files buyer agents need.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "merchant-context": {
    "command": "npx",
    "args": ["-y","wrangler"]
  }
}
```

## Documentation & 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:

- a [merchant publishing checklist](https://github.com/ihint/merchant-context/blob/HEAD/CHECKLIST.md);
- a [draft merchant-context schema](https://github.com/ihint/merchant-context/blob/HEAD/schema/merchant-context.schema.json);
- a [worked SaaS example](https://github.com/ihint/merchant-context/blob/HEAD/examples/saas.json); and
- a [map of the main commerce and discovery standards](https://github.com/ihint/merchant-context/blob/HEAD/docs/protocol-map.md).

## Canonical sources

- Product and machine brief: https://merchant.atomandbits.com/llms.txt
- Version 0.1 schema: https://merchant.atomandbits.com/schema/merchant-context-v0.1.json
- UCP discovery: https://merchant.atomandbits.com/.well-known/ucp
- Open source and history: https://github.com/ihint/merchant-context

The domain schema and [`schema/merchant-context.schema.json`](https://github.com/ihint/merchant-context/blob/HEAD/schema/merchant-context.schema.json)
must stay semantically equal. Versioned releases preserve old contracts.

## Status

This is an early public draft from [Atom & Bits](https://atomandbits.com). 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`](https://basescan.org/tx/0x2f0fcf185021b68c827d5668f5d55481ca9d1f768b5e77b9d300e12b604f57af)

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](https://github.com/ihint/merchant-context/blob/HEAD/CHECKLIST.md).
2. Copy [examples/saas.json](https://github.com/ihint/merchant-context/blob/HEAD/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](https://github.com/ihint/merchant-context/blob/HEAD/docs/agent-integration.md) 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`](https://github.com/ihint/merchant-context/blob/HEAD/skills/merchant-context/SKILL.md).

## 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`](https://github.com/ihint/merchant-context/blob/HEAD/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 worker
npm install
npm test
npm run typecheck
npx wrangler deploy --dry-run
```

## Contributing

Issues, examples, and corrections are welcome. Read [CONTRIBUTING.md](https://github.com/ihint/merchant-context/blob/HEAD/CONTRIBUTING.md) before opening a pull request.

## License

MIT. See [LICENSE](https://github.com/ihint/merchant-context/blob/HEAD/LICENSE).

