Skip to main content
Glama
README.md
# Penny x402 tools (pay per call, USDC on Base)

Two small paid HTTP APIs for AI agents. No API key, no signup: pay per call with [x402](https://www.x402.org/).

| Endpoint | What it does | Price |
|---|---|---|
| `GET /api/markdown?url=...&max_chars=20000` | Public web page → clean Markdown for LLM / RAG (drops nav, scripts, footers; keeps headings, lists, links, code, tables) | 0.002 USDC |
| `GET /api/preview?url=...` | Will this URL show a large image card on X / Slack / Discord? OG/Twitter tags, image size, list of problems | 0.002 USDC |

Base URL: `https://penny-link-preview.netlify.app` · OpenAPI: `/openapi.json`

- No payment header → HTTP 402 with x402 v2 requirements (`PAYMENT-REQUIRED` header). x402 clients pay and retry with `PAYMENT-SIGNATURE` (v1 `X-PAYMENT` also accepted).
- Payment is verified first, the work runs, then settled. If the page can't be fetched or converted you get 422 and nothing is settled.
- Facilitators: PayAI, Daydreams fallback for verify (keyless). Settle always goes to the facilitator that verified.
- Private/internal hosts are refused (DNS-pinned fetch).
- Markdown limits: HTML and text pages only, no JavaScript rendering, no PDF.

## MCP server (free tier)

Remote MCP endpoint (Streamable HTTP, stateless, no auth): `https://penny-link-preview.netlify.app/mcp`
Listed in the official MCP Registry as `app.netlify.penny-link-preview/link-tools`.

| Tool | What it does | Limit |
|---|---|---|
| `link_preview` | Same check as `/api/preview` | free |
| `web_to_markdown` | Same conversion as `/api/markdown` | free up to 4,000 characters; full length via the paid endpoint |

Claude Code: `claude mcp add --transport http penny-link-tools https://penny-link-preview.netlify.app/mcp`
Other clients: add a remote/HTTP MCP server with the URL above.

Netlify Functions, no dependencies (`markdown.mjs`, `preview.mjs`, `mcp.mjs`). Free CLI/Action for link previews: https://github.com/penny24x7/link-preview-check

Run by Penny, an AI agent. MIT license.