Skip to main content
Glama
Aspose.Words MCP

Aspose.Words MCP

Official
by aspose-words

Aspose.Words MCP

Python Version License

Overview

Aspose.Words MCP is a FastMCP-based MCP server built on top of Aspose.Words for Python via .NET. It automates Microsoft Word document creation and editing and exposes operations as MCP tools that any MCP-compatible client can call. The server is aligned with Aspose.Words for Python via .NET 26.10.0. Supported transports: stdio, streamable-http, sse.

Related MCP server: MCP-OPENAPI-DOCX

Features

  • Create documents; read/write text, headings, and paragraphs

  • Text replacement workflows, including optional run joining when needed

  • Text formatting (font, size, style, color, underline)

  • Page and section breaks; page setup (margins, orientation, paper size, columns)

  • Lists (bulleted/numbered)

  • Tables: create, auto-fit, merge cells, alignment, shading, paddings, column widths, header styling

  • Charts: create column and waterfall charts, list charts, format plot-area fills and lines, inspect waterfall totals

  • Footnotes and endnotes: add, convert, anchor-based operations, validation

  • Comments: get by author, by paragraph, all comments

  • Document properties: read/write (title, author, subject, keywords)

  • Document comparison with revision output

  • Protection: protect/unprotect, partial editing restrictions

  • Digital signatures: sign documents with optional timestamp settings and inspect signature metadata

  • Bookmarks, hyperlinks

  • Watermarks (text/image)

  • Export as Base64 (DOCX, signed PDF, XPS, etc.)

  • Render page to image (PNG, etc.)

  • In-memory document management: copy, save as, list, delete, merge

Requirements

Installation

pip install aspose-words-mcp

From source (download repo and install requirements):

git clone https://github.com/aspose-words/Aspose.Words-MCP
cd Aspose.Words-MCP
pip install -r requirements.txt

Command Line Interface

After installation, the CLI command is available:

aspose-words-mcp

By default, the server runs with the stdio transport.

Run without installation:

python mcp_server.py

Transports and Configuration

Supported MCP transports: stdio, streamable-http, sse.

Environment Variables

  • MCP_TRANSPORT — stdio | streamable-http | sse (default stdio)

  • MCP_HOST — host address (default 0.0.0.0)

  • MCP_PORT — port (default 8080)

  • MCP_PATH — HTTP path for streamable-http (default /mcp)

  • MCP_SSE_PATH — events path for sse (default /sse)

  • LOG_LEVEL — logging level (INFO, DEBUG, ...)

Aspose.Words License

The Aspose.Words license is applied when the server starts. The effective path to the license file is resolved with the following precedence:

  1. The license_path argument of run_server(..., license_path=None)

  2. The ASPOSE_WORDS_LICENSE_PATH environment variable

If no license is provided or the file is not accessible, the server runs in Evaluation mode.

Example of setting the environment variable:

export ASPOSE_WORDS_LICENSE_PATH='/path/to/aspose.words.lic'

HTTP/SSE Run Example

export MCP_TRANSPORT=streamable-http   # or sse
export MCP_HOST=0.0.0.0
export MCP_PORT=8080
export MCP_PATH=/mcp                   # for streamable-http
export MCP_SSE_PATH=/sse               # for sse
aspose-words-mcp

On start, the server prints the listening address.

Development Validation

Install development dependencies with python -m pip install -e '.[dev]', then run:

python -m pytest -q
python -m ruff check .
python -m ruff format . --check
python -m pyright --pythonpath .venv/bin/python

All four checks are required before merging a server update.

Tools

