

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
mcpServersentry to~/.gemini/settings.json—command: "npx",args: ["2slides-mcp"],env.API_KEYfor stdio, orhttpUrl: "https://2slides.com/api/mcp?apikey=KEY"for Streamable HTTP. Or rungemini mcp add. Then ask Gemini to build a deck.
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 .pptx.
This guide gives the exact settings.json blocks for both transports (local stdio and remote Streamable HTTP), the gemini mcp add shortcut, and what each 2Slides tool does.
Why connect Gemini CLI to 2Slides?
Gemini is a strong multimodal reasoner, but it doesn't emit binary .pptx files on its own. The 2Slides MCP server is the dedicated generator:
- 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 (
geminion your PATH). - A 2Slides API key from 2slides.com/api.
- Node.js for the stdio transport (
npx -y 2slides-mcp@latest). The HTTP transport needs nothing local.
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 | command / args / env | httpUrl |
| Local Node.js | Required | Not required |
| Best for | Local dev | Remote/CI, thin setups |
Key name matters: Gemini CLI uses
httpUrlfor Streamable HTTP andurlfor legacy SSE. For the 2Slides Streamable HTTP endpoint, usehttpUrl.
Method 1: stdio in settings.json
Gemini CLI reads ~/.gemini/settings.json (global) and .gemini/settings.json (project). Add an mcpServers block:
{
"mcpServers": {
"2slides": {
"command": "npx",
"args": ["-y", "2slides-mcp@latest"],
"env": { "API_KEY": "YOUR_2SLIDES_API_KEY" }
}
}
}env values can also reference shell variables (e.g. "API_KEY": "$TWOSLIDES_API_KEY") if you'd rather not inline the 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 object: "headers": { "Authorization": "Bearer YOUR_2SLIDES_API_KEY" }.
Or use the gemini mcp add command
# stdio (-e sets env vars)
gemini mcp add -e API_KEY=YOUR_2SLIDES_API_KEY 2slides npx -y 2slides-mcp@latest
# Streamable HTTP
gemini mcp add --transport http 2slides-remote "https://2slides.com/api/mcp?apikey=YOUR_2SLIDES_API_KEY"These write the same mcpServers entries into settings.json. Flags include -t, --transport (stdio | sse | http), -e, --env, -H, --header, and --timeout.
Verify the connection
Inside an interactive gemini session, run:
/mcpIt shows each server's status (CONNECTED / CONNECTING / DISCONNECTED) and the discovered tools. Use /mcp auth if a remote server requires OAuth.
Generate 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_search → slides_generate (Fast PPT) → returns the downloadUrl. For custom image-designed slides it uses slides_create_pdf_slides and polls jobs_get until the deck is ready.
The 2Slides MCP tool surface
| Tool | What it does | Credits |
|---|---|---|
themes_search | Find a themeId for Fast PPT | 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_slides_pages_voices | Export pages + audio as a ZIP | Free |
jobs_get | Poll an async job to completion | Free |
Common mistakes and troubleshooting
- Used
urlfor the Streamable HTTP endpoint. Gemini CLI treatsurlas SSE. UsehttpUrlfor 2Slides' Streamable HTTP. - Server shows DISCONNECTED in
/mcp. Check the API key, and for stdio confirm Node.js is installed. - No tools listed. Restart the session after editing
settings.json, or re-rungemini mcp add. - No
.pptxwithout the tool. Gemini alone drafts an outline; 2Slides produces the file. - Tight polling. Let Gemini poll
jobs_getabout every 20 seconds for async Nano Banana / narration jobs.
Frequently asked questions
Does Gemini CLI support MCP servers?
Yes. Gemini CLI is an MCP client. Configure servers under mcpServers in ~/.gemini/settings.json, or add them with gemini mcp add. Stdio, SSE, and Streamable HTTP transports are all supported.
What's the config key for a Streamable HTTP server?
httpUrl. Use url only for legacy SSE servers. The 2Slides Streamable HTTP endpoint goes in httpUrl.
Where does Gemini CLI store MCP config?
~/.gemini/settings.json (global) or .gemini/settings.json (project). The MCP block is the top-level mcpServers key.
Does it produce a real PowerPoint?
Yes — slides_generate returns an editable .pptx. The Nano Banana tools return image-designed decks with optional AI narration.
Where 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
mcpServersentry —commandfor local,httpUrlfor remote — turns Gemini CLI into a slide generator. Verify with/mcp, then just ask for a deck.
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