mcpField
M
MCP Server -- Read Papers in the local Specified Directory

MCP Server -- Read Papers in the local Specified Directory

远程服务
github.com/sirix-v文件与存储477 周前更新
代码仓库

关于 MCP Server -- Read Papers in the local Specified Directory

该 Go MCP 服务读取指定本地目录中的 PDF 论文,适合需要让 MCP 客户端查找和阅读本地论文的人。启动时通过参数指定论文目录。

主要功能

  1. 01指定本地 PDF 目录
  2. 02查找目录中的论文
  3. 03读取 PDF 内容
  4. 04通过 SSE 提供服务

适用场景

  1. 01列出本地论文文件
  2. 02按文件名定位论文
  3. 03让 MCP 客户端读取论文内容

MCP 相关

该服务向 MCP 客户端提供 `find_pdf` 和 `read_pdf` 工具,用于查找和阅读指定目录中的 PDF 论文。

配置

远程服务无需本地安装。选择你使用的客户端,复制配置或使用一键安装。

服务地址http://127.0.0.1:8080/sse
一键复制安装命令
Claude CodeTerminal
Cursor.cursor/mcp.json
VS Code.vscode/mcp.json
Claude Desktopclaude_desktop_config.json
Windsurf~/.codeium/windsurf/mcp_config.json

命令在终端中运行;JSON 粘贴到对应客户端的 MCP 配置后重启。需要授权的服务会在首次连接时提示登录。

工具

详细介绍

MCP 服务——读取本地指定目录中的论文

中文文档

编译
go build -o pdf-mcp-server main.go
安装

将 pdf-mcp-server 二进制文件所在的路径添加到环境变量中。

以 macOS 为例:

export PATH=$PATH:/your/path/pdf-mcp-server
source ~/.zshrc
启动 MCP 服务
pdf-mcp-server -pdfdir=your_paper_directory
For example: pdf-mcp-server -pdfdir=/Users/sirix/lunwen
Cursor 设置
{
  "mcpServers": {
    "pdf-mcp-server": {
      "url": "http://127.0.0.1:8080/sse"
    }
  }
}
设置 Cursor 规则

示例:

When handling PDF-related requests, call the find_pdf tool of the mcp server named "pdf-mcp-server" to list all papers in the /Users/sirix/lunwen directory, search for the paper with the corresponding file name in this directory, and use the read_pdf tool of the pdf-mcp-server to read it.

评论

支持 Markdown

第一次接触 MCP?

从协议是什么,到在客户端里装上第一个服务,这几条回答覆盖了大多数入门问题。

一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。