模板化MCP服务器
MCP(模型上下文协议)服务器 模板化的 -API,用于自动生成图像、视频和PDF。
该服务器使Claude、Cursor和ChatGPT等人工智能助手能够与您的模板化帐户交互-生成渲染图、管理模板、上传资产,并使用自然语言访问所有API功能。
特性
- 渲染生成:从模板创建图像(JPG、PNG、WebP)、视频(MP4)和PDF
- 模板管理:列出、创建、更新、克隆和删除模板
- 分层检查:获取模板层以了解可以定制的内容
- 资产管理:上传和管理图像、视频和自定义字体
- 文件夹组织:为模板创建和管理文件夹
快速开始
获取API密钥
- 注册地址: app.template.io
- 去你的 API密钥页
- 复制API密钥
连接选项
选项1:远程服务器(推荐)
使用我们的托管MCP服务器-无需安装,始终保持最新状态。
端点: https://mcp.templated.io/mcp?apiKey=YOUR_API_KEY
光标IDE
增添 ~/.cursor/mcp.json:
{
"mcpServers": {
"templated": {
"url": "https://mcp.templated.io/mcp?apiKey=your-api-key-here"
}
}
}ChatGPT
- 首选 设置→ 已连接的应用程序→ 添加MCP服务器
- 输入URL:
https://mcp.templated.io/mcp?apiKey=your-api-key-here - 将身份验证设置为 无身份验证
- 单击“创建”
选项2:本地服务器
在您的计算机上本地运行MCP服务器。需要Node.js 18+。
克劳德桌面
Claude Desktop需要在本地运行服务器。添加到您的配置文件中:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json\ 视窗: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"templated": {
"command": "npx",
"args": ["mcp-server-templated"],
"env": {
"TEMPLATED_API_KEY": "your-api-key-here"
}
}
}
}光标IDE(本地)
增添 ~/.cursor/mcp.json:
{
"mcpServers": {
"templated": {
"command": "npx",
"args": ["mcp-server-templated"],
"env": {
"TEMPLATED_API_KEY": "your-api-key-here"
}
}
}
}手动安装
# Using npx (no install needed)
npx mcp-server-templated
# Or install globally
npm install -g mcp-server-templated可用工具
渲染操作
| 工具 | 说明 |
|---|---|
create_render | 从模板创建图像、视频或PDF |
get_render | 获取特定渲染的详细信息 |
list_renders | 列出您帐户中的所有渲染 |
delete_render | 删除渲染 |
merge_renders | 将多个PDF渲染合并为一个 |
模板操作
| 工具 | 说明 |
|---|---|
list_templates | 列出所有模板(带搜索/筛选) |
get_template | 获取模板详细信息 |
get_template_layers | 获取模板的所有层 |
get_template_pages | 获取多页模板的页面 |
create_template | 创建新模板 |
update_template | 更新现有模板 |
clone_template | 克隆模板 |
delete_template | 删除模板 |
list_template_renders | 从模板呈现列表 |
文件夹操作
| 工具 | 说明 |
|---|---|
list_folders | 列出所有文件夹 |
create_folder | 创建新文件夹 |
update_folder | 重命名文件夹 |
delete_folder | 删除文件夹 |
资产运营
| 工具 | 说明 |
|---|---|
list_uploads | 列出上传的资产 |
create_upload | 从URL上传文件 |
delete_upload | 删除上传 |
list_fonts | 列出自定义字体 |
upload_font | 上传自定义字体 |
delete_font | 删除字体 |
账户
| 工具 | 说明 |
|---|---|
get_account | 获取帐户信息和API使用情况 |
示例用法
配置后,您可以要求您的AI助手:
- “列出我的模板”
- “使用标题设置为“Hello World”的模板\[ID\]创建渲染”
- “生成名为'John Doe'的PDF证书”
- “模板\[ID\]有哪些层?”
- “创建一个名为“社交帖子”的新模板,带有标题和图像层”
- “克隆我的Instagram模板并重命名”
- “将此图像上传到我的帐户”
- “显示我的API使用情况和帐户信息”
创建渲染
"Create a render using template abc-123 with these changes:
- Set the 'title' layer text to 'Welcome!'
- Set the 'photo' layer image to https://example.com/photo.jpg
- Output as PNG with transparent background"克劳德将使用 create_render 工具包括:
{
"template": "abc-123",
"format": "png",
"transparent": true,
"layers": {
"title": { "text": "Welcome!" },
"photo": { "image_url": "https://example.com/photo.jpg" }
}
}发展
# Clone the repository
git clone https://github.com/templated-io/mcp-server-templated.git
cd mcp-server-templated
# Install dependencies
npm install
# Build
npm run build
# Run in stdio mode (for local MCP clients)
TEMPLATED_API_KEY=your-key node dist/index.js
# Run in HTTP mode (for remote access)
PORT=3456 node dist/index.js
# Then access: http://localhost:3456/mcp?apiKey=your-keyMCP检验员测试
npx @modelcontextprotocol/inspector npx mcp-server-templated资源
许可证
麻省理工学院
