文档阅读器

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

  • by jbchouinard
  • Python
  • 本地部署
  • 9 星标
  • 更新于
在 GitHub 查看 jbchouinard/mcp-document-reader

使用说明

mcp文档阅读器

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

我用这个和 Codeium的Windsurf IDE,这 仅支持MCP工具,不支持资源。

安装

要求

# Clone the repository
git clone https://github.com/jbchouinard/mcp-document-reader.git
cd mcp-document-reader
poetry install

配置MCP服务器

根据上面的信息,执行如下指令:

{
  "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

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

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

开发

设置

# Install dependencies
poetry install

测试

poetry run pytest

代码检查

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

许可证

麻省理工学院