# Conflicts: # apps/deckcraft-cli/src/main.rs # crates/engine/src/cmd/file.rs # crates/engine/src/lib.rs # crates/mcp/src/tests.rs # crates/mcp/src/tools.rs # crates/ui-egui/src/dialogs.rs
2.3 KiB
MCP server
deckcraft-cli mcp runs a Model Context Protocol server on stdio. By default it drives its own
headless engine (no window); with --connect PORT it drives a running DeckCraft started with
--control PORT, so an agent and a person can work on the same deck. --sample opens the sample
deck.
{
"mcpServers": {
"deckcraft": { "command": "deckcraft-cli", "args": ["mcp", "--connect", "7990"] }
}
}
Tools
| Tool | What it does |
|---|---|
list_commands |
Every command (id, label, menu, shortcut, params doc), optionally filtered |
run_command |
Run one command: {command, params} — every menu item, ribbon button and gesture is a command |
batch |
Run several commands in order and stop at the first error |
new_presentation, open_presentation, save_presentation, export |
Files: native .deckcraft, PowerPoint .pptx, PDF (slides, notes pages, handouts), PNG/JPEG, outline, animated GIF (size, seconds per slide, loop, slides) |
inspect_document, inspect_slide |
Structure of the deck / one slide (shapes, text, placeholders, animations) |
render_slide |
A slide as an image the model can look at |
add_slide, go_to_slide |
Slides by layout |
add_shape, add_text_box, set_text |
Shapes and text |
insert_picture, insert_table, insert_chart |
Content |
select, pointer, select_tool, key, type_text |
The same selection, mouse and keyboard paths as the UI |
screenshot |
The whole window, UI included (connected mode) |
call_app |
Any control protocol method (connected mode) |
A tool refuses an argument that is not in its schema (insert_chart: unknown argument "data" (expected: categories, series, title, type)). Keys inside run_command's params are that command's parameters.
Useful commands for building decks: slide.new {layout, title, body}, shape.insert {preset, rect, text}, shape.connect {from, to, preset}, shape.freeform {points, closed, smooth},
shape.merge {op, ids}, format.*, design.theme, transition.set, animation.set,
chart.*, table.*, file.export {path, layout}. deckcraft-cli describe COMMAND prints any
chart.*, table.*, file.export {path, layout} (PDF) or {path, width, secondsPerSlide, loop} (GIF). deckcraft-cli describe ID prints any
command's parameters.