Skip to main content
Glama

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.

Schmiedeabzeichen

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: Word Document MCP Server

Voraussetzungen

  • Node.js 14 oder höher

  • Microsoft Word (optional, für erweiterte Funktionen)

Installation

npx @puchunjie/doc-tools-mcp

Oder global installieren:

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

Zur Verwendung als Abhängigkeit in Ihrem Projekt:

npm install @puchunjie/doc-tools-mcp

Verwendung

  1. Starten Sie den MCP-Server:

npx @puchunjie/doc-tools-mcp
  1. Der Server startet standardmäßig auf Port 8765

  2. 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 erstellen

    • Parameter: Dateipfad (erforderlich), Titel, Autor

  • open_document - Öffnen Sie ein vorhandenes Word-Dokument

    • Parameter: Dateipfad (erforderlich)

  • add_paragraph - Einen Absatz zum Dokument hinzufügen

    • Parameter: Dateipfad (erforderlich), Text (erforderlich), Stil, Ausrichtung

  • add_table - Fügt dem Dokument eine Tabelle hinzu

    • Parameter: Dateipfad (erforderlich), Zeilen (erforderlich), Spalten (erforderlich), Überschriften, Daten

  • search_and_replace - Suchen und Ersetzen von Text im Dokument

    • Parameter: Dateipfad (erforderlich), Suchtext (erforderlich), Ersetzungstext (erforderlich), Groß-/Kleinschreibung beachten

  • set_page_margins - Seitenränder des Dokuments festlegen

    • Parameter: Dateipfad (erforderlich), oben, rechts, unten, links

  • get_document_info - Dokumentmetadaten abrufen

    • Parameter: Dateipfad (erforderlich)

Integration mit KI-Anwendungen

Cursor

  1. Öffnen Sie die Cursor-Konfigurationsdatei ~/.cursor/mcp.json

  2. Fü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:

  1. Klonen Sie das Repository:

git clone <repository-url>
cd doc-tools-mcp
  1. Installieren Sie Abhängigkeiten:

npm install
  1. Starten Sie im Entwicklungsmodus:

npm run start
  1. Für die Produktion erstellen:

npm run build

Hinzufügen neuer MCP-Funktionen

  1. Neue Methoden in src/services/DocumentService.ts hinzufügen

  2. Neue Funktionen in src/mcp-server.ts registrieren

  3. Aktualisieren 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 tools
add_paragraphD
ParametersJSON Schema
NameRequiredDescriptionDefault
filePathYes
textYes
styleNo
alignmentNo

TDQS

D1/5.0
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Tool has no description.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness1/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Tool has no description.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Tool has no description.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Tool has no description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose1/5

Does the description clearly state what the tool does and how it differs from similar tools?

Tool has no description.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Tool has no description.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

add_tableD
ParametersJSON Schema
NameRequiredDescriptionDefault
filePathYes
rowsYes
colsYes
headersNo
dataNo

TDQS

D1/5.0
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Tool has no description.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness1/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Tool has no description.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Tool has no description.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Tool has no description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose1/5

Does the description clearly state what the tool does and how it differs from similar tools?

Tool has no description.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Tool has no description.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

create_documentD
ParametersJSON Schema
NameRequiredDescriptionDefault
filePathYes
titleNo
authorNo

TDQS

D1/5.0
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Tool has no description.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness1/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Tool has no description.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Tool has no description.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Tool has no description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose1/5

Does the description clearly state what the tool does and how it differs from similar tools?

Tool has no description.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Tool has no description.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_document_infoD
ParametersJSON Schema
NameRequiredDescriptionDefault
filePathYes

TDQS

D1/5.0
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Tool has no description.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness1/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Tool has no description.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Tool has no description.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Tool has no description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose1/5

Does the description clearly state what the tool does and how it differs from similar tools?

Tool has no description.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Tool has no description.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

open_documentD
ParametersJSON Schema
NameRequiredDescriptionDefault
filePathYes

TDQS

D1/5.0
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Tool has no description.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness1/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Tool has no description.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Tool has no description.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Tool has no description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose1/5

Does the description clearly state what the tool does and how it differs from similar tools?

Tool has no description.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Tool has no description.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_and_replaceD
ParametersJSON Schema
NameRequiredDescriptionDefault
filePathYes
searchTextYes
replaceTextYes
matchCaseNo

TDQS

D1/5.0
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Tool has no description.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness1/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Tool has no description.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Tool has no description.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Tool has no description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose1/5

Does the description clearly state what the tool does and how it differs from similar tools?

Tool has no description.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Tool has no description.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

set_page_marginsD
ParametersJSON Schema
NameRequiredDescriptionDefault
filePathYes
topNo
rightNo
bottomNo
leftNo

TDQS

D1/5.0
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Tool has no description.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness1/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Tool has no description.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Tool has no description.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Tool has no description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose1/5

Does the description clearly state what the tool does and how it differs from similar tools?

Tool has no description.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Tool has no description.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

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

  1. 7 tool updates
    • First observedadd_paragraph
    • First observedadd_table
    • First observedcreate_document
    • First observedget_document_info
    • First observedopen_document
    • First observedsearch_and_replace
    • First observedset_page_margins

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
ResponsivenessUnresponsive

Related MCP Connectors

Related MCP Servers