- Home
- MCP servers
- Word Tools
Word Tools
- typescript
10
GitHub Stars
typescript
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"puchunjie-doc-tools-mcp": {
"command": "npx",
"args": [
"@puchunjie/doc-tools-mcp"
]
}
}
}You run a Word Tools MCP Server that lets you create, edit, and manage Word documents through natural language via the MCP protocol. It enables AI-powered document manipulation, table creation, formatting, and real-time state monitoring, all accessible from compatible MCP clients.
How to use
Start the MCP server and connect your AI application to it to manipulate Word documents with natural language. The server listens on port 8765 by default, and you use MCP-enabled clients to issue actions like creating documents, adding content, or formatting.
Typical actions you can perform through an MCP client include creating a document, opening an existing document, adding paragraphs or tables, performing search-and-replace, adjusting page margins, and retrieving document metadata. You can combine these commands to build rich Word documents via conversational prompts.
How to install
Prerequisites: Install Node.js 14 or higher.
Install the MCP server package and run it using one of the supported startup methods.
# Run directly with npx (no local install required)
npx @puchunjie/doc-tools-mcp
# Or install globally for repeated use
npm install -g @puchunjie/doc-tools-mcp
Additional sections
Configuration and usage details are provided to ensure you can integrate with MCP clients like Cursor or VSCode. By default, the server runs on port 8765, and you can customize this as needed.
MCP functions available from the server include creating a document, opening a document, adding a paragraph, adding a table, performing search and replace, setting page margins, and retrieving document information. These endpoints enable natural-language-driven document construction and editing.
Cursor integration example shows how to register the MCP server for local development and how to point your MCP client to the server URL. You can choose between running via npx for quick start or using a local node-based path during development.
Example usage with an MCP-capable tool looks like: Create a new document named report.docx, add a heading, and insert a table with data.
Notes on development and extending functionality are included for adding new MCP functions and wiring them into the MCP server entry points.
Configuration details
Default port: 8765 (configurable). Supported file types: .docx. All file paths should be absolute or relative to the current working directory.
Useful MCP server commands and configuration patterns are demonstrated for quick start and local development.
# Development start (example)
npx @puchunjie/doc-tools-mcp
{
"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"
]
}
}
}
Tools and capabilities
The server provides a set of MCP functions to operate on Word documents in a structured way. Actions include creating documents, opening documents, adding content, formatting tables, adjusting layout, and querying metadata.
Troubleshooting and notes
If you encounter startup issues, ensure Node.js 14+ is installed and that you are using a valid command to start the MCP server. Check that the port 8765 is not blocked by a firewall and that your MCP client is configured to point to the correct URL.
Notes on extensibility
To extend functionality, add new MCP methods in the server source, register them in the MCP server entry point, and update type definitions as needed.
Available tools
create_document
Create a new Word document. Parameters: filePath (required), title, author.
open_document
Open an existing Word document. Parameters: filePath (required).
add_paragraph
Add a paragraph to the document. Parameters: filePath (required), text (required), style, alignment.
add_table
Add a table to the document. Parameters: filePath (required), rows (required), cols (required), headers, data.
search_and_replace
Find and replace text in the document. Parameters: filePath (required), searchText (required), replaceText (required), matchCase.
set_page_margins
Set document page margins. Parameters: filePath (required), top, right, bottom, left.
get_document_info
Get document metadata. Parameters: filePath (required).