Skip to content

Office Oxide MCP サーバー — クイックスタート

office-oxide-mcpModel Context Protocol サーバーです。AI アシスタントが Office ドキュメントのコンテンツを抽出できるようになります。完全ローカルで動作し、ファイルが端末の外に送信されることはありません。

crgx のインストール(初回のみ)

crgx は Rust バイナリ向けの npx 風ランナーです。初回実行時に office_oxide_mcp を自動ダウンロードするため、MCP を手動でインストールする必要はありません。

Linux / macOS

curl -fsSL crgx.dev/install.sh | sh

Windows (PowerShell)

irm crgx.dev/install.ps1 | iex

設定

crgx をインストールしたら、以下の設定を AI ツールに貼り付けるだけです。office_oxide_mcp のダウンロードと更新は crgx が自動で処理します。

Claude Desktop

Linux では ~/.config/claude/claude_desktop_config.json、macOS では ~/Library/Application Support/Claude/claude_desktop_config.json に追記します。

{
  "mcpServers": {
    "office-oxide": {
      "command": "crgx",
      "args": ["office_oxide_mcp@latest"]
    }
  }
}

Claude Code

プロジェクトの .claude/settings.json に追記します。

{
  "mcpServers": {
    "office-oxide": {
      "command": "crgx",
      "args": ["office_oxide_mcp@latest"]
    }
  }
}

Cursor

Cursor の MCP 設定に追記します。

{
  "mcpServers": {
    "office-oxide": {
      "command": "crgx",
      "args": ["office_oxide_mcp@latest"]
    }
  }
}

代替インストール方法

crgx を使わない場合は、office_oxide_mcp を直接インストールできます。

cargo install office_oxide_mcp

そのうえで、AI ツールがそのバイナリを参照するよう設定します。

{
  "mcpServers": {
    "office-oxide": {
      "command": "office-oxide-mcp"
    }
  }
}

利用可能なツール

extract

サポートされている 6 つの Office 形式から、テキスト・Markdown・HTML・構造化 IR を抽出します。

パラメータ 必須 説明
file_path string はい .docx.xlsx.pptx.doc.xls.ppt ファイルのパス
output_path string はい 抽出結果の書き出し先パス
format string いいえ "text"(デフォルト)・"markdown""html""ir"
from_format string いいえ 拡張子による形式の自動判別を上書きする

convert

形式間の変換 — 主にレガシー形式から OOXML への変換に使用します。

パラメータ 必須 説明
input_path string はい 変換元ファイル
output_path string はい 変換先ファイル(形式は拡張子から自動判別)

仕組み

MCP サーバーは stdio JSON-RPC 2.0 で通信します。AI アシスタントが Office ドキュメントを読む必要があるとき、tools/call リクエストを送信し、出力ファイルを指す確認レスポンスを受け取ります。

すべての処理は、ライブラリおよび CLI と同じ Rust 製抽出エンジンを使ってローカルで完結します。外部サービスへのデータ送信は一切ありません。

効果的なプロンプト例

  • quarterly.docx の Markdown を quarterly.md に書き出して。」
  • legacy/old_report.docmodern/old_report.docx に変換して。」
  • 「ブラウザでプレビューできるよう、slides.pptx を HTML として slides.html に抽出して。」
  • 「テーブル構造を確認したいので、pricing.xlsx の IR JSON を pricing.ir.json にダンプして。」

内部では、アシスタントが次のような JSON-RPC 呼び出しを発行します。

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "extract",
    "arguments": {
      "file_path": "/path/quarterly.docx",
      "output_path": "/path/quarterly.md",
      "format": "markdown"
    }
  }
}

サーバーは結果を output_path に書き出し、短い確認メッセージを返します。アシスタントはそのファイルを読み込んでコンテキストに取り込みます。

関連ドキュメント