doc-tools-mcp
Сервер MCP Word Tools
Сервер Model Context Protocol (MCP), который предоставляет возможности обработки документов Word на базе ИИ. Этот сервер реализует протокол MCP, чтобы позволить приложениям ИИ создавать, редактировать и управлять документами 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Использование
Запустите MCP-сервер:
npx @puchunjie/doc-tools-mcpПо умолчанию сервер будет запущен на порту 8765.
Настройте свое приложение ИИ (например, Cursor, VSCode) для использования сервера MCP:
http://localhost:8765
Инструменты МКП
Сервер обеспечивает следующие функции MCP:
create_document— Создать новый документ WordПараметры: filePath (обязательно), title, author
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 (обязательно)
Интеграция с приложениями ИИ
Курсор
Откройте файл конфигурации курсора
~/.cursor/mcp.jsonДобавьте следующую конфигурацию:
{
"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:
Клонируйте репозиторий:
git clone <repository-url>
cd doc-tools-mcpУстановить зависимости:
npm installЗапуск в режиме разработки:
npm run startСборка для производства:
npm run buildДобавление новых функций MCP
Добавить новые методы в
src/services/DocumentService.tsРегистрация новых функций в
src/mcp-server.tsПри необходимости обновите определения типов.
Конфигурация
Порт по умолчанию: 8765 (настраивается)
Поддерживаемые типы файлов: .docx
Все пути к файлам должны быть абсолютными или относительными к текущему рабочему каталогу.
Лицензия
Массачусетский технологический институт
Поддерживать
Если у вас возникли какие-либо проблемы или есть предложения по улучшению, пожалуйста, отправьте сообщение о проблеме в наш репозиторий GitHub.
Available Tools
7 toolsadd_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
Scored across 7 tools
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.
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.
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.
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
Related MCP Connectors
Convert, create and edit Word, PowerPoint, Excel and PDF documents from any AI agent.
Create and manage documents, spreadsheets, and presentations from your AI assistant.
Document editing, AI writing, saved documents, DOCX downloads, PDF, STT, TTS and watermarking
Real Word and Excel for agents: open your .docx/.xlsm, read, propose, apply, get it back intact.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables reading, creating, and appending content to Microsoft Word (.docx) files through natural language commands.MIT
- AlicenseAqualityDmaintenanceEnables AI assistants to directly read, edit, and manipulate Word documents, supporting image and table operations, paragraph editing, and search/replace.202MIT
- AlicenseNot gradedqualityFmaintenanceEnables AI assistants to create, edit, and extract data from Microsoft Word documents programmatically, supporting document creation, content editing, table manipulation, parameter extraction, and template generation.1MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to create, read, and manipulate Microsoft Word documents with rich editing capabilities.MIT