Skip to main content

项目说明

技术参数

  • python 3.11
  • 框架使用 FastMCP
  • 操作文件必须使用绝对路径,保证文件操作的准确性。

目录说明

  • test/ 测试目录 python 用 unittest 写单元测试,文件格式 test_<测试功能>.py
    • 测试用 docx 文件:test/office_files/模版/QN-QR-24-01-003 进料检验单(结构件).docx
  • src/ 源代码目录
    • 下面的文件是一个功能对应一个 py 文件
  • demo/ 示例代码目录
  • pyproject.toml 项目配置文件
  • VERSION 版本号文件
  • build_and_publish_uv.sh 打包命令

功能

  • get_paragraph_text_from_document: 【已实现】从 Word 文档的特定段落获取文本。

  • find_text_in_document: 【已实现】在 Word 文档中查找特定文本的出现。

  • get_document_xml: 获取 Word 文档的原始 XML 结构。

  • search_and_replace: 【已实现】搜索文本并替换所有出现的地方。

  • create_document: 【已实现】创建一个带有可选元数据的新 Word 文档。

  • get_document_info: 【已实现】获取有关 Word 文档的信息。

  • get_document_text: 【已实现】从 Word 文档中提取所有文本。

  • get_document_outline: 【已实现】获取 Word 文档的结构。

  • insert_header_near_text: 【已实现】在包含目标文本的第一个段落之前或之后插入页眉(使用指定样式)。

  • insert_line_or_paragraph_near_text: 【已实现】在包含的第一个段落之前或之后插入一个新行或段落(使用指定或匹配的样式)。

  • add_paragraph: 【已实现】向 Word 文档中添加一个段落。

  • add_heading: 【已实现】向 Word 文档中添加一个标题。

  • add_picture: 【已实现】向 Word 文档中添加一张图片。

  • add_table: 【已实现】向 Word 文档中添加一个表格。

  • add_page_break: 【已实现】向文档中添加一个分页符。

  • delete_paragraph: 【已实现】从文档中删除一个段落。

  • create_custom_style: 【已实现】在文档中创建一个自定义样式。

  • format_text: 【已实现】在段落内格式化特定范围的文本。

  • format_table: 【已实现】使用边框、底纹和结构格式化表格。

  • protect_document: 【已实现】为 Word 文档添加密码保护(无 msoffcrypto 实现,和 office 加密有所区别)。

  • unprotect_document: 【已实现】从 Word 文档中删除密码保护。

  • add_footnote_to_document: 【已实现】向 Word 文档的特定段落添加脚注。

  • add_endnote_to_document: 【已实现】向 Word 文档的特定段落添加尾注。

  • customize_footnote_style: 【已实现】自定义脚注编号和格式。

  • convert_to_pdf: 【不制作,直接用打印到pdf 功能最还原】将 Word 文档转换为 PDF 格式。

  • copy_document: 【不制作,直接用shell cp 就行了】创建一个 Word 文档的副本。

  • list_available_documents: 列出指定目录中的所有 .docx 文件。

使用方法

uvx --index-url=https://nexus3.m.6do.me:4000/repository/pypi-group/simple --from office-word-mcp-uvx-server word-mcp-server --help
{
  "mcpServers": {
    "word-mcp-nexus": {
      "command": "uvx",
      "args": [
        "--index-url",
        "https://nexus3.m.6do.me:4000/repository/pypi-group/simple",
        "--from",
        "office-word-mcp-uvx-server==0.3.4",
        "word-mcp-server",
        "stdio"
      ]
    }
  }
}

Metadata

Release files for office-word-mcp-uvx-server 0.3.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for office-word-mcp-uvx-server 0.3.4
File Size Uploaded Provenance
office_word_mcp_uvx_server-0.3.4.tar.gz 34.7 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for office-word-mcp-uvx-server 0.3.4
File Interpreter ABI Platform
office_word_mcp_uvx_server-0.3.4-py3-none-any.whl Python 3 none any Details

Total release size: 93.1 kB

Release files / office_word_mcp_uvx_server-0.3.4.tar.gz

Download URL office_word_mcp_uvx_server-0.3.4.tar.gz
Size 34.7 kB
Tags Source
SHA-256 checksum
How to use checksums
773adaf08ef9850be158f27533b1bca97190760a52ab1d31e820e6e57cdc5a39
BLAKE2b-256 checksum
How to use checksums
31959f1d28089ffaed399b6a11e34c6c42a09d3800326d862929ec0a185a6324
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.3

Release files / office_word_mcp_uvx_server-0.3.4-py3-none-any.whl

Download URL office_word_mcp_uvx_server-0.3.4-py3-none-any.whl
Size 58.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3dec2278c57c02654e2400feb4c1af3ce7e2cbe1f67d18c0a2ea8cd03c6a530a
BLAKE2b-256 checksum
How to use checksums
d766585c85d91bb887400af6cac3cf0605dbbe77ac5e1ad1bce8dc0b7affee17
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.3

Security for office-word-mcp-uvx-server 0.3.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page