# WorxAI Agent Data Gateway

An open Model Context Protocol gateway for structured data access with Base settlement and ERC-20 payment verification.

## Available endpoints

- `GET /api/schema` — OpenAPI schema
- `GET /api/ledger` — financial ledger data
- `GET /api/behavioral` — behavioral streams
- `GET /api/gateway/discovery` — machine-readable discovery metadata
- `POST /api/gateway/payments/verify` — verify a Base transaction
- `POST /api/gateway/payments/settle` — verify and settle a payment

## MCP server

Run the local MCP server with:

```bash
pnpm mcp
```

Set `WORXAI_API_BASE_URL` when routing the MCP server to a deployed gateway. The server exposes `get_financial_ledger` and `get_behavioral_streams` tools and forwards payment transaction hashes using `X-402-Tx-Hash`.

## Payment verification

Payments are verified against the Base network by checking a successful receipt and ERC-20 `Transfer` events sent to the configured Gateway wallet. The shared verifier accepts the configured USDC rail and can support test ERC-20 contracts when the payment route is configured for test mode.

## Machine-readable agent documentation

See `/llms.txt`, `/llms-full.txt`, and `/api/schema` for discovery, schemas, payment flow, and integration details.

## License

MIT
