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 .