

How to Use Claude Code with the 2Slides MCP Server (2026 Guide)
Quick answer (≤60 words): Claude Code can generate real PowerPoint files by connecting to the 2Slides MCP server. Get an API key at 2slides.com/api, then run
claude mcp add 2slides -e API_KEY=xxx -- npx -y 2slides-mcp@latestfor local stdio, orclaude mcp add --transport http 2slides https://2slides.com/api/mcp?apikey=KEYfor remote Streamable HTTP. Then just ask Claude Code to build a deck.
Claude Code is Anthropic's terminal-based coding agent, and it speaks the Model Context Protocol (MCP) natively. That means you can give it a tool that turns text into a finished .pptx file without ever leaving your shell. The 2Slides MCP server is that tool: a thin connector that exposes 2Slides' slide-generation, theming, narration, and export APIs as MCP tools Claude Code can call directly.
This guide shows you both ways to connect — local stdio and remote Streamable HTTP — which one to pick, what each tool does, and the exact prompts that turn a one-line request into a downloadable PowerPoint.
Why connect Claude Code to 2Slides at all?
Claude Code is excellent at reasoning over your repo, drafting content, and structuring an argument. What it cannot do on its own is emit a real, editable .pptx with shapes, charts, themes, and speaker notes. That is a file-generation problem, and it belongs to a dedicated tool.
The split is clean:
- Claude Code reads your source material (a README, a spec, a CSV, a research note), reasons about it, and decides what goes on each slide.
- The 2Slides MCP server takes that plan and renders an actual PowerPoint file — or image-based slides with AI voice narration and an MP4 export.
You stay in the terminal the whole time. Ask, wait ~30–60 seconds, get a download URL.
What you need first
- Claude Code installed and authenticated (
claudeon your PATH). - A 2Slides API key. Create one at 2slides.com/api. The same page has a copy-paste MCP config and the Streamable HTTP endpoint.
- Node.js (for the stdio transport, which runs
npx -y 2slides-mcp@latestlocally). The HTTP transport needs nothing local at all.
Stdio vs Streamable HTTP: which transport?
The 2Slides MCP server supports two transports. Both expose the identical tool set; they differ only in where the connector runs.
| Stdio Protocol | Streamable HTTP Protocol | |
|---|---|---|
| Where it runs | Locally, via npx -y 2slides-mcp@latest | Remotely, hosted by 2Slides |
| Needs Node.js locally | Yes | No |
| Setup | Add a stdio server + API_KEY env | Add one URL with ?apikey= |
| Best for | Local dev, offline-friendly, full control | Containers, CI, thin clients, zero local deps |
| Auth | API_KEY env var | API key in the URL query (or Authorization header) |
Rule of thumb: use stdio on your own machine for day-to-day work, and Streamable HTTP when Claude Code runs somewhere you cannot install Node (a remote box, a CI job, a locked-down container).
Method 1: Connect via stdio (local)
Run this once. The -- separator splits Claude Code's own flags from the command it launches:
claude mcp add 2slides -e API_KEY=YOUR_2SLIDES_API_KEY -- npx -y 2slides-mcp@latestA few things worth knowing:
- Keep
--transport stdio(or another flag) between--envand the server name. Because--envaccepts multipleKEY=valuepairs, putting the name right after it can make the CLI read the name as another env var. - Everything after
--is passed to the server untouched (npx -y 2slides-mcp@latest). - Add
--scope userto make 2Slides available in every project, or--scope projectto commit it to a shared.mcp.jsonfor your team.
The resulting .mcp.json (project scope) looks like this — you can also hand-edit it:
{
"mcpServers": {
"2slides": {
"command": "npx",
"args": ["-y", "2slides-mcp@latest"],
"env": { "API_KEY": "YOUR_2SLIDES_API_KEY" }
}
}
}Method 2: Connect via Streamable HTTP (remote)
No local install — just point Claude Code at the hosted endpoint:
claude mcp add --transport http 2slides https://2slides.com/api/mcp?apikey=YOUR_2SLIDES_API_KEYPrefer to keep the key out of the URL? Send it as a header instead:
claude mcp add --transport http 2slides https://2slides.com/api/mcp \
--header "Authorization: Bearer YOUR_2SLIDES_API_KEY"Verify the connection
claude mcp list # 2slides should appear and connect
claude mcp get 2slides # show its config and discovered toolsOr, inside an interactive session, run the /mcp slash command to see connected servers, tool counts, and (for remote servers) the auth status.
Generate your first deck
Once connected, you do not call tools by hand — you just ask. Claude Code chains the 2Slides tools automatically:
Search the 2slides themes for a clean "business" style, then
generate a 7-slide deck introducing our Q3 roadmap. Pull the
content from ./ROADMAP.md. Return the download link.Behind the scenes Claude Code runs themes_search to find a themeId, then slides_generate (Fast PPT) and hands you a downloadUrl. Total time: roughly 30–60 seconds for a themed PowerPoint.
Want custom, image-designed slides instead of a template? Ask for that and Claude Code will use the Nano Banana path (slides_create_pdf_slides), poll jobs_get until it is ready, and return the link.
The 2Slides MCP tool surface
Claude Code sees these tools once connected:
| Tool | What it does | Credits |
|---|---|---|
themes_search | Find a themeId for Fast PPT | Free |
slides_generate | Theme-based PowerPoint (Fast PPT), sync or 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 until success | Free |
Three typical chains:
- Fast PPT:
themes_search→slides_generate(sync) → download. - Nano Banana:
slides_create_pdf_slides(async) →jobs_get→ download. - Narrated video assets: create slides →
jobs_get→slides_generate_narration→jobs_get→slides_download_slides_pages_voices.
Common mistakes and troubleshooting
- Server doesn't appear in
claude mcp list. For stdio, check that the--env/name ordering is right (keep a flag between--envand the name). For HTTP, re-check the URL and that the API key is valid. API_KEYmissing. The stdio server needs the env var; the HTTP server needs?apikey=or anAuthorizationheader. Don't mix them up.- Asking for a
.pptxwithout the tool. Without 2Slides connected, Claude Code can write an outline but cannot emit a real PowerPoint. Connect the server first. - Forgetting the theme. If you don't run
themes_searchor name a style, Fast PPT picks one for you. Specify it to control the look. - Polling too fast. Async jobs (Nano Banana, narration) should be polled with
jobs_getabout every 20 seconds, not in a tight loop.
Frequently asked questions
Does Claude Code support MCP servers natively?
Yes. Claude Code is a first-class MCP client. You add servers with claude mcp add (stdio, SSE, or HTTP transports), list them with claude mcp list, and inspect them in-session with /mcp. The 2Slides server works with all of these.
Stdio or Streamable HTTP — which should I use?
Use stdio on your local machine (it runs npx -y 2slides-mcp@latest for you) and Streamable HTTP anywhere you can't or don't want to install Node — CI, containers, remote servers. Both expose the same tools and produce identical output.
Does this produce a real PowerPoint file?
Yes. The Fast PPT path (slides_generate) returns an editable .pptx with real shapes and themes. The Nano Banana paths return image-designed decks and can add AI voice narration and exportable assets. These are files you can open, edit, and present — not screenshots.
Where do I get the API key and config?
At 2slides.com/api?tab=mcp. That page shows your key, a ready-to-paste stdio config, and the Streamable HTTP endpoint URL.
Can I share the 2Slides server with my team?
Yes. Add it with --scope project to write a shared .mcp.json you commit to the repo. Teammates are prompted to approve it on first use. Use --scope user for a private, all-projects setup.
The takeaway
Claude Code does the thinking; the 2Slides MCP server does the file. Connect once — stdio for local, Streamable HTTP for remote — and "make me a deck" becomes a single sentence in your terminal.
If you live in Claude Code, this is the fastest path from an idea (or a file in your repo) to a finished, editable PowerPoint. For a broader look at wiring slides into agents, see how MCP is changing presentation workflows and the full PowerPoint MCP server ecosystem map. Using the desktop app instead of the CLI? See how to use Claude MCP to generate presentations.
Grab your key and config at 2slides.com/api?tab=mcp and generate your first deck from the terminal 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