FM

famano/mcp-server-office

Developer tools

Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал

39 stars 12 forks Качество 53 Тренд 0MIT

famano/mcp-server-office - кандидат на сервер MCP, импортированный из https://github.com/famano/mcp-server-office.

Обзор

famano/mcp-server-office - кандидат на сервер MCP, импортированный из https://github.com/famano/mcp-server-office.

Обзор (машинный перевод)

Сервер Model Context Protocol (MCP) предоставляет инструменты для чтения/записи файлов Microsoft Word (docx).

###Установка через Smithery

Для автоматической установки Server Office для Claude Desktop через Smithery:

Использование

Установка с pip:

Запустите MCP-сервер:

Используя UV, просто:

Доступные инструменты

  1. read_docx: Прочитайте полное содержимое файла docx, включая таблицы и изображения.
  • Ввод: path (струна) - Абсолютный путь к целевому файлу Примечание: Изображения преобразуются в заполнители [Изображения], а изменения трека не отображаются
  1. write_docx: Создание нового файла docx с заданным содержимым.
  • Ввод:
  • path (струна) - Абсолютный путь к целевому файлу
  • content (струна) - Содержание для записи в файл
  • Примечание: Используйте двойные разрывы строк для новых абзацев и тег [Таблица] с разделителями для таблиц
  1. edit_docx_paragraph: Заменить текст в указанных пунктах файла docx.
  • Ввод: path (струна) - Абсолютный путь к файлу для редактирования
  • edits (массив) - Список словарей, содержащих текст поиска/замены и индекс абзаца
  • paragraph_index (число) - 0-базовый индекс пункта для редактирования
  • [[Т9]] (струна) - Текст, содержащийся в указанном пункте

Эта страница переведена автоматически. Технические детали смотрите в оригинале.

README

Показан фрагмент оригинального README. Открыть оригинал.

MCP Server Office

A Model Context Protocol (MCP) server providing tools to read/write Microsoft Word (docx) files.

Installing via Smithery

To install Server Office for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install @famano/mcp-server-office --client claude

Usage

Install with pip:

pip install mcp-server-office

Then, start the MCP server:

mcp-server-office

Or using uv, just:

uvx mcp-server-office

Available Tools

  1. read_docx: Read complete contents of a docx file including tables and images.

    • Input: path (string) - Absolute path to the target file
    • Note: Images are converted to [Image] placeholders, and track changes are not shown
  2. write_docx: Create a new docx file with given content.

    • Input:
      • path (string) - Absolute path to target file
      • content (string) - Content to write to the file
    • Note: Use double line breaks for new paragraphs, and [Table] tag with | separators for tables
  3. edit_docx_paragraph: Make text replacements in specified paragraphs of a docx file.

    • Input:
      • path (string) - Absolute path to file to edit
      • edits (array) - List of dictionaries containing search/replace text and paragraph index
        • paragraph_index (number) - 0-based index of the paragraph to edit
        • search (string) - Text to find within the specified paragraph
        • replace (string) - Text to replace with
    • Note: Each search string must match exactly once within the specified paragraph
  4. edit_docx_insert: Insert new paragraphs into a docx file.

    • Input:
      • path (string) - Absolute path to file to edit
      • inserts (array) - List of dictionaries containing text and optional paragraph index
        • text (string) - Text to insert as a new paragraph
        • paragraph_index (number, optional) - 0-based index of the paragraph before which to insert. If not specified, insert at the end.

Requirements

  • Python >= 3.12
  • Dependencies:
    • mcp[cli] >= 1.2.0
    • python-docx >= 1.1.2

MCP Server Office (日本語)

Microsoft Word (docx) ファイルの読み書きを提供するModel Context Protocol (MCP) サーバーです。

Smitheryによるインストール

Smithery経由でClaude DesktopにServer Officeを自動インストールするには:

npx -y @smithery/cli install @famano/mcp-server-office --client claude

使用方法

pipを使用してインストール:

pip install mcp-server-office

MCPサーバーの起動:

mcp-server-office

または、uvを使う場合:

uvx mcp-server-office

利用可能なツール

  1. read_docx: docxファイルの内容を表やイメージを含めて完全に読み取ります。

    • 入力: path (文字列) - 対象ファイルの絶対パス
Открыть полный README на GitHub

Установка

npx -y @smithery/cli install @famano/mcp-server-office --client claude
Новичок в MCP? Начните с руководства на mcpskill.org →