Pixso MCP Server
Enables LLMs to interact with Pixso design files through a custom plugin, providing tools to get selection data and export assets as PNG or SVG.
README
Pixso MCP Server
Этот проект представляет собой MCP-сервер (Model Context Protocol), который позволяет LLM (например, Claude) взаимодействовать с вашим дизайн-файлом в Pixso через кастомный плагин.
Архитектура
- MCP Server (index.js): Локальный Node.js сервер, который реализует протокол MCP через Streamable HTTP (порт 3668, эндпоинт /mcp) и запускает WebSocket-сервер (порт 3667).
- Pixso Plugin (main.js + ui.html): Плагин для Pixso, который подключается к локальному серверу через WebSocket и извлекает данные из дизайна.
Возможности (Tools)
get_selection: Получает данные о текущих выделенных элементах (оптимизировано для экономии токенов).get_selection_png: Экспортирует выбранные или адресованные поnodeIdsрастровые ассеты в PNG.get_selection_svg: Экспортирует выбранные или адресованные поnodeIdsвекторные ассеты в SVG.
get_selection используется как инструмент для layout/codegen. Если в ответе у ноды есть:
{
"id": "123:456",
"assetExport": {
"kind": "raster",
"preferredTool": "get_selection_png",
"availableTools": ["get_selection_png"],
"usageHint": "background",
"fit": "cover"
}
}
значит LLM должен сначала использовать get_selection для структуры/layout, а затем вызвать assetExport.preferredTool с nodeIds: ["123:456"], чтобы получить сам ассет.
Установка и запуск
1. Подготовка сервера
npm install
node server/index.js
Сервер запустится на HTTP-порту 3668 (эндпоинт /mcp) для MCP и откроет WebSocket-порт 3667.
2. Установка плагина в Pixso
- Откройте Pixso.
- Перейдите в раздел плагинов -> Управление плагинами -> Создать новый плагин.
- Скопируйте файлы
manifest.json,main.jsиui.htmlв папку вашего плагина. - Запустите плагин в Pixso. Он должен показать статус "Connected" в своем окне.
3. Настройка MCP-клиента (например, Claude Desktop)
Добавьте сервер в конфиг вашего MCP-клиента:
{
"mcpServers": {
"pixso": {
"url": "http://localhost:3668/mcp"
}
}
}
Для использования скрипта подсчета токенов при запущенном сервере:
npm run count-tokens
Экономия токенов
Для минимизации потребления токенов LLM используются следующие оптимизации:
- Selection-First: Основной фокус на выделенных объектах.
- Фильтрация свойств: Передаются только критически важные данные (геометрия, текст, базовые цвета).
- Округление: Все числовые значения координат и размеров округляются до 1 знака после запятой.
- Семантика: Текстовое содержимое передается в чистом виде без избыточных стилей оформления.
- Явные подсказки для ассетов:
idдобавляется только к нодам, которые стоит дополнительно экспортировать черезget_selection_png/get_selection_svg.
Лицензия
MIT
Pixso docs
- https://pixso.net/developer/en/plugin-api/guide/introduction.html
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.