Search DevTools

Jump to any tool or page

gtinfetch – Agentic Commerce

gtinfetch — the GTIN resolver for AI agents. Any barcode, one call. 84M GTINs. x402 at the door.

wefetch-ai0 stars0 forksBrowser & Web
View source

Install

mcp_config.json

{
  "mcpServers": {
    "ai-gtinfetch-gtinfetch": {
      "url": "https://gtinfetch.ai/mcp",
      "type": "streamable-http"
    }
  }
}

Documentation

gtinfetch for AI agents

gtinfetch is the GTIN resolver for AI agents. One call turns a barcode into its signed record (the product, the brand, the maker and the pack, each field with the pages it was read from) and checks it against what the agent believes it is buying. Know your transactions (KYT).

MCP address: https://gtinfetch.ai/mcp · no account, no key to start · one tool, fetch_gtin

Setup

Claude Code (setup/claude-code.sh)

claude mcp add --transport http gtinfetch https://gtinfetch.ai/mcp

Cursor: ~/.cursor/mcp.json, or .cursor/mcp.json in your project (setup/cursor.mcp.json)

{
  "mcpServers": {
    "gtinfetch": { "url": "https://gtinfetch.ai/mcp" }
  }
}

VS Code: .vscode/mcp.json in your workspace (setup/vscode.mcp.json)

{
  "servers": {
    "gtinfetch": { "type": "http", "url": "https://gtinfetch.ai/mcp" }
  }
}

python setup/check_setup.py connects to the server the two JSON files name and lists its tool.

One call and its answer

fetch_gtin(gtin="00012000001291", market="US", receipt=true)
answer: verified | The barcode is on record with no conflict; 1 source holds it; no recall stands against it in the market asked (US).
gtin14: 00012000001291 | product: Pepsi | brand: Pepsi
signed: EdDSA gtinfetch-2026-10
receipt: pm_… https://rco.wefetch.ai/receipts/pm_…

The plain web read

GET https://gtinfetch.ai/01/{gtin} returns the same record as JSON; ask for text/markdown and it answers in markdown.

Receipts

Every receipt is at https://rco.wefetch.ai/. Pass receipt: true and the check is written as a signed receipt in the same call; anyone can check it with verify_receipt(id) at https://rco.wefetch.ai/mcp.

Examples

Both resolve one barcode over MCP with a receipt, read the same barcode over the plain web read, and check the receipt at rco.wefetch.ai.

Python (examples/python/resolve.py)

cd examples/python
pip install -r requirements.txt
python resolve.py 00012000001291 US

TypeScript (examples/typescript/resolve.ts)

cd examples/typescript
npm install
npx tsx resolve.ts 00012000001291 US

Set AGENT_NAME to name your agent; it travels as the User-Agent of every call.

Paying on x402

Paid inside the call over x402, in USDC (first) or Open USD (second), both on Base (eip155:8453). Free resolves come first. When they are used, the paid address https://x402.gtinfetch.ai/mcp answers HTTP 402 with its offer and the client pays inside the same call with a PAYMENT-SIGNATURE header. A GET on the paid address shows the offer at any time.

examples/python/pay_x402.py reads the live offer, takes its price as the ceiling (no amount is typed in the code), and pays with the x402 Python SDK when the call is charged:

python pay_x402.py 00012000001291                    # prints the offer; nothing is paid
PAYER_KEY=... python pay_x402.py 00012000001291       # USDC
PAYER_KEY=... python pay_x402.py 00012000001291 --open-usd

PAYER_KEY is the private key of the wallet that pays. Keep it in your environment or a secret store; never commit it.

The agent skill

skills/gtinfetch/SKILL.md tells an AI agent when to call fetch_gtin, what to pass, how to read the answer, how to keep the receipt, and what to do when a barcode is not on the record. Copy the gtinfetch folder into your agent's skills folder.

More

MIT licence. WeFetch AI Corp.

Sourced from the repository README.

More in Browser & Web