doc-tools-mcp
Word Tools MCP-Server
Ein Model Context Protocol (MCP)-Server, der KI-gestützte Funktionen zur Bearbeitung von Word-Dokumenten bietet. Dieser Server implementiert das MCP-Protokoll, um KI-Anwendungen das Erstellen, Bearbeiten und Verwalten von Word-Dokumenten durch natürliche Sprachinteraktionen zu ermöglichen.
Merkmale
Vollständige MCP-Protokollimplementierung
Erstellen und Verwalten von Word-Dokumenten
Rich-Text-Inhaltsmanipulation
Tabellenerstellung und -formatierung
Dokumentlayoutsteuerung
Verwaltung von Dokumentmetadaten
Echtzeitüberwachung des Dokumentstatus
Related MCP server: MCP Word Commander
Voraussetzungen
Node.js 14 oder höher
Microsoft Word (optional, für erweiterte Funktionen)
Installation
npx @puchunjie/doc-tools-mcpOder global installieren:
npm install -g @puchunjie/doc-tools-mcpZur Verwendung als Abhängigkeit in Ihrem Projekt:
npm install @puchunjie/doc-tools-mcpVerwendung
Starten Sie den MCP-Server:
npx @puchunjie/doc-tools-mcpDer Server startet standardmäßig auf Port 8765
Konfigurieren Sie Ihre KI-Anwendung (z. B. Cursor, VSCode) für die Verwendung des MCP-Servers:
http://localhost:8765
MCP-Tools
Der Server stellt die folgenden MCP-Funktionen bereit:
create_document- Neues Word-Dokument erstellenParameter: Dateipfad (erforderlich), Titel, Autor
open_document- Öffnen Sie ein vorhandenes Word-DokumentParameter: Dateipfad (erforderlich)
add_paragraph- Einen Absatz zum Dokument hinzufügenParameter: Dateipfad (erforderlich), Text (erforderlich), Stil, Ausrichtung
add_table- Fügt dem Dokument eine Tabelle hinzuParameter: Dateipfad (erforderlich), Zeilen (erforderlich), Spalten (erforderlich), Überschriften, Daten
search_and_replace- Suchen und Ersetzen von Text im DokumentParameter: Dateipfad (erforderlich), Suchtext (erforderlich), Ersetzungstext (erforderlich), Groß-/Kleinschreibung beachten
set_page_margins- Seitenränder des Dokuments festlegenParameter: Dateipfad (erforderlich), oben, rechts, unten, links
get_document_info- Dokumentmetadaten abrufenParameter: Dateipfad (erforderlich)
Integration mit KI-Anwendungen
Cursor
Öffnen Sie die Cursor-Konfigurationsdatei
~/.cursor/mcp.jsonFügen Sie die folgende Konfiguration hinzu:
{
"mcpServers": {
"doc-tools-mcp": {
"command": "npx",
"args": [
"@puchunjie/doc-tools-mcp"
]
}
}
}
Oder für die lokale Entwicklungsversion:
{
"mcpServers": {
"doc-tools-mcp": {
"command": "node",
"args": [
"/path/to/your/doc-tools-mcp/dist/mcp-server.js"
]
}
}
}Nach der Konfiguration können Sie Word-Dokumente mithilfe natürlicher Sprache bearbeiten:
"Create a new document named report.docx"
"Add a heading 'Monthly Report' to report.docx"
"Insert a 4x3 table with sales data"VSCode und andere MCP-kompatible Tools
Ähnliche Integrationsschritte gelten für andere Tools, die das MCP-Protokoll unterstützen. Informationen zu den spezifischen Konfigurationsschritten für den MCP-Server finden Sie in der Dokumentation Ihres Tools.
Entwicklung
So erweitern oder ändern Sie diesen MCP-Server:
Klonen Sie das Repository:
git clone <repository-url>
cd doc-tools-mcpInstallieren Sie Abhängigkeiten:
npm installStarten Sie im Entwicklungsmodus:
npm run startFür die Produktion erstellen:
npm run buildHinzufügen neuer MCP-Funktionen
Neue Methoden in
src/services/DocumentService.tshinzufügenNeue Funktionen in
src/mcp-server.tsregistrierenAktualisieren Sie die Typdefinitionen nach Bedarf
Konfiguration
Standardport: 8765 (konfigurierbar)
Unterstützte Dateitypen: .docx
Alle Dateipfade sollten absolut oder relativ zum aktuellen Arbeitsverzeichnis sein
Lizenz
MIT
Unterstützung
Wenn Sie auf Probleme stoßen oder Verbesserungsvorschläge haben, senden Sie bitte ein Problem in unserem GitHub-Repository.
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