Skip to main content
Glama

Word ツール MCP サーバー

AIを活用したWord文書操作機能を提供するモデルコンテキストプロトコル(MCP)サーバー。このサーバーはMCPプロトコルを実装しており、AIアプリケーションが自然言語によるインタラクションを通じてWord文書を作成、編集、管理できるようにします。

鍛冶屋のバッジ

特徴

  • 完全なMCPプロトコル実装

  • Word文書の作成と管理

  • リッチテキストコンテンツの操作

  • 表の作成と書式設定

  • ドキュメントレイアウト制御

  • ドキュメントメタデータ管理

  • リアルタイムのドキュメント状態監視

Related MCP server: MCP Word Commander

前提条件

  • Node.js 14以上

  • Microsoft Word(オプション、高度な機能用)

インストール

npx @puchunjie/doc-tools-mcp

またはグローバルにインストールします:

npm install -g @puchunjie/doc-tools-mcp

プロジェクトの依存関係として使用する場合:

npm install @puchunjie/doc-tools-mcp

使用法

  1. MCP サーバーを起動します。

npx @puchunjie/doc-tools-mcp
  1. サーバーはデフォルトでポート8765で起動します

  2. MCP サーバーを使用するように AI アプリケーション (例: Cursor、VSCode) を構成します。

    http://localhost:8765

MCPツール

サーバーは次の MCP 機能を提供します。

  • create_document - 新しいWord文書を作成する

    • パラメータ: filePath (必須)、タイトル、著者

  • open_document - 既存のWord文書を開く

    • パラメータ: filePath (必須)

  • add_paragraph - 文書に段落を追加する

    • パラメータ: filePath (必須)、text (必須)、style、alignment

  • add_table - ドキュメントに表を追加する

    • パラメータ: filePath (必須)、rows (必須)、cols (必須)、headers、data

  • search_and_replace - 文書内のテキストを検索して置換する

    • パラメータ: filePath (必須)、searchText (必須)、replaceText (必須)、matchCase

  • set_page_margins - ドキュメントのページ余白を設定する

    • パラメータ: filePath (必須)、top、right、bottom、left

  • get_document_info - ドキュメントのメタデータを取得する

    • パラメータ: filePath (必須)

AIアプリケーションとの統合

カーソル

  1. カーソル設定ファイル~/.cursor/mcp.jsonを開きます。

  2. 次の構成を追加します。

{
  "mcpServers": {
    "doc-tools-mcp": {
      "command": "npx",
      "args": [
        "@puchunjie/doc-tools-mcp"
      ]
    }
  }
}

またはローカル開発バージョンの場合:

{
  "mcpServers": {
    "doc-tools-mcp": {
      "command": "node",
      "args": [
        "/path/to/your/doc-tools-mcp/dist/mcp-server.js"
      ]
    }
  }
}

設定後、自然言語を使用して Word 文書を操作できます。

"Create a new document named report.docx"
"Add a heading 'Monthly Report' to report.docx"
"Insert a 4x3 table with sales data"

VSCode およびその他の MCP 互換ツール

MCPプロトコルをサポートする他のツールにも同様の統合手順が適用されます。具体的なMCPサーバーの設定手順については、ツールのドキュメントを参照してください。

発達

この MCP サーバーを拡張または変更するには:

  1. リポジトリをクローンします。

git clone <repository-url>
cd doc-tools-mcp
  1. 依存関係をインストールします:

npm install
  1. 開発モードで開始します:

npm run start
  1. 生産用にビルド:

npm run build

新しいMCP機能の追加

  1. src/services/DocumentService.tsに新しいメソッドを追加します

  2. src/mcp-server.tsに新しい関数を登録する

  3. 必要に応じて型定義を更新する

構成

  • デフォルトポート: 8765 (設定可能)

  • サポートされているファイル形式: .docx

  • すべてのファイルパスは絶対パスまたは現在の作業ディレクトリからの相対パスである必要があります

ライセンス

マサチューセッツ工科大学

サポート

問題が発生した場合や改善の提案がある場合は、GitHub リポジトリに問題を送信してください。

Available Tools

7 tools
add_paragraphD

Inputs: filePath (required), text (required), style, alignment.

add_tableD

Inputs: filePath (required), rows (required), cols (required), headers, +1 more.

create_documentD

Inputs: filePath (required), title, author.

get_document_infoD

Inputs: filePath (required).

open_documentD

Inputs: filePath (required).

search_and_replaceD

Inputs: filePath (required), searchText (required), replaceText (required), matchCase.

set_page_marginsD

Inputs: filePath (required), top, right, bottom, +1 more.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    C2/5.0

    Scored across 7 tools

    Disambiguation4/5

    The tools have clearly distinct purposes targeting different document operations: creating documents, opening them, adding content (paragraphs/tables), modifying content (search/replace), adjusting layout (margins), and retrieving metadata. There is minor potential overlap between 'create_document' and 'open_document' if 'open' implies creation, but they are generally distinct.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern with snake_case throughout (e.g., add_paragraph, create_document, get_document_info). There are no deviations in naming conventions, making the set predictable and readable.

    Tool Count5/5

    With 7 tools, this is a well-scoped set for a document management server. It covers core operations without being overly sparse or bloated, aligning with typical tool counts for focused domains like this.

    Completeness3/5

    The tools cover creation, opening, content addition, basic editing, layout adjustment, and info retrieval, but there are notable gaps. Missing operations include updating or deleting documents, managing document versions, or handling more complex formatting, which could limit agent workflows in a document management context.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers