@openpresentation/mcp

中文文档
0.30.0发布于 2026/11/02MITTypeScriptES Module构建来源已验证

An MCP server for OPF: learn the format (docs, schemas, the default catalog, examples and agent skills as resources and tools), validate and convert decks. Runs locally on stdio (opf-mcp) or hosted on an edge runtime.

原始使用文档

@openpresentation/mcp

The MCP server for OPF (Open Presentation Format). An agent or editor that speaks the Model Context Protocol learns the format and checks decks through it, without shelling out and parsing text: documentation, schemas, the default catalog, example decks and the six agent skills as resources, a start_here tool that gives a path for a goal, and validate_deck, get_schema, search_catalog, get_catalog_record, convert, search_docs and list_examples as tools. It keeps no state, reads no file, fetches nothing, and needs no API key. Node 22 or later.

claude mcp add opf -- npx -y @openpresentation/mcp          # Claude Code
npx -y @openpresentation/mcp                                  # any MCP client: command npx, args -y @openpresentation/mcp

Tools, resources (opf://docs/format-card, opf://schema/presentation#Chart, opf://catalog/layouts/two-column, ...), prompts, client setup (Claude Code, Cursor, Claude Desktop) and a typical session: the MCP server.

As a library

The server definition is separate from the transport and runs on an edge runtime (no Node builtin, no file read, precompiled validators), for a hosted server:

import { createOpfServer } from "@openpresentation/mcp";           // with the bundled docs, examples, skills and release notes
import { createOpfMcpServer } from "@openpresentation/mcp/server"; // the same without that data: you pass `sources`

const server = createOpfServer({ version: "0.27.0" });
await server.connect(transport); // stdio, or Streamable HTTP in a Worker

@openpresentation/mcp/stdio is the Node stdio wrapper (runStdio()) that the opf-mcp binary and opf mcp of the CLI run. Layout is measured with the real fonts when the optional peer @openpresentation/opf-render is installed beside it; otherwise it is estimated and the report says so. The package is released with @openpresentation/opf and the other packages of OpenPresentation/opf at one version.

版本与发布记录

@openpresentation/mcp 共发布 6 个版本,首次发布于 2026/10/27;过去 12 个月发布了 6 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.30.0latest2026/11/021 天前
0.29.12026/10/276 天前
0.29.02026/10/277 天前
0.28.02026/10/277 天前
0.0.1placeholder2026/10/277 天前
0.0.0-stage2026/10/277 天前

关于 @openpresentation/mcp 的常见问题

@openpresentation/mcp 是什么?

用于OPF的MCP服务器:学习格式(文档、模式、默认目录、示例和代理技能作为资源和工具),验证和转换甲板。运行在本地工作室(opf-mcp)或托管在边缘运行时。

如何安装 @openpresentation/mcp?

在项目目录运行 npm install @openpresentation/mcp,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 opf-mcp,可以用 npx opf-mcp 直接运行。

@openpresentation/mcp 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@openpresentation/mcp 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@openpresentation/mcp 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=22。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@openpresentation/mcp 可以商用吗?

@openpresentation/mcp 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@openpresentation/mcp 还在维护吗?

最新版本 0.30.0 发布于 2026/11/02(1 天前);至今共发布 6 个版本,其中过去 12 个月发布了 6 个;首次发布于 2026/10/27。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。