

How to Use Gemini CLI with the 2Slides MCP Server (2026 Guide)
Quick answer (≤60 words): Google's Gemini CLI can generate real PowerPoint files via the 2Slides MCP server. Get a key at 2slides.com/api, then add a
entry tomcpServers—~/.gemini/settings.json,command: "npx",args: ["2slides-mcp"]for stdio, orenv.API_KEYfor Streamable HTTP. Or runhttpUrl: "https://2slides.com/api/mcp?apikey=KEY". Then ask Gemini to build a deck.gemini mcp add
Gemini CLI is Google's open-source terminal AI agent, and it speaks the Model Context Protocol (MCP). Connect it to the 2Slides MCP server and Gemini can turn a prompt — or a file in your working directory — into a finished, editable
.pptxThis guide gives the exact
settings.jsongemini mcp addWhy connect Gemini CLI to 2Slides?
Gemini is a strong multimodal reasoner, but it doesn't emit binary
.pptx- Gemini CLI reads your source, plans the slides, and writes the copy.
- The 2Slides MCP server renders the real PowerPoint — theme-based Fast PPT, or image-designed slides with optional AI narration and an exportable bundle.
What you need first
- Gemini CLI installed (on your PATH).
gemini - A 2Slides API key from 2slides.com/api.
- Node.js for the stdio transport (). The HTTP transport needs nothing local.
npx 2slides-mcp
Stdio vs Streamable HTTP: which transport?
Both expose the same tools; the difference is the config key and where the connector runs.
| Stdio (local) | Streamable HTTP (remote) | |
|---|---|---|
| Config key | commandargsenv | httpUrl |
| Local Node.js | Required | Not required |
| Best for | Local dev | Remote/CI, thin setups |
Key name matters: Gemini CLI uses
for Streamable HTTP andhttpUrlfor legacy SSE. For the 2Slides Streamable HTTP endpoint, useurl.httpUrl
Method 1: stdio in settings.json
Gemini CLI reads
~/.gemini/settings.json.gemini/settings.jsonmcpServers{ "mcpServers": { "2slides": { "command": "npx", "args": ["2slides-mcp"], "env": { "API_KEY": "YOUR_2SLIDES_API_KEY" } } } }
env"API_KEY": "$TWOSLIDES_API_KEY"Method 2: Streamable HTTP in settings.json
For the hosted endpoint, use
httpUrl{ "mcpServers": { "2slides-remote": { "httpUrl": "https://2slides.com/api/mcp?apikey=YOUR_2SLIDES_API_KEY" } } }
Prefer header auth? Add a
headers"headers": { "Authorization": "Bearer YOUR_2SLIDES_API_KEY" }Or use the gemini mcp add command
gemini mcp add# stdio (-e sets env vars) gemini mcp add -e API_KEY=YOUR_2SLIDES_API_KEY 2slides npx 2slides-mcp # Streamable HTTP gemini mcp add --transport http 2slides-remote "https://2slides.com/api/mcp?apikey=YOUR_2SLIDES_API_KEY"
These write the same
mcpServerssettings.json-t, --transport-e, --env-H, --header--timeoutVerify the connection
Inside an interactive
gemini/mcp
It shows each server's status (CONNECTED / CONNECTING / DISCONNECTED) and the discovered tools. Use
/mcp authGenerate your first deck
Just ask:
Read ./notes/market-update.md and generate a 9-slide briefing. Find a professional theme from 2slides, build the PowerPoint, and give me the download link.
Gemini CLI runs
themes_searchslides_generatedownloadUrlslides_create_pdf_slidesjobs_getThe 2Slides MCP tool surface
| Tool | What it does | Credits |
|---|---|---|
themes_search | Find a themeId | Free |
slides_generate | Theme-based PowerPoint (Fast PPT), sync/async | 10 / page |
slides_create_pdf_slides | Custom image-designed slides from text (Nano Banana) | 100 / page (1K/2K), 200 (4K) |
slides_create_like_this | Slides matching a reference image's style | 100 / page (1K/2K), 200 (4K) |
slides_generate_narration | Add AI voice narration to a Nano Banana job | 210 / page |
slides_download_pages_voices | Export pages + audio as a ZIP | Free |
jobs_get | Poll an async job to completion | Free |
Common mistakes and troubleshooting
- Used for the Streamable HTTP endpoint. Gemini CLI treats
urlas SSE. Useurlfor 2Slides' Streamable HTTP.httpUrl - Server shows DISCONNECTED in . Check the API key, and for stdio confirm Node.js is installed.
/mcp - No tools listed. Restart the session after editing , or re-run
settings.json.gemini mcp add - No without the tool. Gemini alone drafts an outline; 2Slides produces the file.
.pptx - Tight polling. Let Gemini poll about every 20 seconds for async Nano Banana / narration jobs.
jobs_get
Frequently asked questions
Does Gemini CLI support MCP servers?
Yes. Gemini CLI is an MCP client. Configure servers under
mcpServers~/.gemini/settings.jsongemini mcp addWhat's the config key for a Streamable HTTP server?
httpUrlurlhttpUrlWhere does Gemini CLI store MCP config?
~/.gemini/settings.json.gemini/settings.jsonmcpServersDoes it produce a real PowerPoint?
Yes —
slides_generate.pptxWhere do I get the key and config?
At 2slides.com/api?tab=mcp: your key, a copy-paste config, and the Streamable HTTP endpoint URL.
The takeaway
One
entry —mcpServersfor local,commandfor remote — turns Gemini CLI into a slide generator. Verify withhttpUrl, then just ask for a deck./mcp
For the wider picture, see how MCP is changing presentation workflows and the PowerPoint MCP server ecosystem map. Working in another terminal agent? See Claude Code, OpenAI Codex, and Qwen Code with the same server.
Get your key and config at 2slides.com/api?tab=mcp and generate your first deck from the Gemini CLI in under a minute.
Sources:
About 2Slides
Create stunning AI-powered presentations in seconds. Transform your ideas into professional slides with 2slides AI Agent.
Try For Free