Skip to main content

MCP-Server für die Gamma.app API — erstellt Präsentationen, Dokumente und mehr via KI-Agenten

Project description

gamma31

MCP-Server für die Gamma.app API — erstellt Präsentationen, Dokumente, Social Posts und Webseiten über KI-Agenten.

Basiert auf FastMCP 3.x mit Session State, Elicitation, Tool Timeouts und Tags.

Features

  • Präsentationen, Dokumente, Social Posts und Webseiten generieren
  • Generierung aus bestehenden Vorlagen (Templates, Beta)
  • Interaktive Rückfragen vor der Generierung (Sprache, Zielgruppe, Ton, Textmenge)
  • Fortschrittsanzeige beim Warten auf Fertigstellung
  • Themes und Ordner auflisten und verwenden
  • Export als PDF oder PPTX
  • 60+ Sprachen
  • Automatisches Polling bis Fertigstellung
  • Session-basiertes Credit-Tracking
  • Tool Timeouts für zuverlässigen Betrieb

Architektur

flowchart TD
    Agent["KI-Agent / Chat"] -->|"Tool-Aufruf"| MCP["gamma31 MCP Server\n(FastMCP 3.x, stdio/SSE)"]

    subgraph elicit [Interaktive Rueckfragen]
        MCP -->|"ctx.elicit()"| User["Nutzer"]
        User -->|"Sprache, Zielgruppe,\nTon, Textmenge"| MCP
    end

    MCP -->|"POST /generations"| GammaAPI["Gamma.app API\n(public-api.gamma.app)"]
    MCP -->|"GET /generations/id\n+ ctx.report_progress()"| GammaAPI
    MCP -->|"GET /themes"| GammaAPI
    MCP -->|"GET /folders"| GammaAPI
    GammaAPI -->|"gammaUrl, pdfUrl,\npptxUrl, Credits"| MCP
    MCP -->|"ctx.set_state()\nCredit-Tracking"| SessionState["Session State"]
    MCP -->|"JSON-Ergebnis"| Agent

Ablauf: Der KI-Agent ruft ein Tool auf. Bei gamma_generieren fragt der Server den Nutzer optional nach Sprache, Zielgruppe, Ton und Textmenge (Elicitation). Dann wird die Gamma.app API angesprochen. Beim Polling zeigt gamma_status_abrufen den Fortschritt an und trackt verbrauchte Credits in der Session.

Voraussetzungen

Installation & Nutzung

1. Als uvx-Paket (empfohlen)

GAMMA_API_KEY=sk-gamma-xxx uvx gamma31

2. In einer MCP-Plattform (Python-Paket, stdio)

Einstellung Wert
Paketname gamma31
Umgebungsvariable GAMMA_API_KEY = sk-gamma-xxx

3. Als Remote-Server (SSE/HTTP)

GAMMA_API_KEY=sk-gamma-xxx uv run gamma31 --transport sse --port 8000

Verbinden Sie dann Ihre MCP-Plattform als Remote-HTTP mit der URL http://localhost:8000/sse (oder der ngrok-URL für externen Zugriff).

4. In Claude Desktop

Fügen Sie folgendes in Ihre Claude Desktop Konfigurationsdatei ein:

{
  "mcpServers": {
    "gamma": {
      "command": "uvx",
      "args": ["gamma31"],
      "env": {
        "GAMMA_API_KEY": "sk-gamma-xxx"
      }
    }
  }
}

Verfügbare Tools

Tool Beschreibung Tags
gamma_generieren Erstellt eine neue Gamma mit optionaler interaktiver Rückfrage (Sprache, Zielgruppe, Ton, Textmenge) core
gamma_aus_vorlage_erstellen Erstellt eine Gamma aus einem bestehenden Template (Beta) beta
gamma_status_abrufen Wartet auf Fertigstellung mit Fortschrittsanzeige, liefert URL + Downloads core
gamma_themes_auflisten Listet verfügbare Themes mit Paginierung lookup
gamma_ordner_auflisten Listet Workspace-Ordner mit Paginierung lookup

Typischer Workflow

1. Optional: gamma_themes_auflisten  → Theme-ID auswählen
2. Optional: gamma_ordner_auflisten  → Ordner-ID auswählen
3. gamma_generieren                  → Rückfragen → erhält generationId
4. gamma_status_abrufen              → Fortschritt → Gamma-URL + Downloads

Umgebungsvariablen

Variable Pflicht Beschreibung Standard
GAMMA_API_KEY Ja Gamma API-Key (Format: sk-gamma-xxx)
MCP_TRANSPORT Nein Transport-Modus: stdio oder sse stdio
MCP_PORT Nein Port für SSE-Transport 8000
MCP_HOST Nein Host für SSE-Transport 0.0.0.0

Sicherheit: Der API-Key wird ausschließlich über die Umgebungsvariable GAMMA_API_KEY übergeben und ist nirgends im Quellcode enthalten. Das Paket auf PyPI enthält keine Secrets.

Entwicklung

git clone https://github.com/localmind-ai/gamma31.git
cd gamma31
uv sync
GAMMA_API_KEY=sk-gamma-xxx fastmcp dev inspector src/gamma31/server.py -e .

Testen

# Tools auflisten
fastmcp list tools src/gamma31/server.py

# Tool direkt aufrufen
GAMMA_API_KEY=sk-gamma-xxx fastmcp call src/gamma31/server.py gamma_themes_auflisten '{"limit": 3}'

Veröffentlichen auf PyPI

# Bauen
uv build

# Veröffentlichen
uv publish --token pypi-xxxx

# Testen ob es funktioniert
GAMMA_API_KEY=sk-gamma-xxx uvx gamma31

Lizenz

MIT — siehe LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gamma31-0.1.1.tar.gz (64.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gamma31-0.1.1-py3-none-any.whl (12.1 kB view details)

Uploaded Python 3

File details

Details for the file gamma31-0.1.1.tar.gz.

File metadata

  • Download URL: gamma31-0.1.1.tar.gz
  • Upload date:
  • Size: 64.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.5 {"installer":{"name":"uv","version":"0.10.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for gamma31-0.1.1.tar.gz
Algorithm Hash digest
SHA256 91a358ff3819c81db22741b316aaa82d12d51d6a582db997b11707bbaa835e2c
MD5 46ab17a66a47879bbb1633e694794125
BLAKE2b-256 3104c7ce659aaea7b6d387c1dc89d3155eef62691dfd118488958733cdbce46f

See more details on using hashes here.

File details

Details for the file gamma31-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: gamma31-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 12.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.5 {"installer":{"name":"uv","version":"0.10.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for gamma31-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 256a2d0cb96925b0b13651836c7424a440e8d28ea51561356112562af4e62665
MD5 3c5ccfbc3e9d1ae88af7566472b61bf3
BLAKE2b-256 20f0b9eef1e284b6f798cdb882746089ce8191cfa3a6d4df6210c9999d12ef34

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page