Gamma MCP Server

Gamma MCP Server

Enables AI assistants to generate presentations, documents, and webpages through the Gamma.app API with support for custom themes, tones, audiences, and image generation.

Category
Visit Server

README

Gamma MCP Server

Model Context Protocol (MCP) server för Gamma.app - gör det möjligt för AI-assistenter att generera presentationer via Gamma API.

Features

  • 3 MCP Tools:

    • gamma_generate - Skapa presentation/dokument
    • gamma_get_generation - Hämta status på generation
    • gamma_list_generations - Lista tidigare generationer
  • Två lägen:

    • stdio - För Claude Desktop (lokal användning)
    • HTTP - För AI Engine & webbapplikationer (24/7 deployment)
  • Full Gamma API support:

    • Presentations, Documents, Webpages
    • Custom themes, tones, audiences
    • Swedish language default
    • Image generation

Installation

1. Klona/Kopiera projektet

cd ~/gamma-mcp-server

2. Installera dependencies

npm install

3. Konfigurera API key

Uppdatera .env filen med din Gamma API key:

GAMMA_API_KEY=sk-gamma-your-key-here

4. Bygg projektet

npm run build

Användning

Lokal testning (stdio mode)

För att testa med Claude Desktop eller lokalt:

npm start

Lägg till i Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "gamma": {
      "command": "node",
      "args": ["/absolut/sökväg/till/gamma-mcp-server/dist/index.js"]
    }
  }
}

HTTP Server (för AI Engine)

Starta HTTP-servern:

npm run start:streamable

Servern körs på http://localhost:3000/mcp

Deployment till allgot.se

Metod 1: PM2 (Process Manager)

# Installera PM2
npm install -g pm2

# Starta servern
pm2 start dist/streamable-http-server.js --name gamma-mcp

# Auto-restart vid server reboot
pm2 startup
pm2 save

Metod 2: Systemd Service

Skapa /etc/systemd/system/gamma-mcp.service:

[Unit]
Description=Gamma MCP Server
After=network.target

[Service]
Type=simple
User=www-data
WorkingDirectory=/home/u210698164/gamma-mcp-server
Environment=NODE_ENV=production
ExecStart=/usr/bin/node dist/streamable-http-server.js
Restart=always

[Install]
WantedBy=multi-user.target

Aktivera:

sudo systemctl enable gamma-mcp
sudo systemctl start gamma-mcp

Nginx Reverse Proxy

Lägg till i nginx config:

location /gamma-mcp {
    proxy_pass http://localhost:3000/mcp;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection 'upgrade';
    proxy_set_header Host $host;
    proxy_cache_bypass $http_upgrade;

    # För SSE streaming
    proxy_buffering off;
    proxy_read_timeout 600s;
}

Integration med AI Engine

1. Via Code Engine Pro

Skapa ett PHP snippet i Code Engine (typ: function):

function gamma_create_presentation($params) {
    $mcp_url = 'https://allgot.se/gamma-mcp';

    $request = [
        'jsonrpc' => '2.0',
        'id' => 1,
        'method' => 'tools/call',
        'params' => [
            'name' => 'gamma_generate',
            'arguments' => $params
        ]
    ];

    $response = wp_remote_post($mcp_url, [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json, text/event-stream'
        ],
        'body' => json_encode($request),
        'timeout' => 60
    ]);

    return json_decode(wp_remote_retrieve_body($response), true);
}

2. Direkt i AI Engine

Om AI Engine stödjer externa MCP servers kan du konfigurera:

  • Endpoint: https://allgot.se/gamma-mcp
  • Metod: POST
  • Headers: Accept: application/json, text/event-stream

API Examples

Skapa presentation

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "gamma_generate",
    "arguments": {
      "inputText": "Hållbar utveckling i skolan",
      "format": "presentation",
      "numCards": 12,
      "textTone": "educational",
      "textAudience": "teachers",
      "textLanguage": "Swedish"
    }
  }
}

Hämta status

{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "tools/call",
  "params": {
    "name": "gamma_get_generation",
    "arguments": {
      "generationId": "gen_abc123"
    }
  }
}

Environment Variables

Variable Beskrivning Default
GAMMA_API_KEY Din Gamma API key (REQUIRED) -
GAMMA_API_BASE_URL Gamma API bas-URL https://public-api.gamma.app/v1.0
PORT HTTP server port 3000
HOST HTTP server host 0.0.0.0
NODE_ENV Environment mode development

Security

  • ⚠️ Lägg ALDRIG till .env i git
  • ✅ Använd HTTPS i produktion
  • ✅ Begränsa access till MCP endpoint (firewall/auth)
  • ✅ Håll Gamma API key säker

Troubleshooting

Server startar inte

# Kolla om port 3000 redan används
lsof -i :3000

# Prova annan port
PORT=3001 npm run start:streamable

Gamma API errors

# Testa API key manuellt
curl -X POST https://public-api.gamma.app/v1.0/generate \
  -H "X-API-KEY: your-key-here" \
  -H "Content-Type: application/json" \
  -d '{"input_text":"Test","format":"presentation"}'

MCP connection issues

  • Kontrollera att Accept: application/json, text/event-stream header finns
  • Kolla server logs: pm2 logs gamma-mcp eller journalctl -u gamma-mcp -f
  • Verifiera att nginx reverse proxy är korrekt konfigurerad

Support

För frågor eller problem, kontakta: isak@allgot.se

License

MIT License - Allgot.se

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

Official
Featured