fontsource-mcp
# fontsource-mcp
An MCP stdio server for https://fontsource.org, which packages 2000+ open-source fonts (all of Google
Fonts plus extras) as npm modules served from the jsDelivr CDN. It reads the public API and CDN and
needs no key.
A subset is a font file cut down to one script, such as `latin`. A variable font packs a whole weight
range into one file and exposes axes such as `wght`.
## Tools
- `search_fonts`: fuzzy `query` over id and family, plus AND filters (`category`, `subsets`, `weights`,
`styles`, `variable`, `license`, `type`). Paginated. Rows carry enough to pick a font.
- `get_font`: subsets, weights, styles, axes, unicode ranges, license, version, npm names, CSS
font-family names, page URL, zip URL, and CDN URL templates for one `id`.
- `get_font_css`: `<link>` tags, `@import` lines, npm install and import lines, the `font-family`
rule, and inlinable `@font-face` CSS with absolute URLs. `variable:true` selects the variable package.
- `download_font`: writes to `<dest>/<id>/`. Filters by subset, weight, style, and `format` (woff2,
woff, ttf). `variable:true` fetches `<subset>-wght-<style>.woff2`. `zip:true` saves the official zip
unextracted.
- `index_fonts`: facet counts by category, subset, license, type, and variable. With `outFile` it
writes the full catalog JSON to disk.
- `get_axis_registry`: the variable-font axis registry.
## Download location
`download_font` writes under `dest` when given, else `FONTSOURCE_DOWNLOAD_DIR`, else `./fonts` in the
server's working directory. Under a plugin install that directory is not your project, so set the
variable or pass `dest`. In Claude Code, export it before launching `claude`. The Claude Desktop
extension asks for a folder at install.
## Install
Claude Code:
```
/plugin marketplace add nightious/fontsource-mcp
/plugin install fontsource-mcp@fontsource-mcp
```
The plugin wires the server through `${CLAUDE_PLUGIN_ROOT}` and adds a skill for agents. Needs Node 18+.
Claude Desktop: download `fontsource-mcp.mcpb` from Releases and open it. The server is one
dependency-free `dist/index.mjs`, so nothing runs `npm install`.
Manual: run `npm install && npm run build`, then add to `claude_desktop_config.json`:
```json
"fontsource": {
"command": "node",
"args": ["C:\\path\\to\\fontsource-mcp\\dist\\index.mjs"],
"env": { "FONTSOURCE_DOWNLOAD_DIR": "C:\\Users\\you\\fonts" }
}
```
The MSIX build of Claude Desktop keeps that file under
`%LOCALAPPDATA%\Packages\Claude_pzs8sxrjxfjjc\LocalCache\Roaming\Claude\`.
## Build and test
`dist/index.mjs` is the shipped artifact and is committed. After any change under `src/`, rebuild and
commit it.
```
npm run build # dist/index.mjs
npm run pack # build, then fontsource-mcp.mcpb
npm run selftest # about 20 live requests, ten seconds
```
A selftest failure means the API shape or CDN file naming changed.
## Data sources
- `https://api.fontsource.org/v1/{fonts, fonts/:id, variable/:id, axis-registry, download/:id}`
- `https://cdn.jsdelivr.net/fontsource/fonts/:id[:vf]@latest/<subset>-<weight|axis>-<style>.<ext>`
- `https://cdn.jsdelivr.net/npm/@fontsource[-variable]/:id@latest/<file>.css`
Each font carries its own license (OFL, Apache-2.0, CC0, and others) in the `license` field.
## License
All rights reserved. See [LICENSE](LICENSE). The source is public for reading and for pull requests to
this repository. It is not open source; do not redistribute it or publish a modified version.
TDQS
Scored across 6 tools
Each tool targets a clearly distinct part of the workflow: search_fonts finds fonts, get_font provides metadata, get_font_css generates CSS, download_font downloads files, index_fonts provides catalog-level facets/dumps, and get_axis_registry covers variable-axis definitions. Even the catalog-level pair search_fonts/index_fonts is separated by search results versus facet counts and full dumps.
All tools follow a consistent verb_object snake_case convention: search_fonts, get_font, get_font_css, download_font, index_fonts, get_axis_registry. The pluralization varies only where semantically appropriate, and there is no mixing of styles or vague generic verbs.
Six tools is well-scoped for a font catalog server: search, metadata, CSS generation, file download, catalog indexing, and axis registry each cover a distinct need. No tool feels redundant or missing from the core surface.
The tool set covers the full read-only font catalog workflow: discovering fonts, inspecting available subsets/weights/styles, generating embeddable CSS, downloading files, exporting the full catalog, and understanding variable-font axes. There are no obvious dead ends; get_font informs get_font_css and download_font, and index_fonts handles bulk catalog access.