# FontsLike Developer API & MCP Protocol

FontsLike provides structured typography data for AI agents and software systems. The primary programmatic interface is a stateless Model Context Protocol (MCP) server operating over Streamable HTTP, alongside pre-rendered static JSON endpoints for all directory records.

## Quick Connection (MCP)

Connect any MCP-compatible AI assistant to FontsLike:

- **Endpoint URL**: `https://fontslike.com/mcp`
- **Transport**: Streamable HTTP (spec version `2024-11-05`)
- **Authentication**: None required (public read-only directory)
- **Rate Limit**: 15 requests per 10 seconds per IP address (enforced at Cloudflare edge)

### Client Configurations

#### Claude Code (CLI)

Run in your terminal:

```bash
claude mcp add --transport http fontslike https://fontslike.com/mcp
```

#### Claude Desktop

Add to your `claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "fontslike": {
      "url": "https://fontslike.com/mcp"
    }
  }
}
```

#### Cursor IDE

Add to `.cursor/mcp.json` or Cursor Settings > MCP:

```json
{
  "mcpServers": {
    "fontslike": {
      "url": "https://fontslike.com/mcp"
    }
  }
}
```

#### ChatGPT / OpenAI Actions

Configure a custom GPT or connector using the OpenAPI specification at `https://fontslike.com/openapi.json` or Streamable HTTP connector pointing to `https://fontslike.com/mcp`.

---

## MCP Tools Reference

The FontsLike MCP server exposes 6 focused tools designed for font discovery, licence permissions, similarity lookups, text transformation, and SVG typography rendering.

> **Licence Notice**: A plain-English reading of the licence text; the licence text decides. Licence cards summarise permissions across standard commercial, logo, web, and application use cases.

### 1. `search_fonts`

Search open fonts by keyword, category, licence, language script, or style.

- **Parameters**:
  - `query` (string, max 80 chars, required): Search query matching font family, slug, or design tags.
  - `category` (enum, optional): `sans-serif`, `monospace`, `serif`, `handwriting`, `display`, `other`.
  - `licence` (enum, optional): `OFL-1.1`, `UFL-1.0`, `Apache-2.0`, `CC0-1.0`, `Unlicense`.
  - `subset` (enum, optional): Language subset (e.g. `vietnamese`, `cyrillic`, `japanese`, `arabic`).
  - `style` (enum, optional): Design style (e.g. `gaming`, `pixel`, `horror`, `handwriting`, `retro`).
  - `limit` (integer, 1–25, default 10): Maximum number of results to return.

**Example Call**:
```json
{
  "name": "search_fonts",
  "arguments": {
    "query": "pixel",
    "category": "display",
    "limit": 5
  }
}
```

### 2. `get_font`

Retrieve the complete profile for an open font, including its resolved licence terms and top 6 lookalikes.

- **Parameters**:
  - `slug` (string, regex `^[a-z0-9-]{1,80}$`, required): Font slug (e.g. `montserrat`, `space-grotesk`).

**Example Call**:
```json
{
  "name": "get_font",
  "arguments": {
    "slug": "space-grotesk"
  }
}
```

### 3. `find_similar`

Find ranked open lookalikes for any target font (including commercial fonts like Helvetica, Arial, Times New Roman, or open fonts).

- **Parameters**:
  - `font` (string, max 80 chars, required): Font slug or family name (e.g. `arial`, `helvetica`, `inter`).
  - `limit` (integer, 1–12, default 6): Number of lookalikes to return.

**Example Call**:
```json
{
  "name": "find_similar",
  "arguments": {
    "font": "arial",
    "limit": 6
  }
}
```

### 4. `check_license`

Look up what a font's licence allows for one use case against its licence terms. Supports both open fonts and reference system fonts.

- **Parameters**:
  - `font` (string, max 80 chars, required): Font slug or family name (e.g. `roboto`, `arial`).
  - `use` (enum, required): One of `commercial`, `logo`, `web`, `app`, `modify`, `redistribute`, `sell`, `credit`.

