Token导航 LogoToken导航TokenDH.com
Satori MCP Server logo
设计创作未说明官方级别未说明来源级核验

Satori MCP Server

MCP Server

Satori MCP Server是一个基于React组件生成精美图像的MCP服务器,适用于创建社交媒体卡片、博客标题、引用和自定义图像。

工具数

0

提示词数

0

GitHub Stars

11

资源数

0
图像生成TypeScriptClaudeClaude DesktopClaude

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

Jellypod-Inc

提供方

Jellypod-Inc

最后核验

2026/5/17 20:22

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

详细介绍

Cover

Satori MCP服务器

一个MCP(模型上下文协议)服务器,使用 萨托利.直接通过Claude等人工智能助手创建社交卡、博客标题、引文和自定义图像。

特性

  • 🎨 从JSX生成图像 -将React组件转换为PNG图像
  • 📝 内置模板 -社交卡片、博客标题和引用设计
  • 🔤 谷歌字体支持 -访问数百种字体
  • 🚀 MCP协议 -与Claude Desktop和其他MCP客户端无缝协作
  • 🛠️ TypeScript -完全打字!

安装

先决条件

  • Node.js 20+
  • pnpm(推荐)或npm

克隆并安装

git clone https://github.com/Jellypod-Inc/satori-mcp-server.git
cd satori-mcp-server
pnpm install

使用Claude Desktop进行配置

要使用MCP服务器的托管版本,请将服务器添加到Claude Desktop配置中:

{
  "mcpServers": {
    "satori": {
      "type": "http",
      "url": "https://satori.jellypod.ai/mcp"
    }
  }
}

发展

# 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

测试

要测试MCP服务器,请使用模型上下文协议(MCP)检查器:https://modelcontextprotocol.io/legacy/tools/inspector

您可以通过以下方式运行它:

pnpm dlx @modelcontextprotocol/inspector

然后运行本地MCP服务器,并在检查器中连接到localhost。

环境变量

您需要配置Vercel Blob存储以保存生成的映像文件。 从您的Vercel仪表板获取此信息:https://vercel.com/docs/storage/vercel-blob

export const BLOB_READ_WRITE_TOKEN = process.env.BLOB_READ_WRITE_TOKEN;

可用工具

1. generate_image

从自定义JSX内容生成图像。

参数:

  • jsx (string,必填):JSX内容为字符串
  • width (数字,默认值:600):图像宽度(像素)
  • height (数字,默认值:400):图像高度(像素)
  • outputPath (string,必填):保存图像的位置
  • googleFonts (数组,可选):要加载的Google字体

例子:

{
  jsx: '

Hello World

',
  width: 1200,
  height: 630,
  outputPath: "output/hello.png",
  googleFonts: [
    { name: "Inter", weight: 700, style: "normal" }
  ]
}

2. generate_from_template

使用预构建的模板生成图像。

参数:

  • template (字符串,必填):模板名称(“社交卡”、“博客标题”、“引用”)
  • params (object,必填):模板特定参数
  • outputPath (string,必填):保存图像的位置
  • width (数字,可选):覆盖模板宽度
  • height (数字,可选):覆盖模板高度

例子:

{
  template: "social-card",
  params: {
    title: "Announcing Satori MCP Server",
    description: "Generate beautiful images with AI",
    backgroundColor: "#2563eb"
  },
  outputPath: "output/announcement.png"
}

3. list_templates

列出所有可用模板及其说明。

无需参数

返回模板及其名称和描述的列表。

模板

社交卡(1200x630)

非常适合社交媒体分享卡。

参数:

  • title (字符串,必填):主标题
  • description (字符串,可选):支持文本
  • backgroundColor (字符串,可选):背景颜色(默认值:#1a1a1a)

博客标题(1200x480)

非常适合博客文章标题。

参数:

  • title (字符串,必填):博客文章标题
  • author (字符串,必填):作者姓名
  • date (字符串,必填):发布日期
  • category (字符串,可选):帖子类别

报价单(1080x1080)

方形格式的励志名言。

参数:

  • quote (字符串,必填):引号文本
  • author (字符串,可选):引用作者
  • backgroundColor (字符串,可选):背景颜色

创建自定义模板

在中添加新模板 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 (
      

        
{params.title}

      

    );
  },
};

然后在中注册 src/templates/index.ts:

import { myTemplate } from "./my-template";

export const templates: Record = {
  // ... existing templates
  "my-template": myTemplate,
};

测试

该项目包括对所有工具和模板的全面测试:

# Run all tests
pnpm test

# Test outputs are saved in tests/output/
# Images are generated to verify actual functionality

测试结构:

  • 每个模板都有多个测试用例(基本、边缘用例、自定义样式)
  • 测试工具的MCP响应格式是否正确
  • 生成实际PNG图像以验证输出

建筑

内置:

  • xmcp -MCP服务器的TypeScript框架
  • 萨托利 -将HTML/CSS转换为SVG
  • @resvg/resvgjs -将SVG转换为PNG
  • Google字体API-动态字体加载

大图像处理

服务器不会使用base64编码的图像进行响应,而是将图像保存到Vercel Blob存储中,并使用对象的引用url进行响应。大多数MCP客户端和响应都有大小限制。

该url是可公开访问的,但在文件名后附加了一个大的随机字符串。

贡献

欢迎投稿!请随时提交拉取请求。

  1. 分叉存储库
  2. 创建功能分支(git checkout -b feature/amazing-feature)
  3. 提交您的更改(git commit -m 'Add amazing feature')
  4. 推到分支(git push origin feature/amazing-feature)
  5. 打开拉取请求

许可证

Mozilla公共许可证版本2.0-请参阅 许可证 详细信息文件

致谢

支持

有关问题和疑问,请使用 页面。

目录标签

目录标签

图像生成TypeScriptClaude本地部署React组件社交媒体博客工具MCP协议

支持客户端

Claude DesktopClaude

接入字段

传输方式(transport,传输协议)

未说明

鉴权方式(authType,认证方式)

none

工具数量(toolCount,工具数)

0

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

未说明none部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

仍需确认:installCommand

来源信息

继续浏览同类 MCP