2滑动MCP服务器
暴露 2slides.com MCP客户端的工具(例如Claude Desktop)。
获取API密钥
在使用此MCP服务器之前,您需要从获取API密钥 2slides.com/api.
在Claude桌面中配置
编辑 ~/Library/Application Support/Claude/claude_desktop_config.json 并添加:
{
"mcpServers": {
"2slides": {
"command": "npx",
"args": ["2slides-mcp"],
"env": {
"API_KEY": "YOUR_2SLIDES_API_KEY"
}
}
}
}然后完全重新启动Claude Desktop。在聊天中,打开工具面板,您应该会看到下面的工具。
可用工具
______________________________________________________________________
slides_generate (POST/api/v1/幻灯片/生成)
使用预构建的主题生成PowerPoint演示文稿(快速PPT)。使用 themes_search 首先找到a themeId.
- Args:
- userInput (字符串,必填)--演示内容 - themeId (字符串,必填)--主题ID来自 themes_search - responseLanguage (字符串,可选,默认值: Auto)——输出语言;支持的值: Auto, English, Spanish, Arabic, Portuguese, Indonesian, Japanese, Russian, Hindi, French, German, Greek, Vietnamese, Turkish, Thai, Polish, Italian, Korean, Simplified Chinese, Traditional Chinese - mode (可选,默认值: sync) — sync 回报 downloadUrl 立即; async 返回a jobId 与投票 jobs_get
- 信用: 每页1个
- 例子:
{
"themeId": "st-1756528793701-fcg5fblt2",
"userInput": "Generate a 5-slide intro to machine learning",
"responseLanguage": "English",
"mode": "sync"
}______________________________________________________________________
themes_search (GET/api/v1/主题/搜索)
搜索要使用的预构建主题 slides_generate.
- Args:
- query (string,必填)--搜索关键字(例如。 business, minimal, dark) - limit (数字,可选,默认值: 10,范围: 1–100)
- 退货: 一系列主题
id,name,description,previewUrl,tags - 信用: 自由
- 例子:
{ "query": "business", "limit": 5 }______________________________________________________________________
jobs_get (GET/api/v1/jobs/{jobId})
轮询作业的状态,并在准备就绪时检索结果。
- Args:
- jobId (字符串,必填)
- 退货:
jobId,status(pending/processing/success/failed),message,downloadUrl(当成功时),slidePageCount,createdAt,updatedAt,duration(ms),jobUrl(仅限Nano Banana职位) - 信用: 自由
- 注: 每20秒轮询一次,直到
status是success或failed. - 例子:
{ "jobId": "D8h9VYDGdTlZ6wWSEoctF" }______________________________________________________________________
slides_create_like_this (POST/api/v1/幻灯片/创建方式如下)
生成与参考图像风格相匹配的幻灯片(Nano Banana)。
- Args:
- userInput (字符串,必填)--演示内容 - referenceImageUrl (string,必填)--样式参考图像的URL - responseLanguage (字符串,可选,默认值: Auto) - aspectRatio (字符串,可选,默认值: 16:9)--有效值: 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9 - resolution (字符串,可选,默认值: 2K) — 1K, 2K, 4K - page (数字,可选,默认值: 0) — 0 =自动检测, 1–100 =精确页数 - contentDetail (字符串,可选,默认值: standard) — concise 或 standard - mode (字符串,可选,默认值: async) — async 回报 jobId; sync 回报 downloadUrl 立即
- 信用: 每页100(1K/2K)或每页200(4K)
- 例子:
{
"userInput": "Create a presentation about AI trends",
"referenceImageUrl": "https://example.com/style-reference.jpg",
"aspectRatio": "16:9",
"resolution": "2K",
"page": 5,
"contentDetail": "standard",
"mode": "async"
}______________________________________________________________________
slides_create_pdf_slides (POST/api/v1/幻灯片/创建pdf幻灯片)
从文本内容生成定制设计的幻灯片(Nano Banana),无需参考图像。
- Args:
- userInput (字符串,必填)--演示内容 - designStyle (string,可选)——视觉样式的自由文本描述;为默认样式留空 - responseLanguage (字符串,可选,默认值: Auto) - aspectRatio (字符串,可选,默认值: 16:9)--有效值: 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9 - resolution (字符串,可选,默认值: 2K) — 1K, 2K, 4K - page (数字,可选,默认值: 0) — 0 =自动检测, 1–100 =精确页数 - contentDetail (字符串,可选,默认值: standard) — concise 或 standard - mode (字符串,可选,默认值: async) — async 回报 jobId; sync 回报 downloadUrl 立即
- 信用: 每页100(1K/2K)或每页200(4K)
- 例子:
{
"userInput": "Quarterly business review for Q3 2025",
"designStyle": "modern, dark background, bold typography",
"aspectRatio": "16:9",
"resolution": "2K",
"page": 8,
"mode": "async"
}______________________________________________________________________
slides_generate_narration (POST/api/v1/幻灯片/生成旁白)
将AI语音旁白添加到已完成的Nano Banana作业中(slides_create_like_this 或 slides_create_pdf_slides 只有;不支持快速PPT)。始终异步--投票结果为 jobs_get.
- Args(单扬声器,
mode: "single"默认值):
- jobId (string,必填)--已完成的Nano Banana作业的UUID - mode (字符串,可选,默认值: single) — single 或 multi - speakerName (字符串,可选)--叙述者姓名 - voice (字符串,可选)——30个声音中的一个(见下表) - contentMode (字符串,可选,默认值: standard) — concise 或 standard - includeIntro (布尔值,可选,默认值: true)
- Args(两个扬声器,
mode: "multi"):
- jobId (字符串,必填) - mode (字符串,必填)-- multi - speaker1Name (字符串,必填) - speaker2Name (字符串,必填) - speaker1Voice (字符串,可选)--扬声器1的语音 - speaker2Voice (字符串,可选)-扬声器2的语音 - contentMode (字符串,可选,默认值: standard) — concise 或 standard
- 支持的声音(30):
Puck,Aoede,Charon,Kore,Fenrir,Zephyr,Leda,Orus,Callirrhoe,Autonoe,Enceladus,Iapetus,Umbriel,Algieba,Despina,Erinome,Algenib,Rasalgethi,Laomedeia,Achernar,Alnilam,Schedar,Gacrux,Pulcherrima,Achird,Zubenelgenubi,Vindemiatrix,Sadachbia,Sadaltager,Sulafat
- 信用: 每页210条(10条文本+200条音频)
- 例子:
{
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"mode": "multi",
"speaker1Name": "Alice",
"speaker2Name": "Bob",
"speaker1Voice": "Aoede",
"speaker2Voice": "Puck",
"contentMode": "standard"
}______________________________________________________________________
slides_download_pages_voices (POST/api/v1/幻灯片/下载幻灯片页面语音)
将幻灯片和音频旁白导出为ZIP文件。作业必须完成并生成叙述。
- Args:
- jobId (string,必填)--已完成叙述的作业的UUID
- 退货:
downloadUrl(1小时后到期),fileName,expiresIn(3600秒) - ZIP内容:
pages/
page_01.png, page_02.png, …
voices/
page_01.wav, page_02.wav, …
transcript.txt- 信用: 自由
- 例子:
{ "jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890" }______________________________________________________________________
典型工作流程
快速PPT(基于主题的PowerPoint):
themes_search→ get athemeIdslides_generate(同步)→ getdownloadUrl直接
纳米香蕉(定制设计幻灯片):
slides_create_like_this或slides_create_pdf_slides(异步)→ getjobIdjobs_get(每20秒投票一次)→ getdownloadUrl当status: "success"
带旁白的纳米香蕉:
slides_create_like_this或slides_create_pdf_slides→ getjobIdjobs_get→ 等待幻灯片完成slides_generate_narration→ 获取叙述jobIdjobs_get→ 等待叙述完成slides_download_pages_voices→ 获取ZIP下载链接
______________________________________________________________________
故障排除(克劳德桌面)
- 如果工具未出现在Claude中,请验证配置路径是否为绝对路径,然后重新启动应用程序。
- 检查Claude MCP日志:
tail -n 50 -f ~/Library/Logs/Claude/mcp*.log- 对于stdio MCP服务器,避免记录到stdout;此服务器仅将错误记录到stderr。
参考文献
- 构建MCP服务器(官方文档):https://modelcontextprotocol.io/docs/develop/build-server
- 2 API文件:https://2slides.com/api
- 2滑道:https://2slides.com
- 2幻灯片模板:https://2slides.com/templates

