返回市场
文档阅读器

文档阅读器

作者:jbchouinard7 星标更新:2025-03-09

项目介绍

mcp-document-reader

一个基础的MCP服务器,用于与PDF和EPUB文档进行交互。

我使用这个工具与Codeium的Windsurf IDE一起工作,该IDE仅支持MCP工具,而不支持资源。

安装

要求

# 克隆仓库
git clone https://github.com/jbchouinard/mcp-document-reader.git
cd mcp-document-reader
poetry install

配置MCP服务器

使用poetry运行:

{
  "mcpServers": {
    "documents": {
      "command": "poetry",
      "args": ["-C", "path/to/mcp-document-reader", "run", "mcp-document-reader"]
    }
  }
}

或者,使用pip构建并安装,然后直接运行脚本:

poetry build
pipx install dist/*.whl
which mcp-document-reader

然后使用以下配置,其中路径由which命令输出:

{
  "mcpServers": {
    "documents": {
      "command": "/path/to/mcp-document-reader",
      "args": []
    }
  }
}

开发

设置

# 安装依赖
poetry install

测试

poetry run pytest

格式化代码

poetry run ruff check --fix .
poetry run ruff format .

许可证

MIT