# redirect.pizza — how to use (mcp.ai)

Connect your redirect.pizza account and use 14 tools for URL shortener straight from your AI agent. Connect with your own API key. Manage redirect.pizza redirects, domains, and team usage, and test redirects or generate QR codes.

## Option A — via MCP (recommended)
Remote MCP endpoint (HTTP, streamable): `https://api.mcp.ai/p_redirect_pizza?ms=1787291340000`
Add it as a custom/remote MCP connector in your client (Claude, Cursor, VS Code…), then authenticate when prompted. Once connected, ask the agent to use the server's tools (e.g. `redirect_pizza_check_domain_dns`).

## Option B — via direct REST API
Base URL: `https://api.mcp.ai/api/redirect_pizza`
Auth: `Authorization: Bearer sk_live_…` — create a workspace API key at https://mcp.ai/settings/api-keys
Discover endpoints: `GET https://api.mcp.ai/api/redirect_pizza/_endpoints`

### Endpoints
- `POST https://api.mcp.ai/api/redirect_pizza/check/domain/dns` — Ask redirect.pizza to re-check DNS propagation for a domain and return its refreshed DNS and SSL state.
  - body: { domain_id: integer }
- `POST https://api.mcp.ai/api/redirect_pizza/create/redirect` — Create a new redirect from one or more source hostnames or URLs to a fixed destination URL using Free-safe redirect types.
  - body: { tags?: string[], notes?: string, sources: string[], tracking?: boolean, destination: string, redirect_type: string, uri_forwarding?: boolean, keep_query_string?: boolean }
- `POST https://api.mcp.ai/api/redirect_pizza/delete/redirect` — Permanently delete a redirect and its generated domain association by redirect ID.
  - body: { redirect_id: integer }
- `POST https://api.mcp.ai/api/redirect_pizza/generate/qr/code` — Generate a QR code for an HTTP or HTTPS URL as JSON-embedded PNG data or a downloadable PNG, SVG, or EPS file.
  - body: { url: string, format?: string }
- `POST https://api.mcp.ai/api/redirect_pizza/get/domain` — Retrieve one domain's required DNS records, verification status, security settings, and SSL state.
  - body: { domain_id: integer }
- `POST https://api.mcp.ai/api/redirect_pizza/get/redirect` — Retrieve one redirect and its sources, destination, domains, options, and current pause state by redirect ID.
  - body: { redirect_id: integer }
- `POST https://api.mcp.ai/api/redirect_pizza/get/team` — Return the connected token's team identity and hostname, hit, and user quota usage.
- `POST https://api.mcp.ai/api/redirect_pizza/list/domains` — List domains created by redirects, including DNS requirements, verification, automatic-DNS availability, and SSL state.
  - body: { per_page?: integer, next_cursor?: string }
- `POST https://api.mcp.ai/api/redirect_pizza/list/redirects` — List redirects visible to the connected API token, including source, destination, state, and domain details.
  - body: { per_page?: integer, next_cursor?: string }
- `POST https://api.mcp.ai/api/redirect_pizza/set/redirect/paused` — Pause or resume all source URLs belonging to one redirect.
  - body: { paused: boolean, redirect_id: integer }
- `POST https://api.mcp.ai/api/redirect_pizza/set/redirect/source/paused` — Pause or resume one source URL within a redirect without changing its other sources.
  - body: { paused: boolean, source_id: integer, redirect_id: integer }
- `POST https://api.mcp.ai/api/redirect_pizza/test/redirect/url` — Test one HTTP redirect hop for a public URL and return status, redirect details, timing, errors, and the next URL to test if present.
  - body: { url: string }
- `POST https://api.mcp.ai/api/redirect_pizza/update/redirect` — Replace a redirect's configurable sources, fixed destination, redirect type, and options.
  - body: { tags?: string[], notes?: string, sources: string[], tracking?: boolean, destination: string, redirect_id: integer, redirect_type: string, uri_forwarding?: boolean, keep_query_string?: boolean }
- `POST https://api.mcp.ai/api/redirect_pizza/upsert/redirect` — Create a redirect or update the uniquely matching redirect while retaining that redirect's existing sources.
  - body: { tags?: string[], notes?: string, sources: string[], tracking?: boolean, destination: string, redirect_type: string, uri_forwarding?: boolean, keep_query_string?: boolean }

## Example prompts
- "What can I do in redirect.pizza?"
- "Show me a summary of my redirect.pizza account"

## More
- Page: https://mcp.ai/redirect_pizza
- Agent spec (llms.txt): https://mcp.ai/redirect_pizza/llms.txt
- Postman collection: https://mcp.ai/redirect_pizza/postman.json
