Get the FREE Ultimate OpenClaw Setup Guide →

word

MCP server from KS-GEN-AI/word-mcp-server

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio ks-gen-ai-word-mcp-server node /PATH_TO_THE_PROJECT/build/index.js

How to use

This MCP server provides a set of Word (.docx) editing tools and a Word-to-PDF conversion capability. You can list, read, modify, delete, and convert Word documents, with all file operations supported via absolute or relative paths. The word_to_pdf tool preserves formatting and images when converting to PDF, using LibreOffice in headless mode. Tools include: list_files_in_folder to enumerate files in a folder, read_word_content to extract text from a .docx, replace_word_words to perform text replacements and save a new file, delete_word_file to remove a Word document, and word_to_pdf to generate a PDF from a Word file. The server expects file paths relative to the current working directory of the process, with no pre-selected working folder concept.

How to install

Prerequisites:

  • Node.js and npm installed on your system.
  • LibreOffice installed for Word to PDF conversion.

Installation steps:

  1. Install dependencies: npm install

  2. Install LibreOffice for Word → PDF conversion: npm run install-libreoffice

  3. Build the server: npm run build

  4. (Optional) Start in watch mode for auto-rebuild during development: npm run watch

  5. Run the server (example): node build/index.js

Additional notes

Notes and tips:

  • The Word to PDF conversion relies on LibreOffice being available in your system path. If it's not detected, ensure LibreOffice is installed and accessible by the process environment.
  • All file paths can be absolute or relative to the process working directory. There is no reserved working folder anymore.
  • When deploying, ensure the container or host has enough permissions to read/write the specified file paths and to execute LibreOffice in headless mode.
  • Debugging MCP servers uses standard IO; for a richer debugging experience, consider using the MCP Inspector tool referenced in the README.

Related MCP Servers

Sponsor this space

Reach thousands of developers