Skip to main content

MCP App Plugin

The MCP App plugin turns Adaptive Slide deck JSON into an interactive presentation surface for compatible MCP hosts.

What it provides

ComponentDescription
MCP serverRegisters tools and serves the UI resource.
present-deck toolAccepts a full deck JSON string and returns it for viewer rendering.
list-slides toolReturns slide index, id, and title metadata.
UI resourceServes ui://adaptive-slide/viewer as text/html;profile=mcp-app.
ViewerSelf-contained HTML, CSS, and JavaScript for slide navigation and rendering.

Runtime flow

Deck JSON
-> present-deck
-> MCP host receives structured content
-> Host loads ui://adaptive-slide/viewer
-> Viewer receives deck data
-> Slides render in the sandboxed UI

Build and run

npm install
npm run build
npm run serve

The default endpoint is:

http://localhost:3001/mcp

To use another port:

PORT=8080 npm run serve

Tools

present-deck

Renders a deck in the viewer.

ParameterTypeRequiredDescription
deckstringYesFull Adaptive Slide deck as a JSON string.

Example tool input:

{
"deck": "{\"type\":\"AdaptiveDeck\",\"version\":\"1.0.0\",\"slides\":[{\"type\":\"AdaptiveSlide\",\"body\":[{\"type\":\"Tile.Text\",\"text\":\"Hello\"}]}]}"
}

list-slides

Returns slide metadata.

ParameterTypeRequiredDescription
deckstringYesFull Adaptive Slide deck as a JSON string.

Example response:

[
{
"index": 0,
"id": "title-slide",
"title": "Welcome"
}
]

Viewer features

FeatureNotes
Slide navigationPrevious and next controls plus slide counter.
Keyboard shortcutsArrow keys, Space, Home, End, and Escape.
Slide pickerMenu control for jumping to a slide.
Theme supportUses deck theme colors, fonts, and dark-mode hints.
Speaker notesShows notes when slides provide them.
Tile supportText, image, code, chart, media, and container tiles.
Layout supportStack, grid, and freeform layouts.

Host connection notes

For local host testing, point the MCP client at:

{
"servers": {
"adaptive-slide": {
"url": "http://localhost:3001/mcp"
}
}
}

For remote hosts that cannot reach localhost, expose the local endpoint through an approved tunnel and configure the host with the tunnel URL plus /mcp.

Security model

The viewer is designed for declarative deck data:

ControlBehavior
EscapingUser-provided text, URLs, code, labels, and captions are escaped before rendering.
No external scriptsThe viewer is self-contained and does not load third-party runtime scripts.
Sandboxed hostMCP App hosts are expected to embed the viewer in a sandboxed frame.
Declarative tilesDeck JSON describes content and layout. It does not execute JavaScript from tile data.

When changing renderer behavior, keep the TypeScript transformer and browser-side viewer transformer aligned so tests and hosted rendering remain consistent.