Marp MCP Server
A Model Context Protocol (MCP) server for managing Marp presentation projects with academic theme support. Optimized for use with Claude Code, Cursor, and other AI-powered editors.
Features
- ๐จ Academic Theme Support - Pre-configured academic_custom.css theme
- ๐ Project Initialization - Automatic directory structure setup
- ๐ฏ Structured Slide Generation - 6 layout templates for consistent design
- ๐ง Editor Integration - Designed for Claude Code and Cursor
- ๐ Markdown Output - Generate slides as markdown strings for easy editing
Installation
Via npx (Recommended)
npx @masaki39/marp-mcp
Global Installation
npm install -g @masaki39/marp-mcp
Local Installation
npm install @masaki39/marp-mcp
Configuration
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"marp": {
"command": "npx",
"args": ["-y", "@masaki39/marp-mcp"]
}
}
}
Or with global installation:
{
"mcpServers": {
"marp": {
"command": "marp-mcp"
}
}
}
Claude Code / Cursor
The server works seamlessly with Claude Code and Cursor. The generated markdown can be directly inserted into your editor.
Available Tools
1. init_presentation
Initialize a new Marp presentation project with complete directory structure.
Parameters:
projectPath(string) - Directory where project will be createdprojectName(string) - Name of the presentation projectpresentationTitle(string) - Title of the presentationpresentationSubtitle(string, optional) - Subtitledescription(string, optional) - Brief description
Generated Structure:
my-presentation/
โโโ slides.md # Main presentation file
โโโ themes/
โ โโโ academic_custom.css # Academic theme
โโโ attachments/
โ โโโ images/ # Image files
โ โโโ videos/ # Video files
โ โโโ data/ # Data files
โโโ .gitignore
โโโ README.md
Example:
{
"projectPath": "/Users/yourname/presentations",
"projectName": "research-2024",
"presentationTitle": "Research Findings",
"presentationSubtitle": "Annual Report 2024",
"description": "Research results presentation"
}
2. generate_slide
Generate a slide using academic theme layouts. Returns markdown string for copy-paste.
Parameters:
layoutType(string) - Layout type (title, lead, content, table, multi-column, quote)params(object) - Layout-specific parameters
Example:
{
"layoutType": "title",
"params": {
"title": "Presentation Title",
"subtitle": "Subtitle"
}
}
3. list_slide_layouts
List all available slide layouts with their parameters and descriptions.
No parameters required.
Available Layouts
Title Slide (title)
Centered title and subtitle with .title class.
Parameters:
title(required, max 60 chars)subtitle(optional, max 100 chars)
Output:
# Presentation Title
## Subtitle
<!-- _class: title -->
Lead Slide (lead)
Left-aligned with maroon color headings using .lead class.
Parameters:
heading(required, max 80 chars)content(optional, markdown supported)
Output:
# Main Heading
Content goes here
<!-- _class: lead -->
Content Slide (content)
Standard content slide with optional heading.
Parameters:
heading(optional, max 80 chars)content(required, markdown supported)
Output:
# Heading
Content with markdown support
- List item 1
- List item 2
Table Slide (table)
Table with customizable size and alignment.
Parameters:
heading(optional, max 80 chars)tableMarkdown(required, markdown table)tableClass(optional: "center", "100", "tiny", "small", "large")
Output:
# Table Heading
| Column 1 | Column 2 |
|----------|----------|
| Data 1 | Data 2 |
<!-- _class: table-center table-100 -->
Multi-Column Slide (multi-column)
2-3 column layout using double blockquote syntax.
Parameters:
heading(optional, max 80 chars)columns(required, array of strings)
Output:
# Comparison
> > Column 1 content
> > - Point 1
>
> > Column 2 content
> > - Point 2
Quote Slide (quote)
Quote with citation in footer.
Parameters:
heading(optional, max 80 chars)content(optional)quote(required, max 300 chars)citation(optional, max 100 chars)
Output:
# Heading
Main content
> Quote text here โ Citation
Academic Theme Features
The included academic_custom.css theme provides:
- Page numbering - Automatic slide numbers
- Custom fonts - Noto Sans JP and Source Code Pro
- Color scheme - Maroon highlights (#800000)
- Table styles - Multiple size and alignment options
- Multi-column support - Flexible column layouts
- Header support - Customizable presentation headers
CSS Classes
.title- Title slide (centered).lead- Lead slide (left-aligned, maroon).table-center- Centered table.table-100- Full-width table.table-tiny- Small font table (0.7em).table-small- Small font table (0.8em).table-large- Large font table (1.1em)
Building Presentations
Prerequisites
Install Marp CLI:
npm install -g @marp-team/marp-cli
Build to PDF
marp slides.md -o slides.pdf
Build to HTML
marp slides.md -o slides.html
Build to PowerPoint
marp slides.md -o slides.pptx
Preview in VS Code
Install Marp for VS Code extension for live preview.
Development
Building from Source
git clone https://github.com/masaki39/marp-mcp.git
cd marp-mcp
npm install
npm run build
Testing Locally
npm link
Then configure Claude Desktop to use the local version.
Troubleshooting
Server Not Starting
Check logs in ~/Library/Logs/Claude/:
tail -f ~/Library/Logs/Claude/mcp*.log
Template Files Not Found
Ensure the package was built correctly:
npm run build
ls build/templates/
Should show:
academic_custom.cssslides.template.mdREADME.template.mdgitignore.template
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
MIT License - see LICENSE file for details
Credits
- Academic theme based on marp-theme-academic by kaisugi
- Built on Model Context Protocol
- Powered by Marp