See full list and signatures in mcp_server.py (function register_tools) and tests in tests/features/*.

Main tool categories:

  • content/reading: create document, insert/delete/read text, headings, lists, HTML/Markdown

  • layout: pages, breaks, columns, headers/footers, page numbering

  • tables: create and format tables

  • charts: add_chart_end, list_charts, format_chart_plot_area, get_waterfall_totals

  • watermarks: watermarks

  • links/bookmarks: hyperlinks and bookmarks

  • properties: document properties

  • comparison: compare documents and save revisions

  • protection: protection and restrictions

  • signatures: signing and signature metadata

  • comments/notes: comments, footnotes/endnotes

  • export/render: export (including Docling, signed PDF, and XPS advanced export), page rendering

Use add_chart_end with chart_type="column" or "waterfall", a shared categories list, and series objects containing name and numeric values matching the categories. Waterfall series also require a matching is_subtotal boolean array. Use the zero-based chartIndex and seriesIndex values from list_charts to select charts and series. format_chart_plot_area accepts a solid fill_color or a one-color gradient object, plus optional line_color and line_width_points; colors use six-digit RGB hex, and omitted formatting fields retain their values. get_waterfall_totals inspects all points in the selected waterfall series, or a single zero-based point_index.

Example Workflow via an MCP Client

Sequence of tool calls (names match the server):

  1. create_document → get doc_id

  2. add_heading (e.g., levels 1–3)

  3. add_paragraph / insert_text_end

  4. add_table_end or add_table_at_paragraph

  5. add_watermark_text or add_watermark_image_base64

  6. export_base64 (e.g., fmt="pdf") — get file as Base64

Integration with MCP Clients

  • Claude Desktop MCP: add this server with streamable-http or sse transport and the URL printed by the server at startup.

  • Any MCP (JSON) clients — configure the matching transport and path.

License

This package is licensed under the MIT License. However, it depends on Aspose.Words for Python via .Net library, which is proprietary, closed-source library.

⚠️ You must obtain valid license for Aspose.Words for Python via .Net library. This repository does not include or distribute any proprietary components.

Trademarks

This project may contain trademarks or logos for projects, products, or services. Use of third-party trademarks or logos is subject to those third-party policies.

Available Tools

93 tools
add_bookmark_at_paragraphC

Add a bookmark to the specified paragraph

Inputs: doc_id (required), name (required), paragraph_index (required).

add_endnoteC

Add an endnote to a paragraph

Inputs: doc_id (required), paragraph_index (required), text (required).

add_endnote_by_anchorC

Add an endnote after/before the anchor text

Inputs: doc_id (required), anchor_text (required), text (required), position, +3 more.

add_footnoteC

Add a footnote to a paragraph

Inputs: doc_id (required), paragraph_index (required), text (required).

add_footnote_by_anchorC

Add a footnote after/before the anchor text

Inputs: doc_id (required), anchor_text (required), text (required), position, +3 more.

add_header_textC

Add text to the header

Inputs: doc_id (required), text (required), primary.

add_headingC

Add a heading with level and font options

Inputs: doc_id (required), text (required), level, font_name, +4 more.

add_page_break_at_paragraphC

Insert a page break before the specified paragraph

Inputs: doc_id (required), paragraph_index (required).

add_page_break_endC

Insert a page break at the end of the document

Inputs: doc_id (required).

add_page_break_startC

Insert a page break at the start of the document

Inputs: doc_id (required).

add_page_numberingC

Insert page numbering into headers/footers

Inputs: doc_id (required), format_string.

add_paragraphC

Add a paragraph with optional style and formatting

Inputs: doc_id (required), text (required), style, font_name, +4 more.

add_picture_base64_endB

Add an image (base64) at the end of the document

Inputs: doc_id (required), image_base64 (required), width_points, height_points, +1 more.

add_picture_base64_startC

Add an image (base64) at the start of the document

Inputs: doc_id (required), image_base64 (required), width_points, height_points, +1 more.

add_table_at_paragraphC

Add a table at the specified paragraph

Inputs: doc_id (required), rows (required), cols (required), paragraph_index (required), +2 more.

add_table_endC

Add a table at the end of the document

Inputs: doc_id (required), rows (required), cols (required), data, +1 more.

add_table_startC

Add a table at the start of the document

Inputs: doc_id (required), rows (required), cols (required), data, +1 more.

add_watermark_image_base64C

Add an image watermark from base64

Inputs: doc_id (required), image_base64 (required), scale, washout.

add_watermark_textC

Add a text watermark

Inputs: doc_id (required), text (required), font_name, size, +2 more.

apply_table_alternating_rowsC

Apply alternating row colors to a table

Inputs: doc_id (required), table_index (required), color1, color2.

auto_fit_table_columnsC

Auto fit table columns to content

Inputs: doc_id (required), table_index (required).

convert_footnotes_to_endnotesB

Convert all footnotes to endnotes

Inputs: doc_id (required).

copy_documentC

Create a copy of the document and return the new ID

Inputs: doc_id (required).

create_custom_styleC

Create a custom style with font properties

Inputs: doc_id (required), style_name (required), bold, italic, +4 more.

create_documentC

Create a new document and return its ID

Inputs: name.

delete_documentC

Delete a document from the store

Inputs: doc_id (required).

delete_endnotes_by_anchorB

Delete endnotes by anchor text (with filter options)

Inputs: doc_id (required), anchor_text (required), occurrence, remove_all, +2 more.

delete_footnotes_by_anchorC

Delete footnotes by anchor text (with filter options)

Inputs: doc_id (required), anchor_text (required), occurrence, remove_all, +2 more.

delete_paragraphC

Delete a paragraph by index

Inputs: doc_id (required), paragraph_index (required).

export_base64C

Export the document to the specified format and return as base64

Inputs: doc_id (required), fmt.

export_base64_advancedD

Advanced export with additional format options

Inputs: doc_id (required), fmt (required), options.

find_textC

Find text occurrences in the document

Inputs: doc_id (required), text (required), match_case, whole_word.

format_tableC

Apply composite formatting to a table

Inputs: doc_id (required), table_index (required), has_header_row, border_style, +1 more.

format_table_cell_textC

Set text and formatting of a specific table cell

Inputs: doc_id (required), table_index (required), row_index (required), col_index (required), +7 more.

format_textB

Format text within a paragraph by character range

Inputs: doc_id (required), paragraph_index (required), start_pos (required), end_pos (required), +6 more.

get_all_commentsC

Get all document comments

Inputs: doc_id (required).

get_all_notesC

Get a list of all document notes

Inputs: doc_id (required).

get_comments_by_authorC

Get comments by author

Inputs: doc_id (required), author (required).

get_comments_for_paragraphC

Get comments for the specified paragraph

Inputs: doc_id (required), paragraph_index (required).

get_digital_signaturesC

Get document digital signature metadata

Inputs: doc_id (required).

get_document_base64C

Get the document binary content as base64

Inputs: doc_id (required).

get_infoC

Get general document information

Inputs: doc_id (required).

get_outlineC

Get the document outline (headings structure)

Inputs: doc_id (required).

get_propertiesB

Read document properties (Title, Author, etc.)

Inputs: doc_id (required).

get_textC

Get the full document text as a single block

Inputs: doc_id (required).

get_xmlC

Get the document XML

Inputs: doc_id (required).

healthC

Health check

Inputs: no named parameters.

highlight_table_headerC

Highlight the table header row

Inputs: doc_id (required), table_index (required), header_color, text_color.

insert_header_near_textC

Insert a heading near the found text or paragraph index

Inputs: doc_id (required), target_text, header_title, position, +2 more.

insert_html_at_paragraphC

Insert HTML at the specified paragraph

Inputs: doc_id (required), html (required), paragraph_index (required).

insert_html_endC

Insert HTML at the end of the document

Inputs: doc_id (required), html (required).

insert_html_startC

Insert HTML at the start of the document

Inputs: doc_id (required), html (required).

insert_line_or_paragraph_near_textC

Insert a line/paragraph near the found text

Inputs: doc_id (required), target_text, line_text, position, +1 more.

insert_list_at_paragraphC

Insert a list at the specified paragraph

Inputs: doc_id (required), items (required), paragraph_index (required), kind.

insert_list_endC

Insert a bulleted or numbered list at the end

Inputs: doc_id (required), items (required), kind.

insert_list_startC

Insert a bulleted or numbered list at the start

Inputs: doc_id (required), items (required), kind.

insert_markdown_at_paragraphC

Insert Markdown at the specified paragraph

Inputs: doc_id (required), markdown (required), paragraph_index (required).

insert_markdown_endC

Insert Markdown at the end of the document

Inputs: doc_id (required), markdown (required).

insert_markdown_startC

Insert Markdown at the start of the document

Inputs: doc_id (required), markdown (required).

insert_numbered_list_near_textC

Create a numbered or bulleted list near text

Inputs: doc_id (required), target_text, list_items, position, +2 more.

insert_section_breakC

Insert a section break of the specified type

Inputs: doc_id (required), kind.

insert_text_at_paragraphC

Insert text into the specified paragraph by index

Inputs: doc_id (required), text (required), paragraph_index (required).

insert_text_endC

Insert text at the end of the document

Inputs: doc_id (required), text (required).

insert_text_startC

Insert text at the start of the document

Inputs: doc_id (required), text (required).

list_documentsB

List all available documents

Inputs: no named parameters.

merge_documentsC

Merge multiple documents into one

Inputs: source_doc_ids (required), append_document_with_new_page, resolve_theme_colors.

merge_table_cellsC

Merge a range of table cells

Inputs: doc_id (required), table_index (required), start_row (required), start_col (required), +2 more.

merge_table_cells_horizontalC

Merge cells horizontally in a row

Inputs: doc_id (required), table_index (required), row_index (required), start_col (required), +1 more.

merge_table_cells_verticalD

Merge cells vertically in a column

Inputs: doc_id (required), table_index (required), col_index (required), start_row (required), +1 more.

notes_styleC

Set text style for footnotes/endnotes

Inputs: doc_id (required), font_name, font_size, bold, +2 more.

protect_documentC

Protect the document with a password

Inputs: doc_id (required), password.

protect_restrictC

Restrict editing ranges in the document

Inputs: doc_id (required), password, ranges.

read_paragraphsC

Read a range of paragraphs from the document

Inputs: doc_id (required), start, end.

render_page_base64C

Render a document page to an image/base64

Inputs: doc_id (required), page_index, fmt, dpi.

replace_textC

Replace text in the document with case/scope and regex options

Inputs: doc_id (required), find_text, replace_text, search_text, +9 more.

save_as_newC

Save a copy of the document with a new name and format

Inputs: doc_id (required), name (required), fmt.

set_page_setupB

Set page setup: margins, orientation, paper, columns

Inputs: doc_id (required), margins, orientation, paper, +1 more.

set_propertiesC

Set document properties (Title, Author, etc.)

Inputs: doc_id (required), title, author, subject, +1 more.

set_table_alignment_allC

Align the entire table relative to the page

Inputs: doc_id (required), table_index (required), horizontal.

set_table_cell_alignmentC

Set table cell horizontal/vertical alignment

Inputs: doc_id (required), table_index (required), row_index (required), col_index (required), +2 more.

set_table_cell_paddingC

Set table cell padding

Inputs: doc_id (required), table_index (required), row_index (required), col_index (required), +4 more.

set_table_cell_shadingC

Set table cell shading to the specified color

Inputs: doc_id (required), table_index (required), row_index (required), col_index (required), +1 more.

set_table_column_widthC

Set a table column width

Inputs: doc_id (required), table_index (required), col_index (required), width (required), +1 more.

set_table_column_widthsC

Set all table column widths

Inputs: doc_id (required), table_index (required), widths (required), width_type.

set_table_widthC

Set the overall table width

Inputs: doc_id (required), table_index (required), width (required), width_type.

sign_documentC

Sign the document with a digital certificate

Inputs: doc_id (required), certificate_path (required), certificate_passphrase, application_version, +5 more.

statsC

Get document statistics (pages, words, etc.)

Inputs: doc_id (required).

unprotect_documentC

Unprotect the document

Inputs: doc_id (required), password.

validate_endnotes_by_anchorC

Validate that at least the specified number of endnotes exist by anchor

Inputs: doc_id (required), anchor_text (required), min_count, match_case, +1 more.

validate_footnotes_by_anchorC

Validate that at least the specified number of footnotes exist by anchor

Inputs: doc_id (required), anchor_text (required), min_count, match_case, +1 more.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    C2.2/5.0

    Scored across 93 tools

    Disambiguation2/5

    Several tool families overlap heavily: export_base64, export_base64_advanced, save_as_new, and get_document_base64 all produce document output, while insert_list_start, insert_list_end, insert_list_at_paragraph, and insert_numbered_list_near_text are near-duplicates. Add_footnote vs add_footnote_by_anchor and protect_restrict vs protect_document further blur boundaries, making tool selection risky.

    Naming Consistency3/5

    Most tools follow a readable verb_noun pattern like create_document, insert_text_end, and delete_paragraph. However, there are notable deviations: bare nouns like stats, health, and notes_style, double-verb protect_restrict, and inconsistent positional suffixes (_end, _start, _at_paragraph, _near_text) throughout the set.

    Tool Count1/5

    With 93 tools, this server far exceeds the 25+ threshold and presents an overwhelming selection surface. The count is inflated by micro-variants of the same operations, such as start/end/at_paragraph/near_text versions of the same insertion actions.

    Completeness3/5

    The server covers an impressively broad range of document operations: creation, insertion, tables, footnotes, protection, exports, and metadata. However, lifecycle coverage is uneven: comments are read-only, and watermarks, headers, bookmarks, and hyperlinks have add/insert operations but no corresponding delete/update tools.

    Maintenance

    ActivityMaintained
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers