2Slides Logo
How to Use Gemini CLI with the 2Slides MCP Server (2026 Guide)
2Slides Team
6 min read

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

mcpServers
entry to
~/.gemini/settings.json
command: "npx"
,
args: ["2slides-mcp"]
,
env.API_KEY
for stdio, or
httpUrl: "https://2slides.com/api/mcp?apikey=KEY"
for Streamable HTTP. Or run
gemini 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

  1. Gemini CLI installed (
    gemini
    on your PATH).
  2. A 2Slides API key from 2slides.com/api.
  3. Node.js for the stdio transport (
    npx 2slides-mcp
    ). 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.jsRequiredNot required
Best forLocal devRemote/CI, thin setups

Key name matters: Gemini CLI uses

httpUrl
for Streamable HTTP and
url
for legacy SSE. For the 2Slides Streamable HTTP endpoint, use
httpUrl
.

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": ["2slides-mcp"], "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 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

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:

/mcp

It 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

ToolWhat it doesCredits
themes_search
Find a
themeId
for Fast PPT
Free
slides_generate
Theme-based PowerPoint (Fast PPT), sync/async10 / 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 style100 / page (1K/2K), 200 (4K)
slides_generate_narration
Add AI voice narration to a Nano Banana job210 / page
slides_download_pages_voices
Export pages + audio as a ZIPFree
jobs_get
Poll an async job to completionFree

Common mistakes and troubleshooting

  • Used
    url
    for the Streamable HTTP endpoint.
    Gemini CLI treats
    url
    as SSE. Use
    httpUrl
    for 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-run
    gemini mcp add
    .
  • No
    .pptx
    without the tool.
    Gemini alone drafts an outline; 2Slides produces the file.
  • Tight polling. Let Gemini poll
    jobs_get
    about 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

mcpServers
entry —
command
for local,
httpUrl
for 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