loading…
Search for a command to run...
loading…
Enables AI assistants to interact with FontLab for font design and manipulation, including querying font metadata, creating/modifying glyphs, applying transform
Enables AI assistants to interact with FontLab for font design and manipulation, including querying font metadata, creating/modifying glyphs, applying transformations, and exporting fonts.
A Model Context Protocol (MCP) server that provides programmatic access to FontLab's PythonQt API, enabling Claude and other AI assistants to interact with FontLab for font design and manipulation.
This MCP server bridges the Model Context Protocol with FontLab's powerful font editing capabilities, allowing you to:
┌─────────────────┐
│ Claude/MCP │
│ Client │
└────────┬────────┘
│ MCP Protocol (stdio)
│
┌────────▼────────┐
│ FontLab MCP │
│ Server │
│ (Python) │
└────────┬────────┘
│ Script Execution
│
┌────────▼────────┐
│ FontLab │
│ Application │
│ (PythonQt API) │
└─────────────────┘
The server uses a bridge pattern to execute Python scripts within FontLab's environment, communicating via temporary files and JSON serialization.
fontlab://font/current - Get current font informationfontlab://font/current/glyphs - List all glyphsfontlab://font/info - Get detailed font metadatafontlab://glyph/{name} - Get specific glyph detailscreate_glyph - Create new glyphs with custom parametersmodify_glyph_width - Adjust glyph widthstransform_glyph - Apply scale, rotation, and translationupdate_font_info - Modify font metadataexport_font - Export to OTF, TTF, WOFF, WOFF2, UFOdelete_glyph - Remove glyphs from fontpip package managerClone this repository:
git clone https://github.com/dithilli/fontlab-mcp-server.git
cd fontlab-mcp-server
Create a virtual environment (recommended):
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
Install dependencies:
pip install -r requirements.txt
Install the package:
pip install -e .
The server automatically detects FontLab installations in standard locations:
/Applications/FontLab 8.app or /Applications/FontLab 7.appStart the server using stdio transport:
python -m src.server
Or use the installed command:
fontlab-mcp-server
Add to your Claude Desktop config file (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"fontlab": {
"command": "/path/to/venv/bin/python",
"args": ["-m", "src.server"],
"cwd": "/path/to/fontlab-mcp-server"
}
}
}
Once configured, you can ask Claude to:
Query font information:
"What fonts are currently open in FontLab?"
Create glyphs:
"Create a new glyph called 'customA' with a width of 650"
Modify glyphs:
"Scale the 'A' glyph by 1.2x horizontally"
Export fonts:
"Export the current font as an OTF to ~/Desktop/myfont.otf"
URI: fontlab://font/current
Returns: JSON with font metadata
URI: fontlab://font/current/glyphs
Returns: Array of glyph objects with names, unicodes, and widths
URI: fontlab://glyph/{name}
Parameters:
- name: Glyph name (e.g., "A", "space", "Agrave")
Returns: Detailed glyph information including bounds and contours
{
"name": "glyph_name",
"unicode": 65, // optional
"width": 600 // optional, default 600
}
{
"name": "glyph_name",
"width": 650
}
{
"name": "glyph_name",
"scale_x": 1.2, // optional, default 1.0
"scale_y": 1.0, // optional, default 1.0
"rotate": 45, // optional, default 0 (degrees)
"translate_x": 10, // optional, default 0
"translate_y": 0 // optional, default 0
}
{
"family_name": "My Font Family", // optional
"style_name": "Bold", // optional
"version": "1.0", // optional
"copyright": "Copyright 2025" // optional
}
{
"path": "/path/to/output.otf",
"format": "otf" // optional: otf, ttf, woff, woff2, ufo
}
{
"name": "glyph_name"
}
fontlab-mcp-server/
├── src/
│ ├── __init__.py # Package initialization
│ ├── server.py # Main MCP server
│ ├── fontlab_bridge.py # FontLab communication bridge
│ ├── resources.py # Resource handlers
│ ├── tools.py # Tool handlers
│ └── utils/ # Utility functions
├── scripts/ # FontLab executor scripts
├── tests/ # Unit tests
├── pyproject.toml # Package configuration
├── requirements.txt # Python dependencies
└── README.md # This file
Run tests:
pytest tests/
Contributions are welcome! Please:
-script flag (may need adjustment)Future enhancements:
MIT License - See LICENSE file for details
For issues, questions, or contributions, please visit:
Version: 0.1.0 Author: David Szarzynski Status: Alpha - MVP Implementation
Выполни в терминале:
claude mcp add fontlab-mcp-server -- npx Безопасность
Низкий рискАвтоматическая эвристика по публичным данным — не гарантия безопасности.