这是一个模型上下文协议(MCP)服务器,允许 Claude Desktop 对 Microsoft Word、Excel 和 PDF 文件执行文档操作。
此 MCP 服务器需要 Python 3.10 或更高版本。
要通过 Smithery 自动安装 Claude Document MCP Server 到 Claude Desktop:
npx -y @smithery/cli install @alejandroBallesterosC/document-edit-mcp --client claude
运行设置脚本来自动安装依赖项并为 Claude Desktop 配置服务器:
git clone https://github.com/alejandroBallesterosC/document-edit-mcp
cd document-edit-mcp
./setup.sh
这将:
如果您希望手动设置:
cd claude-document-mcp
python -m venv .venv
source .venv/bin/activate # 在 Windows 上:.venv\Scripts\activate
pip install -e .
将 claude_desktop_config.json 文件复制到:
~/Library/Application Support/Claude/%APPDATA%\Claude\此服务器遵循模型上下文协议规范,为 Claude Desktop 提供文档操作能力:
create_word_document(filepath: str, content: str) -> Dict
edit_word_document(filepath: str, operations: List[Dict]) -> Dict
convert_txt_to_word(source_path: str, target_path: str) -> Dict
create_excel_file(filepath: str, content: str) -> Dict
edit_excel_file(filepath: str, operations: List[Dict]) -> Dict
convert_csv_to_excel(source_path: str, target_path: str) -> Dict
create_pdf_file(filepath: str, content: str) -> Dict
convert_word_to_pdf(source_path: str, target_path:
str) -> Dict
服务器将所有操作记录到控制台和 logs/document_mcp.log 文件中,以便于故障排除。
MIT
欢迎贡献!请随时提交拉取请求。