Figma Context MCP
Give your coding agent access to your Figma data. Implement designs in any framework in one-shot.
作者提供的说明(英文原文)
Optimize public image URLs via the ShortPixel SPIO API for AI agents
这三项永远不会合并成一个分数:意见、测量和人气是不同的东西。
我们还没有为它写通俗的介绍。下面是我们从注册中心读取到的事实。
选择你使用的 AI 应用,然后复制设置。
Authorization标为机密的值是你账户的钥匙。千万不要分享给别人,也不要粘贴到聊天里。
你需要
你用的是哪个应用?
在上方选择你的应用。我们会记住它,下次按钮会显示“安装到 …”。
这个地址需要在请求的 header 中放入密钥,而添加连接器的菜单无法设置。请改用 Claude Code、Cursor 或 VS Code。
在终端中运行这条命令
claude mcp add --transport http optimize https://mcp.shortpixel.com/mcp --header 'Authorization: your-value'运行前请先填写空着的值。
粘贴到项目中的 .cursor/mcp.json,或 ~/.cursor/mcp.json
{
"mcpServers": {
"optimize": {
"url": "https://mcp.shortpixel.com/mcp",
"headers": {
"Authorization": "your-value"
}
}
}
}浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。
粘贴到项目中的 .vscode/mcp.json
{
"servers": {
"optimize": {
"type": "http",
"url": "https://mcp.shortpixel.com/mcp",
"headers": {
"Authorization": "your-value"
}
}
}
}浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。
这个地址需要在请求的 header 中放入密钥,而添加连接器的菜单无法设置。请改用 Claude Code、Cursor 或 VS Code。
你的选择通过 Cookie 保存在这台设备上,无需账户。
Authorization 机密 必填 HTTP header这些设置是根据作者在注册中心的条目生成的。如果 README 的写法不同,请以 README 为准。
我们还没有读取这个服务器的工具列表;我们会轮流检查各个端点。
我们检查的是任何人都能看到的信息;我们没有阅读代码。不适用的检查项不计入总数。 · 检查于 2026年11月6日
注册名称已通过域名 mcp.shortpixel.com 验证(注册中心会核实域名所有权)
我们还没有从 GitHub 读取这个仓库
我们还没有从 GitHub 读取这个仓库
尚未检查;我们会轮流检查各个端点
尚未检查;我们会轮流检查各个端点
尚未检查;我们会在检查端点时读取工具列表
与注册中心里这个分类中所有活跃的服务器比较。只有当发布者拥有该仓库时,星标数才计入。
它在 1 项适用的基础检查中通过了 1 项。我们没有阅读代码。在添加密钥或令牌之前,请先看看这个服务器要求哪些权限,并使用只具备所需权限的密钥。
你需要填写:Authorization
它在作者的云端运行。通过互联网连接,无需安装,但你发送的内容会经过作者的服务器。
GitHub 仓库最后更新于–,最新版本(0.3.0)于2个月前进入注册中心。
支持 MCP 的应用,例如 Claude Desktop、Claude Code、Cursor 和 VS Code。它通过 URL 连接,所以接受远程 MCP 服务器的应用也可以使用,例如开启开发者模式的 ChatGPT。
同一分类中有:Figma Context MCP, Claude Real Video, Figma MCP Server
同一分类中其他作者的服务器,按星标数排序。
如何看卡片:★ GitHub 星标i三大支柱:评价 · 检查 · 使用情况i更新 = 最新版本发布到注册中心的时间i
Give your coding agent access to your Figma data. Implement designs in any framework in one-shot.
Let any LLM watch a video locally — and search everything it has ever watched.
The Figma MCP server brings Figma design context directly into your AI workflow.
按原文从作者的仓库复制。PopNx MCP 没有审查或背书其内容。HTML、图片和脚本已被移除。链接会离开本站。
Public HTTP MCP server that exposes ShortPixel SPIO image optimization to AI agents (Cursor, Claude Desktop, VS Code, etc.).
AI client (Cursor, Claude, …)
│ │ MCP over HTTPS (Streamable HTTP) ▼ https://mcp.shortpixel.com/mcp │ │ user's API key in Authorization header ▼ ShortPixel SPIO API (api.shortpixel.com)
Each request carries the user's own ShortPixel API key. The MCP server does not store user keys — it forwards them to the public SPIO API.
npm ci
npm run build cp .env.example .env
Edit .env for server settings (port, allowed hosts, upstream API URL). Do not put user API keys in server .env.
npm start
Endpoints:
| Path | Method | Description |
|---|---|---|
/health | GET | Health check (no API key) |
/ping | GET | Auth check — returns ok if API key header is present |
/mcp | POST | MCP Streamable HTTP endpoint |
Server up, no API key:
curl http://mcp.shortpixel.com:3000/health
API key present (simple check):
curl -i -H "Authorization: Bearer YOUR_API_KEY" http://mcp.shortpixel.com:3000/ping
Use http:// (not https://) on port 3000 unless TLS is configured on nginx.
MCP request (important: Streamable HTTP clients must accept both JSON and SSE):
curl -s -N -X POST http://mcp.shortpixel.com:3000/mcp \
-H "Content-Type: application/json" \ -H "Accept: application/json, text/event-stream" \ -H "Authorization: Bearer YOUR_API_KEY" \ -d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}'
Send the user's ShortPixel API key on every MCP request:
Authorization: Bearer <shortpixel_api_key>
Alternative header:
X-ShortPixel-Api-Key: <shortpixel_api_key>
Users without a key can get one at shortpixel.com.
{
"mcpServers": { "shortpixel": { "url": "https://mcp.shortpixel.com/mcp", "headers": { "Authorization": "Bearer YOUR_SHORTPIXEL_API_KEY" } } } }
Replace the URL with your deployed host during development (e.g. http://localhost:3000/mcp).
| Variable | Required | Default | Description |
|---|---|---|---|
PORT | no | 3000 | HTTP listen port |
ALLOWED_HOSTS | no | — | Comma-separated Host header allowlist (recommended in production) |
SHORTPIXEL_API_URL | no | https://api.shortpixel.com/v2 | Upstream SPIO API base URL |
SHORTPIXEL_PLUGIN_VERSION | no | MCP01 | Plugin version sent to SPIO |
LOG_LEVEL | no | info | Log verbosity: debug, info, warn, error |
LOG_FORMAT | no | text | text = human-readable lines; json = structured JSON |
LOG_MCP_PROTOCOL | no | true | Log inbound/outbound MCP JSON-RPC payloads |
For internal ShortPixel development, set SHORTPIXEL_API_URL=https://devapi2.shortpixel.com/v2.
Logs go to stdout, which the shortpixel-mcp systemd service redirects to /var/log/shortpixel/mcp.log (npm start shows them directly when running locally).
Default (`LOG_FORMAT=text`) — narrative flow you can follow:
[2026-06-30 15:01:53] [1/5] → CLIENT | HTTP POST /mcp | JSON-RPC request: "initialize" (client connects) | id: 0
{ "jsonrpc": "2.0", "method": "initialize", "id": 0, "params": { ... } } [2026-06-30 15:01:53] [1/5] ← SERVER | HTTP POST /mcp 200 | JSON-RPC response: "initialize" (client connects) [2026-06-30 15:01:53] [2/5] → CLIENT | HTTP POST /mcp | JSON-RPC request: "notifications/initialized" (session ready, no response body expected) | id: null [2026-06-30 15:01:53] [2.5/5] → CLIENT | HTTP POST /mcp | JSON-RPC request: "tools/list" (client asks which tools exist) | id: 1 [2026-06-30 15:01:53] [2.5/5] ← SERVER | HTTP POST /mcp 200 | JSON-RPC response: "tools/list" (client asks which tools exist) | tools discovered: optimize_image_urls [2026-06-30 15:02:18] [3/5] → CLIENT | HTTP POST /mcp | JSON-RPC request: "tools/call" (client runs a tool) | id: 2 | tool: "optimize_image_urls" [2026-06-30 15:02:18] [4/5] MCP → SPIO API: POST reducer.php (args mapped to SPIO payload) | ... [2026-06-30 15:02:35] [5/5] MCP ← SPIO API: Success | reduction: 27.41% | optimized: http://api.shortpixel.com/f/...-lossy.jpg | original: ... [2026-06-30 15:02:35] [3/5] ← SERVER | HTTP POST /mcp 200 | JSON-RPC response: "tools/call" (client runs a tool) | tool: optimize_image_urls { "jsonrpc": "2.0", "id": 2, "result": { ... } } [2026-06-30 15:02:35] ✓ round-trip done (16.3s)
LOG_MCP_PROTOCOL=false keeps only high-level app logs and hides MCP payload dumps.
Structured (`LOG_FORMAT=json`) — one JSON object per line:
| Event | When |
|---|---|
http_request | Every request (method, path, status, duration, MCP method/tool) |
spio_request | Outgoing call to SPIO reducer.php |
spio_response | SPIO result summary (status, % improvement) |
mcp_auth_missing | Request without API key |
API keys are masked (****abcd). Full keys are never logged.
Note: The chat prompt never reaches this server. The LLM (inside the MCP client) turns user text into a structured tools/call; the server only sees JSON-RPC arguments and maps them to the SPIO API.
tail -f /var/log/shortpixel/mcp.log
npm start
Set LOG_LEVEL=debug for tools/list and extra HTTP lines.
Runs as the shortpixel-mcp systemd service (unit file at /etc/systemd/system/shortpixel-mcp.service), which runs node dist/index.js directly (no pm2) and reads env vars from .env in the project directory (EnvironmentFile=).
cd /web/mcp.shortpixel.com # liveVPS; a separate host from the rest of the PHP stack
npm ci npm run build
sudo systemctl restart shortpixel-mcp sudo systemctl status shortpixel-mcp
Re-upload package.json and package-lock.json after each dependency change. If build still fails, run npm ci --include=dev (some servers set NODE_ENV=production which skips devDependencies).
| Tool | Description |
|---|---|
optimize_image_urls | Optimize one or more public image URLs via SPIO reducer API |
optimize_image_urls arguments:
urls (required): Public image URLs to optimize (max 100)lossy: Compression level (0 lossless, 1 lossy, 2 glossy)wait: Max wait seconds (0 to return immediately, 1-30 to wait)upscale: Upscale factor (0, 2, 3, 4)resize: Resize mode (0 none, 1 outer, 3 inner, 4 smart crop)resize_width, resize_height: Resize target dimensions in pixelscmyk2rgb: Convert CMYK to RGB (1 yes, 0 no)keep_exif: Keep EXIF metadata (1 keep, 0 remove)convertto: Conversion value (+webp, +avif, +webp|+avif, webp|avif, jpg, png, gif)bg_remove: Background removal (1, image URL, or #rrggbbxx)refresh: Force source refetch (1) or use cached optimized data (0)paramlist: Per-URL overrides array (must match urls length)returndatalist: Any array echoed back unchanged in responsesrc/index.ts HTTP server entry point
src/http/auth.ts API key extraction from requests src/mcp/create-mcp-server.ts Per-request MCP server factory src/clients/spio-api-client.ts ShortPixel SPIO HTTP client src/tools/spio-tools.ts MCP tools src/http/request-log-middleware.ts HTTP request logging src/logging/request-logger.ts Structured JSON logger src/logging/mcp-protocol-log.ts MCP protocol payload capture/normalize
| Kind | Style | Example |
|---|---|---|
| Files | kebab-case | spio-api-client.ts |
| Classes | PascalCase | SpioApiClient |
| Methods | camelCase | optimizeUrls |
| Command | Description |
|---|---|
npm run build | Compile TypeScript to dist/ |
npm start | Run HTTP MCP server |
npm run dev | Run with tsx (no build step) |