---
title: "Shaf Documentation"
description: "Authoritative developer guide and API reference for Shaf global edge link infrastructure, programmable redirects, custom domains, and realtime telemetry."
---

> Documentation Index
> Fetch the complete documentation index at: https://shaf.app/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Shaf Documentation

# Shaf Documentation

Shaf is an edge-native link management and programmable redirect platform. Deployed across Cloudflare's Anycast edge network spanning 300+ locations, Shaf executes URL resolution in under 10 milliseconds using distributed D1 and KV storage, automated TLS certificate provisioning, privacy-preserving telemetry, and programmatic REST and MCP interfaces.

---

## Explore by Diátaxis Framework

Shaf documentation is structured around the Diátaxis documentation framework to support immediate development workflows:

- **1. Tutorials** — Hands-on, verifiable onboarding journeys. Provision your first edge short link, bind a custom domain, or configure an MCP agent in under 5 minutes.
- **2. How-To Guides** — Task-oriented recipes for production workloads: DNS CNAME mapping, reverse proxy subpaths, webhook verification, and SCIM directory sync.
- **3. Reference** — Technical specifications, REST API v1 endpoint schemas, error code dictionaries, webhook event payloads, and MCP tool definitions.
- **4. Explanation** — Architecture deep dives covering Anycast DNS routing, edge KV-to-D1 replication, privacy-first telemetry aggregation, and bot mitigation.

---

## Core Capabilities

- **Sub-10ms Edge Redirects** — Evaluates routing rules at the nearest Cloudflare Anycast point of presence with localized KV lookups and fallback recovery.
- **Automated Custom Domains** — Connect branded hostnames with automatic TLS certificate generation and renewal powered by Cloudflare for SaaS.
- **Model Context Protocol (MCP)** — Native MCP server endpoint enabling Claude Code, Cursor, and Windsurf to create links, inspect traffic, and manage DNS programmatically.
- **Privacy-First Telemetry** — Collect click events, device classes, and geolocations without client-side cookies, fingerprinting, or raw IP retention.

---

## Quick Navigation

- **Quickstart: First Link** — Create and verify your first short link with custom slug routing in under 3 minutes.
- **Connect Custom Domain** — Add your branded domain, configure CNAME records, and verify TLS certificate issuance.
- **REST API v1 Overview** — Generate scoped tokens and integrate automated link workflows via REST endpoints.
- **Connect AI Agents (MCP)** — Wire Claude Code, Cursor, or Windsurf directly to your Shaf link workspace.

Source: https://shaf.app/docs/index.mdx
