# MCP server

> Connect with OAuth or a key, and every tool with its scope.

URL: `https://talopartnerhub.vercel.app/api/mcp` (Streamable HTTP).

## Connect

- **OAuth (recommended):** `claude mcp add --transport http talo https://talopartnerhub.vercel.app/api/mcp`, then authenticate (in Claude Code, `/mcp`). The browser opens; the person chooses sandbox or production and the scope. Discovery: `https://talopartnerhub.vercel.app/.well-known/oauth-protected-resource`, dynamic client registration and Client ID Metadata Documents are supported, PKCE S256 required.
- **Key:** send `Authorization: Bearer tph_…`. `npx talo-hub mcp [--client claude|cursor|desktop]` prints the OAuth config; add `--with-key` for a key-based one.

## Tools

The server only lists the tools the key's scope allows.

- `create_payment`: Crea un pago y devuelve el CVU, el alias y el checkout_token para el widget.
- `get_payment`: Estado y montos de un pago.
- `list_payments`: Pagos de un período.
- `create_payment_link`: Crea un link de pago reutilizable, con su URL y su QR.
- `list_payment_links`: Tus links de pago.
- `get_payment_link`: Un link de pago y los pagos que se crearon con él.
- `disable_payment_link`: Desactiva un link de pago para siempre.
- `simulate_transfer` (sandbox): Paga un pago de sandbox con una transferencia simulada.
- `refund_payment`: Reembolso total o parcial.
- `update_payment_price`: Cambia el monto de un pago.
- `extend_payment`: Extiende el vencimiento de un pago pendiente.
- `get_account`: Estado de la cuenta Talo y permisos de la key.
- `get_balance`: Saldo de la cuenta (cuando Talo lo habilite para partners).
- `list_transactions`: Movimientos de la cuenta (cuando Talo lo habilite para partners).
- `list_events`: Eventos del hub (payment.paid, payment.updated…).
- `list_webhook_endpoints`: Webhooks registrados.
- `create_webhook_endpoint`: Registra un webhook y devuelve su secreto una vez.
- `test_webhook`: Manda un evento de prueba firmado a tu webhook.
- `create_api_key`: Crea una key para un proyecto, con el permiso justo.
- `check_go_live`: Checklist para pasar a producción.
- `read_docs`: Lee cualquier página de esta documentación en Markdown.

The server is stateless (no session id) and answers over SSE (`data:` lines). Every tool result is JSON, both as text and as `structuredContent`; failures come with `isError: true` and `{ "error": { "code", "message", "details"? } }`.

Use read_docs to read any of these pages from inside the conversation.

---
Human page: https://talopartnerhub.vercel.app/docs/mcp · All pages: https://talopartnerhub.vercel.app/docs/index.md
