Skip to main content
Glama

reveal.js-mcp

一个对 reveal.js(6.0.1,通过 npm 依赖引入)的薄封装 MCP 服务:让 Codex / Claude Code 等 MCP 客户端用自然语言创建 reveal.js 演示文稿,并立即通过内置 HTTP 服务在浏览器中查看。

  • 三种传输:stdio(默认,供本地客户端拉起)、http(streamable HTTP,/mcp)、sse( legacy SSE,/sse + /messages)

  • 内置静态服务:/revealjs/* 提供 reveal.js 资源,/p/<id>/ 提供生成的演示文稿(stdio 模式下同样会启动,方便浏览器查看)

  • npx 直接接入、本地直接运行或 Docker 运行

快速接入(npx,无需安装)

在 MCP 客户端配置中:

{
	"type": "stdio",
	"command": "npx",
	"args": ["revealjs-mcp@latest"]
}

也可以直接跑一个 HTTP 服务:npx revealjs-mcp@latest --transport http --port 8000

Related MCP server: marp-agent-mcp

从源码安装与构建

npm install
npm run build    # 输出到 dist/

运行

# stdio(MCP 客户端通常以这种方式拉起)
node dist/index.js

# streamable HTTP
node dist/index.js --transport http --port 8000

# legacy SSE
node dist/index.js --transport sse --port 8000

开发模式(免构建):npm run dev -- --transport http --port 8000

配置项

CLI 参数

环境变量

默认值

说明

--transport

REVEALJS_TRANSPORT

stdio

stdio / sse / http

--port

REVEALJS_PORT

8000

HTTP 端口(0 = 随机端口)

--host

REVEALJS_HOST

127.0.0.1

监听地址

--data-dir

REVEALJS_DATA_DIR

./presentations

演示文稿存储目录

--public-url

REVEALJS_PUBLIC_URL

http://localhost:<port>

工具返回 URL 使用的基础地址(反向代理时设置)

MCP 工具

工具

说明

create_presentation

从 slides 数组(HTML 或 markdown)创建演示文稿,返回可浏览的 URL

list_presentations

列出已创建的演示文稿

get_presentation_url

按 id 获取演示文稿 URL

delete_presentation

按 id 删除演示文稿

list_themes

列出 reveal.js 内置主题(black、white、dracula……)

list_transitions

列出转场样式(none/fade/slide/convex/concave/zoom)

get_server_info

服务器与 reveal.js 版本信息

create_presentation 支持 theme、transition、controls、progress、center、hash、highlight(语法高亮插件)以及 options(任意 reveal.js 配置透传到 Reveal.initialize())。

在 Claude Code 中配置

stdio(推荐,无需克隆仓库,直接走 npx;也可复制 examples/claude-code.mcp.json 为项目根的 .mcp.json):

{
	"mcpServers": {
		"revealjs": {
			"type": "stdio",
			"command": "npx",
			"args": ["revealjs-mcp@latest"]
		}
	}
}

或用命令注册:

claude mcp add revealjs -- npx revealjs-mcp@latest
# 已运行的 HTTP 服务:
claude mcp add --transport http revealjs http://localhost:8000/mcp
claude mcp add --transport sse  revealjs http://localhost:8000/sse

在 Codex 中配置

追加到 ~/.codex/config.toml(完整示例见 examples/codex.config.toml):

[mcp_servers.revealjs]
command = "npx"
args = ["revealjs-mcp@latest"]
env = { REVEALJS_PORT = "8000" }

# 或连接已运行的 streamable HTTP 服务:
# [mcp_servers.revealjs]
# url = "http://localhost:8000/mcp"

Docker

docker build -t revealjs-mcp .
docker run -d -p 8000:8000 -v "$PWD/presentations:/data" revealjs-mcp
# MCP endpoint: http://localhost:8000/mcp (streamable HTTP)
# 换成 SSE:  -e REVEALJS_TRANSPORT=sse

也可以 docker compose up -d(见 docker-compose.yml)。

容器内默认 --transport http --host 0.0.0.0 --port 8000 --data-dir /data(通过环境变量注入,均可覆盖)。

开发与测试

npm test                 # vitest:单元 + MCP 协议 + 三种传输端到端
npm run build            # tsc 类型检查 + 编译
scripts/docker-smoke.sh  # 构建镜像并对容器跑真实 MCP 会话冒烟测试

结构

src/config.ts         CLI/环境变量解析
src/themes.ts         reveal.js 包定位、主题/转场列表
src/presentations.ts  演示文稿的创建/列表/删除与 HTML 模板
src/mcp.ts            MCP server 与工具注册
src/http.ts           express 应用:/revealjs 静态资源、/p 演示文稿、/mcp 与 /sse 端点
src/index.ts          CLI 入口(三种传输)
test/                 vitest 测试(含三种传输的端到端)

Available Tools

7 tools
create_presentationA

Create a reveal.js presentation from an array of slides and serve it over HTTP. Each slide is one : raw HTML by default, or markdown when format is "markdown". Returns the browser-viewable URL.

ParametersJSON Schema
NameRequiredDescriptionDefault
idNoURL-safe id (letters, digits, -, _). Derived from the title when omitted.
hashNoSync slide location to the URL hash. Default: true.
themeNoreveal.js theme name (see list_themes). Default: black.
titleYesPresentation title (HTML <title>).
centerNoVertically center slides. Default: true.
formatNoSlide markup format. markdown enables the reveal.js markdown plugin.
slidesYesSlide contents, one entry per slide (vertical stacks can be nested with HTML).
optionsNoExtra reveal.js config keys merged into Reveal.initialize(), e.g. { slideNumber: "c/t", autoSlide: 5000 }.
controlsNoShow navigation controls. Default: true.
progressNoShow progress bar. Default: true.
highlightNoEnable syntax highlighting plugin (monokai theme). Default: false.
transitionNoSlide transition style (see list_transitions). Default: slide.

Output Schema

ParametersJSON Schema
NameRequiredDescription
idYes
urlYes
pathYes
titleYes

TDQS

A4.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden. It discloses that the tool serves the presentation over HTTP and returns a URL, and explains slide-to-<section> mapping. However, it does not mention potential side effects (e.g., overwriting, persistence) or permissions, though as a create tool the behavior is relatively self-evident.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two concise sentences front-load the main purpose and return value. No wasted words, and the markdown detail is presented efficiently.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite having 12 parameters and an output schema, the description captures the core workflow: slides in, URL out. It explains the two most important semantic choices (slide content format and markdown). Since the schema fully documents parameters and output schema exists, the description is sufficiently complete for tool selection and invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3. The description adds value by clarifying that each slide string becomes a <section> element and that setting format to 'markdown' enables markdown parsing. This goes slightly beyond the schema's own parameter descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool 'Create a reveal.js presentation from an array of slides and serve it over HTTP', which is a specific verb+resource combination. It distinguishes itself from siblings (list, delete, info tools) by focusing on creation and serving.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context on how to use the tool, including the default behavior (raw HTML) and how to switch to markdown via the 'format' parameter. It does not explicitly name alternative tools, but the sibling tools are obviously different (list/get/delete), so the usage context is sufficiently clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

delete_presentationA

Delete a presentation by id. Returns whether anything was deleted.

ParametersJSON Schema
NameRequiredDescriptionDefault
idYesPresentation id.

Output Schema

ParametersJSON Schema
NameRequiredDescription
idYes
deletedYes

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description must carry the full burden. It clearly indicates the destructive nature (deletion) and notes the return behavior (boolean indicating deletion). However, it does not mention irreversibility, permissions, or side effects, leaving some behavioral aspects undisclosed.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, concise sentence that front-loads the primary action and also includes the return value. There is no fluff or redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple delete tool with one parameter and an output schema, the description covers the essential action and return semantics. The mention of 'whether anything was deleted' clarifies idempotent behavior. It lacks details on authorization or related effects, but given the tool's simplicity, it is adequately complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema fully describes the 'id' parameter as 'Presentation id.' The description says 'by id,' which adds no new meaning beyond the schema. Since schema coverage is 100%, the baseline of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Delete a presentation by id') and distinguishes it from siblings like create_presentation and list_presentations. It also mentions the return value, making the purpose unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage (when you want to delete a presentation) but provides no explicit guidance on prerequisites, exclusions, or alternatives. The name and context make the primary use case obvious, but no additional direction is given.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_presentation_urlA

Get the browser-viewable URL of an existing presentation by id.

ParametersJSON Schema
NameRequiredDescriptionDefault
idYesPresentation id.

Output Schema

ParametersJSON Schema
NameRequiredDescription
idYes
urlYes

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden for behavioral disclosure. It adds context that the URL is 'browser-viewable' and that the presentation must exist, but does not mention error handling, permissions, or rate limits. This is partially transparent but leaves gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence of 11 words, immediately stating the action and object with zero filler. It is front-loaded and appropriately concise for the tool's simplicity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool has only one parameter and an output schema (per context signals), and the description covers the essential context: it fetches a URL for an existing presentation by ID. It does not detail what happens on invalid IDs or response structure, but the output schema likely handles return shape, making it sufficiently complete for a simple getter.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema fully describes the single required parameter 'id' with the description 'Presentation id', and schema coverage is 100%. The description adds no additional parameter semantics beyond saying 'by id', so the baseline of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb 'Get' and identifies the resource as the browser-viewable URL of an existing presentation. It clearly distinguishes the tool from siblings like list_presentations and create_presentation by focusing on retrieving a URL for a specific presentation ID.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies the tool should be used when you have an existing presentation ID and need its browser-viewable URL. It gives clear context ('existing presentation by id') but does not explicitly name alternatives or exclusion conditions, so it lacks the explicit when/when-not guidance of a 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_server_infoA

Get revealjs-mcp server info: reveal.js version, base URL and data directory.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
nameYes
baseUrlYes
dataDirYes
versionYes
revealVersionYes

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are present, so the description carries the behavioral disclosure burden. The verb 'Get' strongly implies a read-only operation, and the enumerated output fields leave little ambiguity about what the tool does. For a parameterless info getter, no destructive or complex side effects are suggested.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence, front-loads the action and resource, and uses only necessary words. Every word contributes meaning: 'Get', 'revealjs-mcp server info', and the three specific data fields.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (no parameters, no nested objects, an output schema exists), the description is fully complete. It specifies exactly what information the agent will receive—version, base URL, and data directory—so no further context is needed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters, so the baseline is 4. The description compensates for the absence of parameters by explaining what data the tool returns, providing all the context an agent needs.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses the specific verb 'Get' with a clear resource, 'revealjs-mcp server info', and enumerates the exact data returned: reveal.js version, base URL, and data directory. This clearly distinguishes it from sibling tools that list themes, transitions, or presentations.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description clearly implies this tool should be used when the agent needs server-level metadata such as the reveal.js version or base URL. It does not explicitly exclude alternatives, but the resource scope makes it obvious that this is the dedicated information tool, and no competing sibling serves the same purpose.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_presentationsA

List all presentations created by this server, with their URLs.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
presentationsYes

TDQS

A4.1/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the burden. The verb 'List' implies a read-only operation, and the scope 'created by this server' clarifies the data included. However, it does not disclose potential pagination, rate limits, or response size constraints.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single sentence, front-loaded with the verb and resource, no redundant words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has no parameters and an output schema exists, the description sufficiently covers the tool's purpose and scope. It mentions the key output aspect (URLs). The absence of explicit alternative guidance is minor for a simple list tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has zero parameters, so there is nothing for the description to add. According to rubric, baseline 4 for 0 parameters. The description adds no parameter info but does not need to.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses the specific verb 'List' with the resource 'presentations' and adds scope 'created by this server' and output detail 'with their URLs.' This clearly distinguishes from sibling list tools (list_themes, list_transitions) which target different resources.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for retrieving all presentations on the server, but does not explicitly contrast with get_presentation_url for single presentations or note any exclusions. It is not misleading, but lacks explicit guidance on when to use alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_themesA

List the bundled reveal.js themes usable as the theme argument.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
themesYes

TDQS

A4.1/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden. The word 'List' clearly implies a read-only operation, but the description does not explicitly state the absence of side effects or any additional behavioral details such as ordering or filtering behavior. For a simple list tool, this is adequate but lacks explicit safety confirmation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single, front-loaded sentence conveys the complete purpose without excess. Every word contributes meaning.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's trivial complexity (no parameters, output schema present), the description fully covers what the tool does and why it exists. No additional details are needed for an agent to select and invoke it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters, so the baseline is 4. The description's reference to the `theme` argument clarifies that the output is directly relevant to that parameter, adding context beyond the empty schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description specifies the exact action ('List') and resource ('bundled reveal.js themes'), plus the purpose (usable as the `theme` argument), clearly distinguishing it from sibling tools like list_transitions or list_presentations.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage as a lookup for valid `theme` values but does not explicitly state when to prefer this tool over alternatives or mention exclusions. It gives no comparison to list_transitions or list_presentations, so guidance is only implied.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_transitionsA

List the reveal.js slide transition styles usable as the transition argument.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
transitionsYes

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full transparency burden. It accurately conveys a simple read-only enumeration operation, with no hidden side effects or conditions to disclose. The wording 'List' inherently communicates the read-only nature, though it does not explicitly state that it returns a fixed/static set.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, compact sentence with 13 words, front-loaded with the action ('List') and the object ('reveal.js slide transition styles'). No filler or redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a zero-parameter list tool with an output schema, the description is fully complete: it names the exact set of items listed and their intended use. The output schema handles return structure, so no further detail is required.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

There are no parameters, so the baseline is 4. The description adds meaningful context by stating the output is 'usable as the `transition` argument,' which clarifies the purpose and relationship to other tools, exceeding the minimum for a zero-parameter tool.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool lists a specific resource: 'reveal.js slide transition styles,' and explains their usage as the `transition` argument. This verb-object-resource structure is unambiguous and distinguishes it from siblings like list_themes or list_presentations.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The purpose makes usage self-evident: use this tool when you need the valid transition values. However, it does not explicitly present alternatives or exclusions, so it falls short of a 5, but the context is strong enough to justify a 4.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 7 tool updatesv0.1.1
    • First observedcreate_presentation
    • First observeddelete_presentation
    • First observedget_presentation_url
    • First observedget_server_info
    • First observedlist_presentations
    • First observedlist_themes
    • First observedlist_transitions

TDQS

A4.2/5.0

Scored across 7 tools

Disambiguation5/5

Each tool targets a distinct action or resource: server info, theme/transition discovery, presentation lifecycle (list, create, get URL, delete). There is no overlap or ambiguity between any two tools.

Naming Consistency5/5

All tool names follow a consistent verb_noun snake_case pattern, using get_, list_, create_, delete_ prefixes. The naming is uniform and predictable across the entire set.

Tool Count5/5

Seven tools is well-scoped for a reveal.js presentation server, covering discovery, creation, and management without excess. Each tool serves a clear purpose in the workflow.

Completeness4/5

The CRUD-like lifecycle is mostly covered: create, list, get URL, and delete presentations. Missing an update/edit operation and a way to retrieve full presentation content, but these are minor gaps for the core use case.

Maintenance

ActivitySlowing
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers