

How to Use Qwen Code with the 2Slides MCP Server (2026 Guide)
Quick answer (≤60 words): Alibaba's Qwen Code CLI can generate real PowerPoint files via the 2Slides MCP server. Get a key at 2slides.com/api, then add a
mcpServersentry to~/.qwen/settings.json—command: "npx",args: ["2slides-mcp"],env.API_KEYfor stdio, orhttpUrl: "https://2slides.com/api/mcp?apikey=KEY"for Streamable HTTP. Or runqwen mcp add. Then ask Qwen to build a deck.
Qwen Code is Alibaba's open-source terminal coding agent (a fork of Gemini CLI), tuned for the Qwen model family. It is a native Model Context Protocol (MCP) client, so connecting the 2Slides MCP server lets Qwen Code turn a brief — or a file in your repo — into a finished, editable .pptx.
This guide gives the exact ~/.qwen/settings.json blocks for both transports (local stdio and remote Streamable HTTP), the qwen mcp add shortcut, and the 2Slides tool surface.
Why connect Qwen Code to 2Slides?
Qwen Code reasons over code and content but doesn't emit binary slide files. The 2Slides MCP server is the generator that does:
- Qwen Code reads your source, plans the deck, and writes the copy — strong on both English and Chinese content.
- The 2Slides MCP server renders the real PowerPoint — theme-based Fast PPT, or image-designed slides with optional AI narration and an exportable bundle.
2Slides supports 20 output languages including Simplified and Traditional Chinese, so a Qwen-planned, Chinese-language deck renders with correct CJK line-breaking.
What you need first
- Qwen Code installed (
qwenon 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.
| 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: Qwen Code (like Gemini CLI) uses
httpUrlfor Streamable HTTP andurlfor legacy SSE. UsehttpUrlfor the 2Slides Streamable HTTP endpoint.
Method 1: stdio in settings.json
Qwen Code reads ~/.qwen/settings.json (global) and .qwen/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 support $VAR_NAME expansion if you'd rather keep the key in your shell environment.
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"
}
}
}Optional header auth: "headers": { "Authorization": "Bearer YOUR_2SLIDES_API_KEY" }.
Or use the qwen mcp add command
# stdio
qwen mcp add -e API_KEY=YOUR_2SLIDES_API_KEY 2slides npx -y 2slides-mcp@latest
# Streamable HTTP
qwen mcp add --transport http 2slides-remote "https://2slides.com/api/mcp?apikey=YOUR_2SLIDES_API_KEY"Related commands: qwen mcp list, qwen mcp remove <name>, and bare qwen mcp for an interactive management view.
Verify the connection
Inside an interactive qwen session:
/mcpIt displays connection status, config details, and the discovered tools per server. Use /mcp auth for OAuth-protected servers.
Generate your first deck
Just ask — in English or Chinese:
读取 ./季度总结.md,生成一个 10 页的季度业务回顾。
先从 2slides 搜索一个简洁的商务主题,再生成 PowerPoint,
最后把下载链接给我。Qwen Code runs themes_search → slides_generate (Fast PPT) with responseLanguage: "Simplified Chinese" → returns the downloadUrl. For custom image-designed slides it uses slides_create_pdf_slides and polls jobs_get until 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 Streamable HTTP. Qwen Code treatsurlas SSE. UsehttpUrlfor the 2Slides Streamable HTTP endpoint. - Server DISCONNECTED in
/mcp. Verify the API key; for stdio confirm Node.js is present. - Tools missing after edit. Restart the session, or re-run
qwen mcp add. - Expecting a
.pptxfrom Qwen alone. It plans the deck; 2Slides renders the file. - Wrong output language. Set the deck language explicitly so CJK content renders correctly (Qwen passes
responseLanguagetoslides_generate).
Frequently asked questions
Does Qwen Code support MCP servers?
Yes. Qwen Code is an MCP client (forked from Gemini CLI). Configure servers under mcpServers in ~/.qwen/settings.json, or add them with qwen mcp add. Stdio and Streamable HTTP are both supported.
What's the config key for a Streamable HTTP server?
httpUrl. Use url only for legacy SSE. The 2Slides Streamable HTTP endpoint goes in httpUrl.
Is Qwen Code good for Chinese-language decks?
Yes — Qwen models have strong Chinese coverage, and 2Slides supports Simplified and Traditional Chinese output with proper CJK rendering. The pairing is well suited to bilingual and Chinese business decks.
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.
The takeaway
One
mcpServersentry —commandfor local,httpUrlfor remote — turns Qwen Code into a slide generator, in English or Chinese. Verify with/mcp, then just ask.
For the wider picture, see how MCP is changing presentation workflows and the PowerPoint MCP server ecosystem map. Using another agent? See Gemini CLI, Claude Code, and OpenAI Codex with the same server. Alibaba's desktop agents connect the same way: see QwenWork (千问办公) and QoderWake, or compare every option in our roundup of personal AI agents that can make slides.
Get your key and config at 2slides.com/api?tab=mcp and generate your first Qwen-built deck today.
Sources:
About 2Slides
Create stunning AI-powered presentations in seconds. Transform your ideas into professional slides with 2slides AI Agent.
Try For Free