Metadata-Version: 2.5
Name: zapproof-mcp
Version: 0.1.1
Summary: Check an EVM address's settled-payment record before you pay it
Project-URL: Repository, https://github.com/noareyenoar/Zapproof_theAgent_reputation_project
Project-URL: Issues, https://github.com/noareyenoar/Zapproof_theAgent_reputation_project/issues
License-Expression: MIT
License-File: LICENSE
Keywords: agent-reputation,ai-agents,base,mcp,mcp-server,usdc,x402
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.11
Requires-Dist: coincurve>=21.0.0
Requires-Dist: eth-account>=0.14.0
Requires-Dist: eth-hash[pycryptodome]>=0.7
Requires-Dist: eth-utils>=4.0
Requires-Dist: fastapi>=0.115
Requires-Dist: httpx>=0.27
Requires-Dist: mcp<3,>=2.3.0
Requires-Dist: pydantic>=2.7
Requires-Dist: pyyaml>=6.0
Requires-Dist: uvicorn>=0.30
Description-Content-Type: text/markdown

# Zapproof

A read-only, non-custodial reputation index for autonomous AI agents, scored from evidence of settled payments.

**Status: hosted API live, launch preparation.** The score API and the MCP tool run
against an index built from settled Base payments. The API, remote MCP, `/skill.md`,
the Thai skill and the Thai page were redeployed to Cloud Run and Firebase Hosting on
2026-11-23. `/v1/health` and `/v1/score` return `200`, an unknown address returns
`found: false` with no score, and the post-deploy smoke test passes all 8 checks
(`scripts/smoke_hosted.py`). The official MCP Registry entry is live and the package is
on PyPI (`uvx zapproof-mcp`); directory listings are being submitted. See
`reports/PROGRESS.md`.

ภาษาไทย: [README.th.md](README.th.md).

## What this is

Zapproof answers one question for an agent that is about to pay a stranger: *is there evidence that this counterparty actually does business?*

Reputation is computed only from verifiable evidence of settled payments. There is no "give stars" feature, no user-submitted rating, and no way to buy standing.

## What this is not

- **Not a custodian.** Zapproof never holds, escrows, or controls anyone else's money,
  at any point, for any reason.
- **Not a required link in anyone's payment path.** If this project goes offline, no
  third party's payment is blocked, delayed or degraded. Acting as a custodial
  intermediary, a sequential proxy, or the only route between two parties is
  forbidden.
- **Being one hop among many is permitted** (owner decision, 2026-10-30; ADR 0003).
  Lightning payments may route through this project's node, and the node reroutes
  automatically when it is unavailable. Attribution never comes from routing: a node
  sees only the HTLCs through its own channels, so any claim that an agent paid
  through this project rests on an identity the agent presented, never on the fact
  that a payment passed through.
- **Not a judge of character.** It reports what the evidence shows and how confident it is. It does not label anyone good or bad, and an absence of evidence is never rendered as a low score.

## Where things are

| Path | What it holds |
|---|---|
| `claude_code_prompt.md` | The engineering protocol — phases, gates, non-goals |
| `Zapproof_D1_idea.md` | The business definition, in Thai |
| `README.th.md` | Thai overview and quick start |
| `src/repindex/api/static/skill.th.md` | Thai agent skill, served at `/skill.th.md` |
| `config/thresholds.yaml` | Human-owned thresholds. The agent must never edit it |
| `gates/` | Gate scripts, written *before* each phase is implemented |
| `HUMAN_DECISIONS/` | Owner decisions only. The agent never writes here |
| `reports/` | Generated evidence — environment, gate outputs, projections |
| `docs/adr/` | Architecture decision records |
| `docs/adr/0003-ln-trust-provider.md` | The routing and trust-provider decision (owner, 2026-10-30) |
| `DISPUTES.md` | How a seller contests a label or score, and how corrections are applied |
| `src/repindex/` | Source |

## Working on this

Requires Python 3.11+, `uv`, GNU make, git, and `gitleaks`.

```sh
make env-check   # records this machine's environment into reports/env.md
make test
make lint
make gate-0      # the Phase 0 gate
make gate-B      # the Phase B gate; runs its own evidence producers
make metrics     # unique external callers over the market window (local only)
```

The score API is read-only: no route writes, and the score database is opened
`mode=ro`. Usage telemetry is a best-effort middleware in the score process that
writes its own `data/usage.db` (or `USAGE_DB`); it never touches the score database and
a failure to write is logged once per error class, not raised. Identity binding is a
separate app with its own database, so no identity write route is reachable from the
score service.

## A note on the numbers

Every number this project publishes must be produced by a script from the database, with the reproduce command printed beside it. Where evidence is missing, the project says so instead of estimating. `insufficient_evidence` is a valid and expected result.

## Packaging

The PyPI distribution carries the MCP Registry ownership marker:
`mcp-name: io.github.noareyenoar/x402-counterparty-reputation`
