POM MCP Server
# POM MCP Server
PowerPointプレゼンテーションをPOM (PowerPoint Object Model) 形式のXMLから生成するMCPサーバーです。
AIエージェント(Claude)が自然言語の指示から直接PowerPointファイルを作成できるようになります。
## 特徴
- 🎨 **宣言的なレイアウト**: Flexbox風のレイアウトシステム(vstack/hstack)
- 🤖 **AI最適化**: AIエージェントが自由にスライド構造を設計可能
- 📐 **型安全**: TypeScriptとZodによるスキーマ検証
- 🎓 **組み込みガイド**: AIがPOM形式を学習できるプロンプト機能
- 🎯 **シンプルなAPI**: 2つのツールで完結
## セットアップ
### 必要要件
- Node.js 18以上
- Claude Desktop
### インストール手順
#### 1. プロジェクトディレクトリを作成
```bash
mkdir mcp-pom-pptx
cd mcp-pom-pptx
```
#### 2. 依存関係のインストールとビルド
```bash
# srcディレクトリがない場合は作成
mkdir -p src
# 依存関係をインストール
npm install
# ビルド
npm run build
```
ビルドが成功すると `dist/index.js` が生成されます。
#### 3. Claude Desktopに設定
`~/Library/Application Support/Claude/claude_desktop_config.json` を編集:
```json
{
"mcpServers": {
"mcp-pom-pptx": {
"command": "node",
"args": [
"/絶対パス/mcp-pom-pptx/dist/index.js"
]
}
}
}
```
## 使い方
### 基本的な使い方
Claude Desktopで以下のように話しかけるだけです:
```
「営業プレゼン用のPowerPointを作成してください。
1枚目: タイトルスライド(会社名: ABC株式会社、タイトル: 新製品提案)
2枚目: 製品の3つの特徴を箇条書きで
3枚目: 価格表(3プラン)
ファイル名は proposal.pptx で保存してください。」
```
Claudeが自動的に:
1. POM形式のXMLを生成
2. スライドレイアウトを設計
3. PowerPointファイルを作成
### より詳細な指示の例
```
「技術プレゼンを作成。
- スライドサイズ: 1920x1080
- 全体のテーマカラー: ダークブルー
- 5枚構成
1. タイトル: システムアーキテクチャ
2. 現状の課題(箇条書き3点)
3. 提案ソリューション(2カラム比較)
4. 実装ロードマップ(表形式)
5. まとめ
tech-presentation.pptx として保存」
```
## 提供するツール
### 1. `create_powerpoint`
POM形式のXMLからPowerPointファイルを生成します。
**パラメータ:**
- `xml` (必須): POM形式のXML文字列(複数の<Slide>要素で複数スライドを指定)
- `outputPath` (必須): 出力ファイルパス (.pptx)
- `width` (オプション): スライド幅(デフォルト: 1280px)
- `height` (オプション): スライド高さ(デフォルト: 720px)
### 2. `create_powerpoint_from_template`
テンプレート.pptxファイルの背景(背景色や画像)を継承して、POM形式のXMLからPowerPointファイルを生成します。
**パラメータ:**
- `templatePath` (必須): テンプレートファイルのパス (.pptx)
- `xml` (必須): POM形式のXML文字列
- `outputPath` (必須): 出力ファイルパス (.pptx)
- `width` (オプション): スライド幅(デフォルト: 1280px)
- `height` (オプション): スライド高さ(デフォルト: 720px)
**注意:** テンプレートから背景(背景色や画像)のみが継承されます。レイアウトやスタイルはXMLで再定義してください。
### 3. `validate-pom-slide`
POM形式のXMLが正しい形式かどうかを検証します。
**パラメータ:**
- `xml` (必須): 検証するPOM形式のXML文字列
## 提供するプロンプト
AIエージェントが自動的に参照する知識ベース:
### 1. `get-pom-guide`
POM形式の完全ガイド
- 全ノードタイプの説明
- プロパティの詳細
- レイアウトのコツ
- ベストプラクティス
### 2. `get-slide-example`
具体的なスライド作成例
- タイトルスライド
- コンテンツスライド(箇条書き)
- 2カラム比較スライド
- 表付きスライド
## POM形式の概要
### ノードタイプ
POMでは以下のXML要素(ノードタイプ)を組み合わせてスライドを構築します:
**レイアウトノード(コンテナ):**
- `VStack` - 子要素を縦方向に並べる
- `HStack` - 子要素を横方向に並べる
**コンテンツノード:**
- `Text` - テキスト要素
- `Image` - 画像要素
- `Table` - 表要素
- `Shape` - 図形要素(矩形、楕円など)
- `Ul` / `Ol` - 箇条書き・番号付きリスト
### 簡単な例
タイトルスライド:
```xml
<Slide>
<VStack w="100%" h="max" padding="50" gap="20" alignItems="center" justifyContent="center" backgroundColor="0F172A">
<Text fontSize="60" bold="true" color="FFFFFF">プレゼンテーションタイトル</Text>
<Text fontSize="30" color="E2E8F0">サブタイトル</Text>
</VStack>
</Slide>
```
詳細な仕様は、Claudeが `get-pom-guide` プロンプトから自動的に学習します。
## ディレクトリ構成
```
mcp-pom-pptx/
├── src/
│ └── index.ts # メインコード
├── dist/ # ビルド出力(自動生成)
│ └── index.js
├── package.json
├── tsconfig.json
└── README.md
```
## ライセンス
MIT
## クレジット
- [POM](https://github.com/hirokisakabe/pom) by hirokisakabe
- [Model Context Protocol](https://modelcontextprotocol.io/) by Anthropic
TDQS
Scored across 5 tools
Each tool has a clearly distinct role: fetching the spec, fetching examples, validating XML, creating a PPTX, and creating from a template. No two tools overlap in purpose, so agents should not confuse them.
Tool names are inconsistent: three use kebab-case (get-pom-guide, get-slide-example, validate-pom-slide) while two use snake_case (create_powerpoint, create_powerpoint_from_template). This mixed convention makes the API surface feel disjointed and harder to predict.
With exactly five tools, the server is well-scoped for PowerPoint generation. Each tool serves a necessary step in the workflow (guide, example, validate, create, template-create) without excess or bloat.
The tool surface covers the full creation lifecycle: acquiring the POM specification, obtaining sample XML, validating user-authored XML, and generating the final .pptx (both from scratch and from a template). There are no obvious missing operations for the stated domain.