MCP-Doc

MeterLong/MCP-Doc

3.9

MCP-Doc is hosted online, so all tools can be tested directly either in theInspector tabor in theOnline Client.

If you are the rightful owner of MCP-Doc and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

A Docx document processing service based on the FastMCP library, supporting the creation, editing, and management of Word documents using AI assistants in Cursor.

Try MCP-Doc with chat:

Tools

Functions exposed to the LLM to take actions

create_document

Create a new Word document

Parameters:
- file_path: Document save path

open_document

Open an existing Word document

Parameters:
- file_path: Path to the document to open

save_document

Save the currently open Word document to the original file (update the original file)

add_paragraph

Add paragraph text to document

Parameters:
- text: Paragraph text content
- bold: Whether to bold
- italic: Whether to italicize
- underline: Whether to underline
- font_size: Font size (points)
- font_name: Font name
- color: Text color (format: #FF0000)
- alignment: Alignment (left, center, right, justify)

add_heading

Add heading to document

Parameters:
- text: Heading text
- level: Heading level (1-9)

add_table

Add table to document

Parameters:
- rows: Number of rows
- cols: Number of columns
- data: Table data, two-dimensional array

get_document_info

Get document information, including paragraph count, table count, styles, etc.

search_text

Search for text in the document

Parameters:
- keyword: Keyword to search for

search_and_replace

Search and replace text in the document, providing detailed replacement information and preview options

Parameters:
- keyword: Keyword to search for
- replace_with: Text to replace with
- preview_only: Whether to only preview without actually replacing, default is False

find_and_replace

Find and replace text in the document

Parameters:
- find_text: Text to find
- replace_text: Text to replace with

merge_table_cells

Merge table cells

Parameters:
- table_index: Table index
- start_row: Start row index
- start_col: Start column index
- end_row: End row index
- end_col: End column index

split_table

Split table into two tables at specified row

Parameters:
- table_index: Table index
- row_index: Split table after this row

add_table_row

Add a row to table

Parameters:
- table_index: Table index
- data: Row data in list format

delete_table_row

Delete a row from table

Parameters:
- table_index: Table index
- row_index: Row index to delete

edit_table_cell

Edit table cell content

Parameters:
- table_index: Table index
- row_index: Row index
- col_index: Column index
- text: Cell text

add_page_break

Add page break

set_page_margins

Set page margins

Parameters:
- top: Top margin (cm)
- bottom: Bottom margin (cm)
- left: Left margin (cm)
- right: Right margin (cm)

delete_paragraph

Delete specified paragraph from document

Parameters:
- paragraph_index: Paragraph index to delete

delete_text

Delete specified text from paragraph

Parameters:
- paragraph_index: Paragraph index
- start_pos: Start position (0-based index)
- end_pos: End position (not included in the text)

save_as_document

Save current document as a new file

Parameters:
- new_file_path: Path to save the new file

create_document_copy

Create a copy of the current document in the directory of the original file

Parameters:
- suffix: Suffix to add to the original file name, default is "-副本"

replace_section

Find specified title in document and replace content under that title, keeping original position, format, and style

Parameters:
- section_title: Title text to find
- new_content: New content list, each element is a paragraph
- preserve_title: Whether to keep original title, default is True

edit_section_by_keyword

Find paragraphs containing specified keyword and replace them and their surrounding content, keeping original position, format, and style

Parameters:
- keyword: Keyword to find
- new_content: New content list, each element is a paragraph
- section_range: Surrounding paragraph range to replace, default is 3

Prompts

Interactive templates invoked by user choice

No prompts

Resources

Contextual data attached and managed by the client

No resources