NG

nickloveinvesting/gamma-mcpserver

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

22 stars 10 forks 质量 55 趋势 0

本文档将指导你如何搭建和运行Gamma MCP(模型上下文协议)服务器,它允许你直接从MCP客户端生成演示文稿,比如......

概览

本文档指导你如何搭建和运行 Gamma MCP(模型上下文协议)服务器,该服务器允许你直接从 MCP 客户端(如 Anthropic 的 Claude for Desktop)使用 Gamma API 生成演示文稿。 Gamma 是一个由人工智能驱动的平台,旨在帮助用户创建各种类型的内容,重点放在演示上。它利用人工智能自动生成幻灯片、建议文本并融入图像,使得从简单的提示或现有文档快速开发精致的演示文稿。该 MCP 服务器专门与 Gamma 的 API 交互,将演示生成功能引入 Claude for Desktop 等环境。查看 Gamma API 文档了解更多信息。 该服务器向MCP客户端(如Claude for Desktop)展示一个工具,客户端可以接收提示和各种参数,使用Gamma API生成演示文稿。服务器会返回生成演示文稿的链接。

概述(AI 翻译)

本文档指导你如何搭建和运行 Gamma MCP(模型上下文协议)服务器,该服务器允许你直接从 MCP 客户端(如 Anthropic 的 Claude for Desktop)使用 Gamma API 生成演示文稿。

什么是伽玛?

Gamma 是一个由人工智能驱动的平台,旨在帮助用户创建各种类型的内容,重点放在演示上。它利用人工智能自动生成幻灯片、建议文本并融入图像,使得从简单的提示或现有文档快速开发精致的演示文稿。该 MCP 服务器专门与 Gamma 的 API 交互,将演示生成功能引入 Claude for Desktop 等环境。查看 Gamma API 文档了解更多信息。

我们将要建造的东西

该服务器向MCP客户端(如Claude for Desktop)展示一个工具,客户端可以接收提示和各种参数,使用Gamma API生成演示文稿。服务器会返回生成演示文稿的链接。

核心MCP概念

模型上下文协议服务器可以提供三种主要功能类型:

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

Gamma MCP Server

This document guides you through setting up and running the Gamma MCP (Model Context Protocol) server, which allows you to generate presentations using the Gamma API directly from MCP clients like Anthropic’s Claude for Desktop.

What is Gamma?

Gamma is an AI-powered platform designed to help users create various types of content, with a strong focus on presentations. It leverages artificial intelligence to automatically generate slides, suggest text, and incorporate imagery, allowing for rapid development of polished presentations from simple prompts or existing documents. This MCP server specifically interacts with Gamma’s API to bring this presentation generation capability into environments like Claude for Desktop. Check out the Gamma API docs to learn more.

What We’ll Be Building

This server exposes a tool to an MCP client (like Claude for Desktop) that can take a prompt and various parameters to generate a presentation using the Gamma API. The server will return a link to the generated presentation.

Core MCP Concepts

Model Context Protocol servers can provide three main types of capabilities:

  • Resources: File-like data that can be read by clients (like API responses or file contents).
  • Tools: Functions that can be called by the LLM (with user approval).
  • Prompts: Pre-written templates that help users accomplish specific tasks.

This server primarily focuses on providing a Tool.

Prerequisite Knowledge

This quickstart assumes you have familiarity with:

  • Node.js and TypeScript.
  • LLMs like Anthropic’s Claude.
  • Basic command-line usage.

System Requirements

  • Node.js (v16 or higher recommended).
  • npm (Node Package Manager) or yarn.
  • Access to the Gamma API. You’ll need an API key, don’t have one? Check out the Gamma API docs to get one.

Set Up Your Environment

  1. Clone the Repository / Get the Code: If this project is in a Git repository, clone it:

    git clone [email protected]:gamma-app/gamma-mcp-server.git
    cd gamma-mcp-server
    
  2. Initialize Your Node.js Project (if not cloned): If you created a new directory, initialize a package.json file:

    npm init -y
    
  3. Install Dependencies: You’ll need the MCP SDK, Zod for validation, node-fetch for API calls, TypeScript, and ts-node to run TypeScript directly.

    npm install @modelcontextprotocol/sdk zod node-fetch typescript ts-node @types/node
    # or
    # yarn add @modelcontextprotocol/sdk zod node-fetch typescript ts-node @types/node
    
  4. Configure TypeScript:

在 GitHub 查看完整 README

安装

npx ts-node // If command is 'npx' // If command is absolute path to node: // "/PATH/TO/gamma-mcp-server/node_modules/ts-node/dist/bin.js src/index.ts
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "gamma-presentation-generator": { "command": "npx", // Or absolute path to npx, or node "args": [ "ts-node", // If command is 'npx' // If command is absolute path to node: // "/PATH/TO/gamma-mcp-server/node_modules/ts-node/dist/bin.js", "src/index.ts" ], "cwd": "/ABSOLUTE/PATH/TO/YOUR/gamma-mcp-server" // Current Working Directory for the server } } }