**Example Call**:
```json
{
  "name": "check_license",
  "arguments": {
    "font": "arial",
    "use": "commercial"
  }
}
```

### 5. `fancy_text`

Convert input text into 23 distinct Unicode character styles (bold, cursive, old English, glitch, bubble, etc.) generated directly from Unicode character maps.

- **Parameters**:
  - `text` (string, max 500 chars, required): Plain text string to convert.
  - `style` (enum, required): One of `bold`, `italic`, `bold-italic`, `cursive`, `bold-script`, `old-english`, `bold-fraktur`, `outline`, `monospace`, `sans-bold`, `sans-italic`, `small-caps`, `wide`, `bubble`, `negative-bubble`, `squared`, `parenthesized`, `small`, `subscript`, `upside-down`, `strikethrough`, `underline`, `glitch`.

**Example Call**:
```json
{
  "name": "fancy_text",
  "arguments": {
    "text": "Cyberpunk 2077",
    "style": "glitch"
  }
}
```

### 6. `render_text`

Generate a self-contained SVG markup string embedding the font's WOFF2 web font URL and rendering custom text. Supported strictly for redistributable open fonts (never reference or commercial fonts).

- **Parameters**:
  - `font` (string, regex `^[a-z0-9-]{1,80}$`, required): Open font slug (e.g. `orbitron`, `inter`).
  - `text` (string, max 200 chars, required): Text string to render (XML-escaped).
  - `size` (integer, 8–256, default 48): Font size in pixels.
  - `color` (string, regex `^#[0-9a-fA-F]{6}$`, required): Hex color code for the text (e.g. `#ffffff`).
  - `background` (string, regex `^#[0-9a-fA-F]{6}$`, required): Hex color code for background rect (e.g. `#1a1c23`).
  - `weight` (integer, default 400): Font weight matching font styles.

**Example Call**:
```json
{
  "name": "render_text",
  "arguments": {
    "font": "space-grotesk",
    "text": "Hello World",
    "size": 48,
    "color": "#ffffff",
    "background": "#14151b",
    "weight": 700
  }
}
```

---

## Static JSON Endpoints

All directory data is pre-rendered at build time and served through static Cloudflare Worker assets with global CDN caching:

| Endpoint | Description |
|---|---|
| `GET /openapi.json` | Complete OpenAPI 3.1 specification for all endpoints |
| `GET /api/fonts.json` | Index of 2,062 open fonts with metadata and subsets |
| `GET /api/fonts/{slug}.json` | Open font record with resolved licence card |
| `GET /api/fonts-like.json` | Directory of 1,958 lookalike font targets |
| `GET /api/fonts-like/{slug}.json` | Similarity rankings and licence comparisons |
| `GET /api/licences.json` | Permissions and clause quotes for all open & system licences |
| `GET /api/licences/{slug}.json` | Single licence card |
| `GET /api/styles.json` | 24 style categories and Google Fonts tag rules |
| `GET /api/styles/{slug}.json` | Member fonts for a specific style |
| `GET /api/categories.json` | 5 typographic categories |
| `GET /api/categories/{category}.json` | Member fonts for a typographic category |
| `GET /api/languages.json` | 19 language & script subsets with specimens |
| `GET /api/languages/{subset}.json` | Member fonts supporting a language subset |
| `GET /api/fancy-text.json` | Character maps and Unicode notes for 23 text styles |
| `GET /api/search-index.json` | Compact tokenized search index |

---

## Dual Formats & Crawler Support

Every human-facing page on FontsLike has a corresponding Markdown twin served at `/<path>.md` and linked in HTTP `<link rel="alternate" type="text/markdown">` headers.

AI crawlers and machine readers are welcomed and never rate-limited or blocked on static pages. See `/llms.txt` and `/llms-full.txt` for index manifests.
