mdslides-mcp-server
An MCP server for generating HTML presentation slides from Markdown content using the mkslides library, enabling integration with tools like Claude in VSCode to create and manage presentations.
README
mdslides-mcp-server
An MCP (Model Context Protocol) server for generating HTML slides from Markdown content using the mkslides library.
What it Does
This server provides a simple interface to the mkslides command-line tool, allowing you to generate presentation slides directly from Markdown input via the Model Context Protocol. This enables integration with tools like Claude in VSCode to easily create and manage presentations.
Demo
Features
- Generate HTML slides from Markdown.
- Support for various mkslides configuration options (themes, highlight themes, Reveal.js options).
- Clean handling of temporary files.
- Containerized deployment option using Docker.
Installation
Prerequisites
- Python 3.12 or higher
- mkslides installed and available in your PATH.
- Model Context Protocol (MCP) client (e.g., Claude in VSCode).
- Docker (if using the Docker installation method).
Installation Methods
Using pip
- Clone the repository:
git clone https://github.com/your-repo/mdslides-mcp-server.git cd mdslides-mcp-server - Install using pip and uv (recommended):
Or using pip:uv syncpip install .
Using Docker
- Ensure Docker is installed and running.
- From the repository root, run the deployment script:
./deploy_mdslides_docker.sh
This script will build the Docker image (if not already built) and start a container instance named `mdslides-mcp-instance`. The server inside the container will be running and ready to accept connections via MCP. The script also handles creating the necessary output directory (`./mkslides_output`) on the host.
### Configuration in MCP Settings
To use the server with your MCP client (like Claude in VSCode), you need to add it to your MCP settings.
If you installed using pip, you can run the server directly:
```json
{
"mcpServers": {
"mdslides-mcp-local": {
"command": "python",
"args": ["src/mdslides_mcp_server/server.py"],
"disabled": false,
"autoApprove": []
}
}
}
If you are using the Docker deployment via the script:
Configure your MCP client to attach to the running container instance:
{
"mcpServers": {
"mdslides-mcp-local": {
"autoApprove": [],
"disabled": false,
"timeout": 60,
"command": "docker",
"args": [
"attach",
"mdslides-mcp-instance"
],
"transportType": "stdio"
}
}
}
Usage with Claude/VSCode
Once configured in your MCP settings, you can use the generate_slides tool directly within your Claude chat interface in VSCode.
Available Tool: generate_slides
Generates HTML presentation slides from Markdown input using mkslides and serves them via a local HTTP server.
Parameters:
markdown_content(string, required): Raw Markdown text for the slides.slides_theme(string, optional): Theme name for the slides (e.g.,black,white,league,beige,night,serif,simple,solarized,moon,dracula,sky,blood). Overrides the default.slides_highlight_theme(string, optional): Syntax highlighting theme for code blocks (any built-in theme fromhighlight.js).revealjs_options(object, optional): A dictionary containing Reveal.js config options to merge/override defaults.
Returns:
- (string): A URL (e.g.,
http://localhost:8080/latest/index.html) pointing to the generated HTML slides served by the MCP server's internal HTTP server. You can open this URL in your browser.
Example Usage:
<use_mcp_tool>
<server_name>mdslides-mcp-local</server_name>
<tool_name>generate_slides</tool_name>
<arguments>
{
"markdown_content": "# My Presentation\n\n---\n\n## Slide 2\n\n- Bullet 1\n- Bullet 2",
"slides_theme": "black",
"revealjs_options": {
"transition": "slide"
}
}
</arguments>
</use_mcp_tool>
This will generate the slides in the default output directory (./mkslides_output) using the 'black' theme and a 'slide' transition.
Development
Contributing
Contributions are welcome! Please follow standard GitHub practices: fork the repository, create a feature branch, and submit a pull request.
Running Tests
Currently, there is a placeholder test file (tests/test_server.py). To run tests, you would typically use a test runner like pytest:
pytest
Remember to add actual tests to tests/test_server.py.
Building from Source
Follow the pip installation steps above to set up your development environment.
License
This project is licensed under the MIT License - see the LICENSE file for details. (Note: A LICENSE file does not currently exist in the repository. You may want to create one.)
Acknowledgements
- mkslides for the core slide generation functionality.
- Model Context Protocol for enabling server integration.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。