This commit is contained in:
2026-03-20 19:45:19 +08:00
parent 248f7a2637
commit 3757894e7c
2 changed files with 11 additions and 9 deletions

View File

@@ -8,12 +8,13 @@
### 功能
- `list_docx_images`:列出 DOCX 中的图片信息,支持 `docx_path` 为本地路径或 HTTP/HTTPS URL。
- `edit_docx`:对 DOCX 进行编辑,支持:
- `input_docx` 为本地路径或 HTTP/HTTPS URL
- `image_replacements[*].file` 为本地路径或 HTTP/HTTPS URL
- 返回结果中包含 `output_path` 和可选的 `output_url`(见下文)。
- `html_to_docx_pandoc`:将包含 HTML 标签的文本转换为 DOCX 文件支持引用模板、Lua 过滤器等高级格式控制。
另外:`edit_docx``mcp_docx_server.py` 里的普通函数(不再通过 MCP 暴露),支持同样的参数与返回值:
- `input_docx` 为本地路径或 HTTP/HTTPS URL
- `image_replacements[*].file` 为本地路径或 HTTP/HTTPS URL
- 返回结果中包含 `output_path` 和可选的 `output_url`(见下文)。
### 安装依赖(本机运行)
```bash
@@ -32,7 +33,7 @@ pip install -r requirements.txt
python mcp_docx_server.py
```
在 MCP 客户端中连接该服务器后,会看到上述三个工具
在 MCP 客户端中连接该服务器后,应该会看到其中的 MCP 工具(`list_docx_images` 等);`edit_docx` 不再作为 MCP 工具出现
#### 输出 URLoutput_url