Satori MCP Server
An MCP server that generates beautiful images from React components using Satori. Create social cards, blog headers, quotes, and custom images directly through AI assistants like Claude.
README

Satori MCP Server
An MCP (Model Context Protocol) server that generates beautiful images from React components using Satori. Create social cards, blog headers, quotes, and custom images directly through AI assistants like Claude.
<div> <a href="https://jellypod.ai"><img alt="jellypod logo" src="https://img.shields.io/badge/MADE%20BY%20jellypod.ai-000000.svg?style=for-the-badge&labelColor=000"></a> <a href="https://github.com/Jellypod-Inc/satori-mcp-server/blob/main/LICENSE"><img alt="License" src="https://img.shields.io/badge/LICENSE-MPL--2.0-blue?style=for-the-badge&labelColor=000000"></a>
</div>
Features
- 🎨 Generate images from JSX - Convert React components to PNG images
- 📝 Built-in templates - Social cards, blog headers, and quote designs
- 🔤 Google Fonts support - Access to hundreds of fonts
- 🚀 MCP Protocol - Works seamlessly with Claude Desktop and other MCP clients
- 🛠️ TypeScript - Fully typed!
Installation
Prerequisites
- Node.js 20+
- pnpm (recommended) or npm
Clone and Install
git clone https://github.com/Jellypod-Inc/satori-mcp-server.git
cd satori-mcp-server
pnpm install
Configure with Claude Desktop
To use the hosted version of the MCP server, add the server to your Claude Desktop configuration:
{
"mcpServers": {
"satori": {
"type": "http",
"url": "https://satori.jellypod.ai/mcp"
}
}
}
Development
# Start development server with hot reload
pnpm dev
# Run tests
pnpm test
# Run specific tests
pnpm test:generate-image
pnpm test:generate-image-from-template
# Build for production
pnpm build
# Start production server
pnpm start
Testing
To test the MCP server, use the Model Context Protocol (MCP) inspector: https://modelcontextprotocol.io/legacy/tools/inspector
You can run it via:
pnpm dlx @modelcontextprotocol/inspector
and then run the local MCP server, and connect to the localhost in the inspector.
Environment Variables
You willl need to configure Vercel Blob Storage to save the generated image files. Get this from your Vercel dashboard: https://vercel.com/docs/storage/vercel-blob
export const BLOB_READ_WRITE_TOKEN = process.env.BLOB_READ_WRITE_TOKEN;
Available Tools
1. generate_image
Generate an image from custom JSX content.
Parameters:
jsx(string, required): JSX content as a stringwidth(number, default: 600): Image width in pixelsheight(number, default: 400): Image height in pixelsoutputPath(string, required): Where to save the imagegoogleFonts(array, optional): Google Fonts to load
Example:
{
jsx: '<div style={{background: "linear-gradient(to right, #667eea, #764ba2)", width: "100%", height: "100%", display: "flex", alignItems: "center", justifyContent: "center"}}><h1 style={{color: "white", fontSize: "60px"}}>Hello World</h1></div>',
width: 1200,
height: 630,
outputPath: "output/hello.png",
googleFonts: [
{ name: "Inter", weight: 700, style: "normal" }
]
}
2. generate_from_template
Generate an image using a pre-built template.
Parameters:
template(string, required): Template name ("social-card", "blog-header", "quote")params(object, required): Template-specific parametersoutputPath(string, required): Where to save the imagewidth(number, optional): Override template widthheight(number, optional): Override template height
Example:
{
template: "social-card",
params: {
title: "Announcing Satori MCP Server",
description: "Generate beautiful images with AI",
backgroundColor: "#2563eb"
},
outputPath: "output/announcement.png"
}
3. list_templates
List all available templates with their descriptions.
No parameters required
Returns a list of templates with their names and descriptions.
Templates
Social Card (1200x630)
Perfect for social media sharing cards.
Parameters:
title(string, required): Main headingdescription(string, optional): Supporting textbackgroundColor(string, optional): Background color (default: #1a1a1a)
Blog Header (1200x480)
Ideal for blog post headers.
Parameters:
title(string, required): Blog post titleauthor(string, required): Author namedate(string, required): Publication datecategory(string, optional): Post category
Quote (1080x1080)
Square format for inspirational quotes.
Parameters:
quote(string, required): The quote textauthor(string, optional): Quote authorbackgroundColor(string, optional): Background color
Creating Custom Templates
Add new templates in src/templates/:
import React from "react";
import type { Template } from "./index";
export const myTemplate: Template = {
name: "my-template",
description: "My custom template",
defaultSize: { width: 1200, height: 630 },
googleFonts: [
{ name: "Inter", weight: 700, style: "normal" }
],
generate: (params: { title: string }) => {
return (
<div style={{
width: "100%",
height: "100%",
display: "flex",
alignItems: "center",
justifyContent: "center",
backgroundColor: "#000",
color: "#fff",
fontFamily: "Inter"
}}>
<h1>{params.title}</h1>
</div>
);
},
};
Then register it in src/templates/index.ts:
import { myTemplate } from "./my-template";
export const templates: Record<string, Template> = {
// ... existing templates
"my-template": myTemplate,
};
Testing
The project includes comprehensive tests for all tools and templates:
# Run all tests
pnpm test
# Test outputs are saved in tests/output/
# Images are generated to verify actual functionality
Test structure:
- Each template has multiple test cases (basic, edge cases, custom styling)
- Tools are tested for proper MCP response format
- Actual PNG images are generated to verify output
Architecture
Built with:
- xmcp - TypeScript framework for MCP servers
- Satori - Convert HTML/CSS to SVG
- @resvg/resvg-js - Convert SVG to PNG
- Google Fonts API - Dynamic font loading
Large Image Handling
Rather than responding with a base64 encoded image, the server saves the image to Vercel Blob storage and responds with a reference url to the object. Most MCP clients and responses have size limitations.
The url is publically accessible, but obfuscated with a large random string appended to the file name.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
License
Mozilla Public License Version 2.0 - see LICENSE file for details
Acknowledgments
- Vercel for creating Satori
- Anthropic for the MCP protocol
- Basement Studio for the xmcp framework
Support
For issues and questions, please use the GitHub Issues page.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。