Skip to main content
Glama
hemanthx446

PowerPoint MCP Server

by hemanthx446

PowerPoint Model Context Protocol (MCP) サーバー

PythonベースのModel Context Protocol (MCP)サーバーで、fastmcp と python-pptx を使用してPowerPointプレゼンテーションの作成、検査、編集を行うツールを提供します。

前提条件

  • Windows OS

  • Python 3.12(C:\Users\Lumbini_User\AppData\Local\Programs\Python\Python312 に既にインストール済み)

  • 依存関係がインストールされたローカル仮想環境 .venv

Related MCP server: Office-PowerPoint-MCP

公開ツール

サーバーは以下のツールを登録して実行します:

  1. create_presentation(path: str): 指定されたパスに新しい空のPowerPointプレゼンテーションを作成します。

  2. add_slide(path: str, layout_idx: int = 6): path のプレゼンテーションに、レイアウトテンプレートインデックス(例:空白用の 6)を使用して新しいスライドを追加します。

  3. add_text(path, slide_idx, text, left_in, top_in, width_in, height_in, font_name, font_size_pt, bold, italic, color_hex, align): カスタム書式のテキストボックスを追加します。

  4. add_bullet_points(path, slide_idx, points, left_in, top_in, width_in, height_in, font_name, font_size_pt, color_hex): 書式設定された箇条書きリストを追加します。

  5. add_shape(path, slide_idx, shape_type, left_in, top_in, width_in, height_in, fill_color_hex, line_color_hex, line_width_pt): 長方形、楕円、三角形などの幾何学的図形を挿入します。

  6. add_picture(path, slide_idx, image_path, left_in, top_in, width_in, height_in): ローカル画像を挿入します。

  7. add_table(path, slide_idx, rows, cols, left_in, top_in, width_in, height_in, data): テーブルを挿入してデータを入力します。

  8. get_presentation_info(path): すべてのスライドの詳細な構造、図形の位置、テキスト、テーブルを返します。

  9. search_replace_text(path, search_str, replace_str): プレゼンテーション全体でテキストボックス、図形、テーブルを対象に検索と置換を実行します。

  10. delete_slide(path, slide_idx): 指定されたインデックスのスライドを削除します。

MCPクライアント設定

このサーバーをMCPホスト(Claude Desktopやcursorなど)に登録するには、ホスト設定ファイルに次のエントリを追加します:

{
  "mcpServers": {
    "powerpoint": {
      "command": "c:\\Users\\Lumbini_User\\Desktop\\PPT\\.venv\\Scripts\\python.exe",
      "args": [
        "c:\\Users\\Lumbini_User\\Desktop\\PPT\\ppt_mcp_server.py"
      ],
      "env": {}
    }
  }
}

ローカル開発とテスト

  1. 仮想環境をアクティブにします:

    .venv\Scripts\Activate.ps1
  2. サーバーを直接実行します:

    python ppt_mcp_server.py

Related MCP Connectors

Related MCP Servers